fake_gem 0.1.13 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
data/bin/fake_gem CHANGED
@@ -42,6 +42,6 @@ fake_gem_paths = (fake_gem_paths + ARGV).uniq.join(':')
42
42
 
43
43
  puts <<-TEXT
44
44
  Please execute following commands or add it to Your bash profile:
45
- RUBYOPT=#{rubyopt}
46
- FAKE_GEM_PATHS=#{fake_gem_paths}
45
+ export RUBYOPT="#{rubyopt}"
46
+ export FAKE_GEM_PATHS="#{fake_gem_paths}"
47
47
  TEXT
data/lib/fake_gem.rb CHANGED
@@ -101,7 +101,7 @@ unless defined?(FakeGem) or defined?(JRuby)
101
101
  paths = paths.first if paths.first.is_a? Array
102
102
  if paths.empty?
103
103
  unless @paths
104
- if env_paths = ENV['FAKE_GEM_PATH']
104
+ if env_paths = ENV['FAKE_GEM_PATHS']
105
105
  self.paths = env_paths.split(':')
106
106
  else
107
107
  self.paths = []
data/readme.md CHANGED
@@ -18,12 +18,16 @@ Let's suppose Your projects are located in the /my_projects dir, and because You
18
18
 
19
19
  You want lib1 and lib2 to be available as a gems while You are developing Your app, do following steps:
20
20
 
21
- 1. mark lib1 as fake_gem: create /projects/lib/fake_gem file and add there following lines:
22
- name: lib1
23
- libs: lib
24
- 2. do the same for lib2
25
- 3. enable fake_gem in current bash session, type:
26
- $ fake_gem ~/projects
21
+ 1 mark lib1 as fake_gem: create /projects/lib/fake_gem file and add there following lines:
22
+
23
+ name: lib1
24
+ libs: lib
25
+
26
+ 2 do the same for lib2
27
+
28
+ 3 enable fake_gem in current bash session, type:
29
+
30
+ $ fake_gem ~/projects
27
31
 
28
32
  All done, now lib1 and lib2 will be availiable as real gems in ruby scripts.
29
33
  No changes needed to source code, You can use real gems or fake gems - the application knows nothing about it.
@@ -4,22 +4,22 @@ require "fake_gem"
4
4
  describe FakeGem do
5
5
  old_environment = nil
6
6
  before do
7
- old_environment = [$LOAD_PATH.clone, ENV['FAKE_GEM_PATH']]
7
+ old_environment = [$LOAD_PATH.clone, ENV['FAKE_GEM_PATHS']]
8
8
 
9
- ENV['FAKE_GEM_PATH'] = nil
9
+ ENV['FAKE_GEM_PATHS'] = nil
10
10
  FakeGem.clear
11
11
  end
12
12
 
13
13
  after do
14
14
  $LOAD_PATH.replace old_environment.first
15
- ENV['FAKE_GEM_PATH'] = old_environment.last
15
+ ENV['FAKE_GEM_PATHS'] = old_environment.last
16
16
  end
17
17
 
18
- it "should use FAKE_GEM_PATH environment variable or paths assigned to FakeGem::paths attribute" do
18
+ it "should use FAKE_GEM_PATHS environment variable or paths assigned to FakeGem::paths attribute" do
19
19
  FakeGem.paths.should == []
20
20
 
21
21
  FakeGem.clear
22
- ENV['FAKE_GEM_PATH'] = "/first_path:/second_path"
22
+ ENV['FAKE_GEM_PATHS'] = "/first_path:/second_path"
23
23
  FakeGem.paths.should == %w(/first_path /second_path)
24
24
 
25
25
  FakeGem.paths '.'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fake_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.13
4
+ version: 0.1.14
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-06 00:00:00 +04:00
13
+ date: 2011-08-07 00:00:00 +04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16