lib/baldwin.rb in baldwin-0.2.1 vs lib/baldwin.rb in baldwin-0.2.2
- old
+ new
@@ -1,5 +1,25 @@
require 'baldwin/version'
module Baldwin
autoload :Installer, 'baldwin/installer'
+
+ RAILS_PATTERN = 'spec/rails/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' ]}"
+ end
+
+ def self.root
+ Pathname.new Dir.pwd
+ end
+
+ def self.rails
+ Pathname.new ENV[ 'BALDWIN_RAILS_PATH' ]
+ end
+
+ def self.apps
+ Dir[ RAILS_PATTERN ]
+ end
end