fake_gem 0.1.15 → 0.1.16

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/bin/fake_gem +48 -4
  2. metadata +19 -30
  3. data/bin/fake_gem.rb +0 -43
data/bin/fake_gem CHANGED
@@ -1,5 +1,49 @@
1
- #!/bin/bash
1
+ #!/usr/bin/env ruby
2
2
 
3
- DIR="$( cd "$( dirname "$0" )" && pwd )"
4
- OUT=$($DIR/fake_gem.rb $*)
5
- $OUT
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 script below or add it to Your bash profile (usually ~/.profile)
45
+
46
+ export RUBYOPT="#{rubyopt}"
47
+ export FAKE_GEM_PATHS="#{fake_gem_paths}"
48
+
49
+ TEXT
metadata CHANGED
@@ -1,28 +1,23 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: fake_gem
3
- version: !ruby/object:Gem::Version
4
- version: 0.1.15
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.16
5
5
  prerelease:
6
6
  platform: ruby
7
- authors:
7
+ authors:
8
8
  - Alexey Petrushin
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-08-08 00:00:00 +04:00
14
- default_executable:
12
+ date: 2011-08-10 00:00:00.000000000Z
15
13
  dependencies: []
16
-
17
14
  description:
18
15
  email:
19
- executables:
16
+ executables:
20
17
  - fake_gem
21
18
  extensions: []
22
-
23
19
  extra_rdoc_files: []
24
-
25
- files:
20
+ files:
26
21
  - Rakefile
27
22
  - readme.md
28
23
  - lib/fake_gem.rb
@@ -36,34 +31,28 @@ files:
36
31
  - spec/fake_gem_spec/twice/saas/lib/the_saas.rb
37
32
  - spec/fake_gem_spec.rb
38
33
  - bin/fake_gem
39
- - bin/fake_gem.rb
40
- has_rdoc: true
41
34
  homepage: http://github.com/alexeypetrushin/fake_gem
42
35
  licenses: []
43
-
44
36
  post_install_message:
45
37
  rdoc_options: []
46
-
47
- require_paths:
38
+ require_paths:
48
39
  - lib
49
- required_ruby_version: !ruby/object:Gem::Requirement
40
+ required_ruby_version: !ruby/object:Gem::Requirement
50
41
  none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- version: "0"
55
- required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
47
  none: false
57
- requirements:
58
- - - ">="
59
- - !ruby/object:Gem::Version
60
- version: "0"
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
61
52
  requirements: []
62
-
63
53
  rubyforge_project:
64
- rubygems_version: 1.5.1
54
+ rubygems_version: 1.8.6
65
55
  signing_key:
66
56
  specification_version: 3
67
57
  summary: Makes any directory looks like Ruby Gem
68
58
  test_files: []
69
-
data/bin/fake_gem.rb DELETED
@@ -1,43 +0,0 @@
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}")