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 CHANGED
@@ -3,12 +3,13 @@ require 'baldwin/version'
3
3
  module Baldwin
4
4
  autoload :Installer, 'baldwin/installer'
5
5
 
6
- RAILS_PATTERN = 'spec/rails/rails-*'
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' ] = "spec/rails/#{ENV[ 'BALDWIN_RAILS_NAME' ]}"
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
- Pathname.new ENV[ 'BALDWIN_RAILS_PATH' ]
20
+ root.join ENV[ 'BALDWIN_RAILS_PATH' ]
20
21
  end
21
22
 
22
23
  def self.apps
@@ -1,3 +1,3 @@
1
1
  module Baldwin
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baldwin
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: