markbates-gem_tools 0.1.1 → 0.1.2
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.
- data/lib/gem_tools/gem_tools.rb +4 -8
- metadata +2 -2
data/lib/gem_tools/gem_tools.rb
CHANGED
@@ -60,12 +60,11 @@ module GemTools
|
|
60
60
|
gem_dash_y = "1.0" > Gem::RubyGemsVersion ? '-y' : ''
|
61
61
|
|
62
62
|
gems.each do |gem|
|
63
|
-
spec, loaded, version = check_gem(gem_command, gem['name'], gem['version'])
|
64
63
|
# if forced
|
65
64
|
# or the spec version doesn't match the required version
|
66
65
|
# or require_gem returns false
|
67
66
|
# (return false also happens if the gem has already been loaded)
|
68
|
-
if OPTIONS.has_key?(:force) || !
|
67
|
+
if OPTIONS.has_key?(:force) || !check_gem(gem_command, gem['name'], gem['version'])
|
69
68
|
gem_config = gem['config'] ? " -- #{gem['config']}" : ''
|
70
69
|
source = gem['source'] || config['source'] || nil
|
71
70
|
source = "--source #{source}" if source
|
@@ -80,14 +79,11 @@ module GemTools
|
|
80
79
|
end
|
81
80
|
|
82
81
|
def check_gem(command, name, version='')
|
83
|
-
spec = YAML.load(`#{command} spec #{name} 2> /dev/null`)
|
84
|
-
loaded = false
|
85
82
|
begin
|
86
|
-
|
87
|
-
|
88
|
-
rescue Exception
|
83
|
+
return gem(name, version)
|
84
|
+
rescue Exception => e
|
89
85
|
end
|
90
|
-
|
86
|
+
return false
|
91
87
|
end
|
92
88
|
|
93
89
|
def load_gems
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: markbates-gem_tools
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Moen
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-02-
|
12
|
+
date: 2009-02-03 00:00:00 -08:00
|
13
13
|
default_executable: gemtools
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|