require 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
- if overwrite_version || gem.version
128
- Kernel.send :gem, name.to_s, overwrite_version || gem.version
129
- else
130
- Kernel.send :gem, name.to_s
131
- end
132
- if overwrite_dsl || gem.dsl
133
- (overwrite_dsl || gem.dsl).all(:require).each do |dsl|
134
- require! dsl.path
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
@@ -11,7 +11,7 @@ Require do
11
11
  name 'require'
12
12
  homepage "http://github.com/winton/#{name}"
13
13
  summary "Manage your project's dependencies with a pretty DSL"
14
- version '0.2.4'
14
+ version '0.2.5'
15
15
  end
16
16
 
17
17
  rakefile do
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
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-03 00:00:00 -08:00
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
Binary file