require 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/require.rb +16 -8
- data/require.rb +1 -1
- metadata +2 -3
- data/pkg/require-0.2.3.gem +0 -0
data/lib/require.rb
CHANGED
@@ -124,14 +124,22 @@ class Require
|
|
124
124
|
def require_gem!(name, overwrite_version=nil, overwrite_dsl=nil)
|
125
125
|
gem = get(:gem, name)
|
126
126
|
if gem
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
134
|
-
require
|
127
|
+
begin
|
128
|
+
if overwrite_version || gem.version
|
129
|
+
Kernel.send :gem, name.to_s, overwrite_version || gem.version
|
130
|
+
else
|
131
|
+
Kernel.send :gem, name.to_s
|
132
|
+
end
|
133
|
+
if overwrite_dsl || gem.dsl
|
134
|
+
(overwrite_dsl || gem.dsl).all(:require).each do |dsl|
|
135
|
+
require! dsl.path
|
136
|
+
end
|
137
|
+
end
|
138
|
+
rescue Exception => e
|
139
|
+
if overwrite_version || gem.version
|
140
|
+
$stdout.puts "Gem #{name} (#{overwrite_version || gem.version}) could not be activated"
|
141
|
+
else
|
142
|
+
$stdout.puts "Gem #{name} could not be activated"
|
135
143
|
end
|
136
144
|
end
|
137
145
|
end
|
data/require.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: require
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Winton Welsh
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-03-
|
12
|
+
date: 2010-03-10 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -28,7 +28,6 @@ files:
|
|
28
28
|
- lib/require/tasks.rb
|
29
29
|
- lib/require.rb
|
30
30
|
- MIT-LICENSE
|
31
|
-
- pkg/require-0.2.3.gem
|
32
31
|
- Rakefile
|
33
32
|
- README.markdown
|
34
33
|
- require.rb
|
data/pkg/require-0.2.3.gem
DELETED
Binary file
|