module RailsBootReporting
Public Instance Methods
gem_path(gem, version, file)
click to toggle source
# File lib/rails-boot-reporting.rb, line 24 def gem_path(gem, version, file) install_path = File.join(ENV['BUNDLE_DIR'] || ENV['GEM_HOME'], 'gems', "#{gem}-#{version}", 'lib', file) end
install()
click to toggle source
# File lib/rails-boot-reporting.rb, line 6 def install install_rails install_bundler puts "Done." end
install_bundler()
click to toggle source
# File lib/rails-boot-reporting.rb, line 17 def install_bundler puts "-- Installing Bundler patches" bundler_version = Bundler::VERSION short_version = bundler_version.split('.', 3)[0..1].join('.') install_file("bundler-#{short_version}/runtime.rb", gem_path('bundler', bundler_version, 'bundler/runtime.rb')) end
install_file(local_path, install_path)
click to toggle source
# File lib/rails-boot-reporting.rb, line 28 def install_file(local_path, install_path) local_path = File.join(File.dirname(File.expand_path(__FILE__)), local_path) puts "Copying #{local_path} to #{install_path}" FileUtils.cp(local_path, install_path) end
install_rails()
click to toggle source
# File lib/rails-boot-reporting.rb, line 12 def install_rails puts "-- Installing Rails patches" install_file('rails-2.3.14/initializer.rb', gem_path('rails', '2.3.14', 'initializer.rb')) end