Sha256: da497ddc2cd74cd35ca7bd31d1893ae10befea5cb13e72432f1f88166ef13682
Contents?: true
Size: 689 Bytes
Versions: 3
Compression:
Stored size: 689 Bytes
Contents
require 'fileutils' from_d=File.expand_path(File.join(File.dirname(__FILE__),'lib','active_record')) to_d=File.expand_path(File.join(RAILS_ROOT,'lib','active_record')) FileUtils.cp_r from_d, to_d env_file = File.expand_path(File.join(RAILS_ROOT,"config","environment.rb")) bck_file = File.expand_path(File.join(RAILS_ROOT,"config","~.environment.rb.before_jdbc")) FileUtils.mv env_file,bck_file File.open(bck_file,"r") {|inf| File.open(env_file,"w") {|out| inf.each_line do |ln| if ln =~ /^Rails::Initializer\.run/ out.puts "# Added by ActiveRecord JDBC plugin" out.puts "require 'jdbc_adapter'" out.puts end out.puts ln end } }
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
ActiveRecord-JDBC-0.2.0 | install.rb |
ActiveRecord-JDBC-0.2.1 | install.rb |
ActiveRecord-JDBC-0.2.2 | install.rb |