Module: Baldwin

Defined in:
lib/baldwin.rb,
lib/baldwin/version.rb,
lib/baldwin/installer.rb

Defined Under Namespace

Classes: Installer

Constant Summary collapse

RAILS_DIRNAME =
'spec/rails'
RAILS_PATTERN =
"#{RAILS_DIRNAME}/rails-*"
VERSION =
'0.2.6'

Class Method Summary collapse

Class Method Details

.appsObject



23
24
25
# File 'lib/baldwin.rb', line 23

def self.apps
  Dir[ RAILS_PATTERN ].map { |app| Pathname.new app }
end

.env!Object



9
10
11
12
13
# File 'lib/baldwin.rb', line 9

def self.env!
  require 'rails/version'
  ENV[ 'BALDWIN_RAILS_NAME' ] = "rails-#{Rails::VERSION::STRING}"
  ENV[ 'BALDWIN_RAILS_PATH' ] = "#{RAILS_DIRNAME}/#{ENV[ 'BALDWIN_RAILS_NAME' ]}"
end

.railsObject



19
20
21
# File 'lib/baldwin.rb', line 19

def self.rails
  root.join ENV[ 'BALDWIN_RAILS_PATH' ]
end

.rootObject



15
16
17
# File 'lib/baldwin.rb', line 15

def self.root
  Pathname.new Dir.pwd
end