baldwin 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/baldwin.rb +4 -3
- data/lib/baldwin/version.rb +1 -1
- data/spec/baldwin/paths_spec.rb +1 -1
- metadata +1 -1
data/lib/baldwin.rb
CHANGED
@@ -3,12 +3,13 @@ require 'baldwin/version'
|
|
3
3
|
module Baldwin
|
4
4
|
autoload :Installer, 'baldwin/installer'
|
5
5
|
|
6
|
-
|
6
|
+
RAILS_DIRNAME = 'spec/rails'
|
7
|
+
RAILS_PATTERN = "#{RAILS_DIRNAME}/rails-*"
|
7
8
|
|
8
9
|
def self.env!
|
9
10
|
require 'rails/version'
|
10
11
|
ENV[ 'BALDWIN_RAILS_NAME' ] = "rails-#{Rails::VERSION::STRING}"
|
11
|
-
ENV[ 'BALDWIN_RAILS_PATH' ] = "
|
12
|
+
ENV[ 'BALDWIN_RAILS_PATH' ] = "#{RAILS_DIRNAME}/#{ENV[ 'BALDWIN_RAILS_NAME' ]}"
|
12
13
|
end
|
13
14
|
|
14
15
|
def self.root
|
@@ -16,7 +17,7 @@ module Baldwin
|
|
16
17
|
end
|
17
18
|
|
18
19
|
def self.rails
|
19
|
-
|
20
|
+
root.join ENV[ 'BALDWIN_RAILS_PATH' ]
|
20
21
|
end
|
21
22
|
|
22
23
|
def self.apps
|
data/lib/baldwin/version.rb
CHANGED
data/spec/baldwin/paths_spec.rb
CHANGED
@@ -21,7 +21,7 @@ describe Baldwin do
|
|
21
21
|
describe '#rails' do
|
22
22
|
subject { Baldwin.rails }
|
23
23
|
it { should be_a( Pathname ) }
|
24
|
-
its( :to_s ){ should eq( ENV[ 'BALDWIN_RAILS_PATH' ] ) }
|
24
|
+
its( :to_s ){ should eq( File.join( Dir.pwd, ENV[ 'BALDWIN_RAILS_PATH' ] ) ) }
|
25
25
|
end
|
26
26
|
|
27
27
|
describe '#apps' do
|