gem_require 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/lib/rubygems/commands/require_command.rb +16 -7
- metadata +24 -33
checksums.yaml
ADDED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
Y2IxYzNhNTYyNmMyNTA1MWQ3YTI5NmQ4Njc3NDM5YTllMDFmODk0OQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
MWMwZDhiNWRmNzliYzUyMzc3ZDJkNDJhOTkwNTMwZGU3YTFhNmRkOA==
|
7
|
+
!binary "U0hBNTEy":
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
OThkZWE0ZTUxOTcxYjg2MzUyMWMxMGE1M2EyNTkzNmI3NjlkZDkxZGZhNWNi
|
10
|
+
ZDMyNjVmNzA4NzU1YjdlYTMxYzlkNmI4YTQwYTI3OTY1NmU4Y2Y1MjNhMDhh
|
11
|
+
N2ZlMWUxNDVhY2U1NDg2MjUzOGI0MjE4MmFhMDgwMjEzNDE2Mjk=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
YTliYWE1N2FhYWFhZDljN2NjNGEwMmEyODJhMDVlNmVmMGM0NGFiNDU2Zjkx
|
14
|
+
OTMxZDM1NTJiZjhlNTg1MDViNmM4NGFkODY0MWE5YmZlMzg1YmViMzRmYmYz
|
15
|
+
NDc5Y2U3MDFkNjA4NWNkYWNmNTc0NmU5NDM2ODU5ZWRiZWIyNDY=
|
@@ -50,7 +50,7 @@ class Gem::Commands::RequireCommand < Gem::Command
|
|
50
50
|
|
51
51
|
def description # :nodoc:
|
52
52
|
<<-EOF
|
53
|
-
The require command checks whether the specified gems are installed,
|
53
|
+
The require command checks whether the specified gems are installed,
|
54
54
|
and installs them if necessary.
|
55
55
|
EOF
|
56
56
|
end
|
@@ -74,11 +74,11 @@ and installs them if necessary.
|
|
74
74
|
exit_code |= 2
|
75
75
|
end
|
76
76
|
end
|
77
|
-
|
77
|
+
|
78
78
|
exit(exit_code)
|
79
79
|
|
80
80
|
end
|
81
|
-
|
81
|
+
|
82
82
|
private
|
83
83
|
|
84
84
|
def require_gem(name, version, installer_options)
|
@@ -111,11 +111,20 @@ and installs them if necessary.
|
|
111
111
|
Gem.source_index.search(dependency).last
|
112
112
|
end
|
113
113
|
end
|
114
|
-
|
114
|
+
|
115
|
+
def matching_tuples(dependency)
|
116
|
+
fetcher = Gem::SpecFetcher.fetcher
|
117
|
+
if fetcher.respond_to?(:search_for_dependency)
|
118
|
+
fetcher.search_for_dependency(dependency).first
|
119
|
+
else
|
120
|
+
fetcher.fetch(dependency)
|
121
|
+
end
|
122
|
+
end
|
123
|
+
|
115
124
|
def latest_available_version_of(dependency)
|
116
|
-
|
125
|
+
matching_tuples(dependency).map { |x| x.first.version }.max
|
117
126
|
end
|
118
|
-
|
127
|
+
|
119
128
|
def install_gem(name, version, installer_options)
|
120
129
|
installer = Gem::DependencyInstaller.new(installer_options)
|
121
130
|
installer.install(name, version)
|
@@ -123,5 +132,5 @@ and installs them if necessary.
|
|
123
132
|
say "Installed #{spec.full_name}"
|
124
133
|
end
|
125
134
|
end
|
126
|
-
|
135
|
+
|
127
136
|
end
|
metadata
CHANGED
@@ -1,57 +1,48 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: gem_require
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
version: 0.2.0
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.3.0
|
6
5
|
platform: ruby
|
7
|
-
authors:
|
6
|
+
authors:
|
8
7
|
- Mike Williams
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
|
13
|
-
date: 2011-05-09 00:00:00 Z
|
11
|
+
date: 2013-02-28 00:00:00.000000000 Z
|
14
12
|
dependencies: []
|
13
|
+
description: ! 'This gem adds the `gem require` command. It''s almost identical to
|
14
|
+
`gem install`,
|
15
15
|
|
16
|
-
|
17
|
-
This gem adds the `gem require` command. It's almost identical to `gem install`,
|
18
|
-
except that it does nothing if the specified gem is already installed.
|
16
|
+
except that it does nothing if the specified gem is already installed.'
|
19
17
|
email: mdub@dogbiscuit.org
|
20
18
|
executables: []
|
21
|
-
|
22
19
|
extensions: []
|
23
|
-
|
24
20
|
extra_rdoc_files: []
|
25
|
-
|
26
|
-
files:
|
21
|
+
files:
|
27
22
|
- lib/rubygems/commands/require_command.rb
|
28
23
|
- lib/rubygems_plugin.rb
|
29
24
|
homepage: http://github.com/mdub/gem_require
|
30
25
|
licenses: []
|
31
|
-
|
26
|
+
metadata: {}
|
32
27
|
post_install_message:
|
33
28
|
rdoc_options: []
|
34
|
-
|
35
|
-
require_paths:
|
29
|
+
require_paths:
|
36
30
|
- lib
|
37
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: "0"
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - ! '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '0'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
49
41
|
requirements: []
|
50
|
-
|
51
42
|
rubyforge_project:
|
52
|
-
rubygems_version:
|
43
|
+
rubygems_version: 2.0.0
|
53
44
|
signing_key:
|
54
|
-
specification_version:
|
45
|
+
specification_version: 4
|
55
46
|
summary: Add the 'gem require' command
|
56
47
|
test_files: []
|
57
|
-
|
48
|
+
has_rdoc:
|