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.
@@ -34,7 +34,7 @@ class ::Gem::Uninstaller
34
34
  yield
35
35
 
36
36
  class << Gem::DefaultUserInteraction.ui
37
- undef :say
37
+ remove_method :say
38
38
  end
39
39
  end
40
40
 
@@ -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 = @idx.find_name(name).last
27
- unless dep
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 = dep.recursive_dependencies(dep, @idx)
32
- [dep] + deps
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.5
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-15 00:00:00 -08:00
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.5
23
+ version: 1.0.6
24
24
  version:
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: templater