gemtronics 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gemtronics/manager.rb +27 -0
- metadata +2 -2
data/lib/gemtronics/manager.rb
CHANGED
@@ -36,6 +36,33 @@ module Gemtronics
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
# Adds support for WarpDrives within Gemtronics:
|
40
|
+
#
|
41
|
+
# Example:
|
42
|
+
# warp_drive('authenticator', :version => '1.0.1')
|
43
|
+
#
|
44
|
+
# This will add the WarpDrive gem to the list, and then
|
45
|
+
# load the WarpDrive's gemtronics file.
|
46
|
+
#
|
47
|
+
# http://github.com/markbates/warp_drive
|
48
|
+
def warp_drive(name, options = {})
|
49
|
+
options = {:load => false}.merge(options)
|
50
|
+
group(:warp_drives) {|g| g.add(name, options)}
|
51
|
+
begin
|
52
|
+
find_and_require_gem(name)
|
53
|
+
load(WarpDrive::Path.config.gemtronics.rb)
|
54
|
+
rescue Exception => e
|
55
|
+
if e.message.match(/Could not find RubyGem #{name}/)
|
56
|
+
cmd = find(name).install_command
|
57
|
+
puts cmd
|
58
|
+
system cmd
|
59
|
+
Gem.clear_paths
|
60
|
+
find_and_require_gem(name)
|
61
|
+
load(WarpDrive::Path.config.gemtronics.rb)
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
39
66
|
# Aliases one gem group to another group.
|
40
67
|
#
|
41
68
|
# Example:
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemtronics
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- markbates
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-10-07 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|