fake_gem 0.1.14 → 0.1.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/bin/fake_gem +4 -46
  2. data/bin/fake_gem.rb +43 -0
  3. metadata +3 -2
data/bin/fake_gem CHANGED
@@ -1,47 +1,5 @@
1
- #!/usr/bin/env ruby
1
+ #!/bin/bash
2
2
 
3
- if ARGV.empty? or %w(-h --help help).any?{|k| ARGV.include? k}
4
- puts <<-TEXT
5
- fake_gem makes any directory looks like ruby gem.
6
-
7
- Usage:
8
- $ fake_gem ~/projects ~/other_projects
9
-
10
- Details:
11
- Let's suppose Your projects are located
12
- in the /my_projects dir, and there is 3 folders:
13
- ~/my_projects
14
- /app
15
- /lib1
16
- /lib2
17
-
18
- You want lib1 and lib2 to be available as a gems
19
- while You are developing Your app, do following steps:
20
- 1. mark lib1 as fake_gem:
21
- create /projects/lib/fake_gem file
22
- and add there following lines:
23
- name: lib1
24
- libs: lib
25
- 2. do the same for lib2
26
- 3. enable fake_gem in current bash session, type:
27
- $ fake_gem ~/projects
28
-
29
- All done, now lib1 and lib2 will be
30
- availiable as real gems in ruby scripts.
31
- TEXT
32
- exit
33
- end
34
-
35
- dir = File.expand_path("#{__FILE__}/../..")
36
-
37
- rubyopt = ENV['RUBYOPT'] || ""
38
- rubyopt = "#{rubyopt} -r#{dir}/lib/fake_gem.rb" unless rubyopt =~ /fake_gem/
39
-
40
- fake_gem_paths = (ENV['FAKE_GEM_PATHS'] || "").split(':')
41
- fake_gem_paths = (fake_gem_paths + ARGV).uniq.join(':')
42
-
43
- puts <<-TEXT
44
- Please execute following commands or add it to Your bash profile:
45
- export RUBYOPT="#{rubyopt}"
46
- export FAKE_GEM_PATHS="#{fake_gem_paths}"
47
- TEXT
3
+ DIR="$( cd "$( dirname "$0" )" && pwd )"
4
+ OUT=$($DIR/fake_gem.rb $*)
5
+ $OUT
data/bin/fake_gem.rb ADDED
@@ -0,0 +1,43 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ if ARGV.empty? or %w(-h --help help).any?{|k| ARGV.include? k}
4
+ puts <<-TEXT
5
+ fake_gem makes any directory looks like ruby gem.
6
+
7
+ Usage:
8
+ $ fake_gem ~/projects ~/other_projects
9
+
10
+ Details:
11
+ Let's suppose Your projects are located
12
+ in the /my_projects dir, and there is 3 folders:
13
+ ~/my_projects
14
+ /app
15
+ /lib1
16
+ /lib2
17
+
18
+ You want lib1 and lib2 to be available as a gems
19
+ while You are developing Your app, do following steps:
20
+ 1. mark lib1 as fake_gem:
21
+ create /projects/lib/fake_gem file
22
+ and add there following lines:
23
+ name: lib1
24
+ libs: lib
25
+ 2. do the same for lib2
26
+ 3. enable fake_gem in current bash session, type:
27
+ $ fake_gem ~/projects
28
+
29
+ All done, now lib1 and lib2 will be
30
+ availiable as real gems in ruby scripts.
31
+ TEXT
32
+ exit
33
+ end
34
+
35
+ dir = File.expand_path("#{__FILE__}/../..")
36
+
37
+ rubyopt = ENV['RUBYOPT'] || ""
38
+ rubyopt = "#{rubyopt} -r#{dir}/lib/fake_gem.rb" unless rubyopt =~ /fake_gem/
39
+
40
+ fake_gem_paths = (ENV['FAKE_GEM_PATHS'] || "").split(':')
41
+ fake_gem_paths = (fake_gem_paths + ARGV).uniq.join(':')
42
+
43
+ puts %(export RUBYOPT="#{rubyopt}"\nexport FAKE_GEM_PATHS="#{fake_gem_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.14
4
+ version: 0.1.15
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-07 00:00:00 +04:00
13
+ date: 2011-08-08 00:00:00 +04:00
14
14
  default_executable:
15
15
  dependencies: []
16
16
 
@@ -36,6 +36,7 @@ files:
36
36
  - spec/fake_gem_spec/twice/saas/lib/the_saas.rb
37
37
  - spec/fake_gem_spec.rb
38
38
  - bin/fake_gem
39
+ - bin/fake_gem.rb
39
40
  has_rdoc: true
40
41
  homepage: http://github.com/alexeypetrushin/fake_gem
41
42
  licenses: []