merb-gen 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -14,6 +14,7 @@ module Thor::Tasks
|
|
14
14
|
end
|
15
15
|
|
16
16
|
def dependency(name, *versions)
|
17
|
+
versions.pop if versions.last.is_a?(Hash)
|
17
18
|
@dependencies << [name, versions]
|
18
19
|
end
|
19
20
|
end
|
@@ -23,13 +24,14 @@ module Thor::Tasks
|
|
23
24
|
@idx.load_gems_in("gems/specifications")
|
24
25
|
|
25
26
|
@list.map do |name, versions|
|
26
|
-
dep =
|
27
|
-
|
27
|
+
dep = ::Gem::Dependency.new(name, versions)
|
28
|
+
spec = @idx.search(dep).last
|
29
|
+
unless spec
|
28
30
|
self.class.error "A required dependency #{dep} was not found"
|
29
31
|
self.class.rollback_trans
|
30
32
|
end
|
31
|
-
deps =
|
32
|
-
[
|
33
|
+
deps = spec.recursive_dependencies(dep, @idx)
|
34
|
+
[spec] + deps
|
33
35
|
end.flatten.uniq
|
34
36
|
end
|
35
37
|
|
@@ -68,6 +70,9 @@ module Thor::Tasks
|
|
68
70
|
|
69
71
|
private
|
70
72
|
def _install(dep)
|
73
|
+
@idx.load_gems_in("gems/specifications")
|
74
|
+
return if @idx.search(dep).last
|
75
|
+
|
71
76
|
installer = ::Gem::DependencyInstaller.new(
|
72
77
|
:bin_dir => Dir.pwd / "bin",
|
73
78
|
:install_dir => Dir.pwd / "gems",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb-gen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonas Nicklas
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-16 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 1.0.
|
23
|
+
version: 1.0.6
|
24
24
|
version:
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: templater
|