lib/baldwin.rb in baldwin-0.2.2 vs lib/baldwin.rb in baldwin-0.2.3

- old
+ new

@@ -1,23 +1,24 @@ require 'baldwin/version' module Baldwin autoload :Installer, 'baldwin/installer' - RAILS_PATTERN = 'spec/rails/rails-*' + RAILS_DIRNAME = 'spec/rails' + RAILS_PATTERN = "#{RAILS_DIRNAME}/rails-*" def self.env! require 'rails/version' ENV[ 'BALDWIN_RAILS_NAME' ] = "rails-#{Rails::VERSION::STRING}" - ENV[ 'BALDWIN_RAILS_PATH' ] = "spec/rails/#{ENV[ 'BALDWIN_RAILS_NAME' ]}" + ENV[ 'BALDWIN_RAILS_PATH' ] = "#{RAILS_DIRNAME}/#{ENV[ 'BALDWIN_RAILS_NAME' ]}" end def self.root Pathname.new Dir.pwd end def self.rails - Pathname.new ENV[ 'BALDWIN_RAILS_PATH' ] + root.join ENV[ 'BALDWIN_RAILS_PATH' ] end def self.apps Dir[ RAILS_PATTERN ] end