cuken 0.1.10 → 0.1.11

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.10
1
+ 0.1.11
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cuken}
8
- s.version = "0.1.10"
8
+ s.version = "0.1.11"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Hedgehog"]
@@ -26,6 +26,13 @@ Feature: Cookbook Validity
26
26
  Then the local Site-Cookbook repository exists
27
27
  And the local Site-Cookbook "hosts" exists
28
28
 
29
+ Scenario: Clone non-existant Cookbooks from a Cookbooks URI
30
+ Given the remote Cookbooks URI "git://github.com/cookbooks/"
31
+ When I clone the Cookbooks:
32
+ | cookbook | branch | tag | ref | destination |
33
+ | hfgrt | | 37s.0.1.0 | | ckbk/scratch/myapp/cookbooks/hosts3 |
34
+ Then the output should contain "Could not find Repository cookbooks/hfgrt"
35
+
29
36
  Scenario: Clone multiple Cookbooks from a Cookbooks URI
30
37
  Given the remote Cookbooks URI "git://github.com/cookbooks/"
31
38
  When I clone the Cookbooks:
@@ -43,6 +43,12 @@ module ::Cuken
43
43
  end
44
44
  end
45
45
 
46
+ def clone_pull_error_check(repo, res)
47
+ if res[/Could not find Repository /]
48
+ raise RuntimeError, "Could not find Cookbook in Repository #{repo}", caller
49
+ end
50
+ end
51
+
46
52
  def chef_clone_repo(ckbk_path, cookbook = false, repo = chef.remote_chef_repo, type = {'branch' => 'master'})
47
53
  in_current_dir do
48
54
  pth = Pathname(ckbk_path).expand_path
@@ -59,6 +65,7 @@ module ::Cuken
59
65
  announce_or_puts "Cloning: #{repo} into #{pth}"
60
66
  res = gritty.clone(clone_opts, repo, pth.to_s)
61
67
  end
68
+ clone_pull_error_check(repo, res) if res
62
69
  update_cookbook_paths(pth, cookbook)
63
70
  unless chef.cookbooks_paths.empty? # is empty after cloning default chef-repo
64
71
  grotty = ::Grit::Git.new((pth + '.git').to_s)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: cuken
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.10
5
+ version: 0.1.11
6
6
  platform: ruby
7
7
  authors:
8
8
  - Hedgehog
@@ -656,7 +656,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
656
656
  requirements:
657
657
  - - ">="
658
658
  - !ruby/object:Gem::Version
659
- hash: -3241898451513143532
659
+ hash: 1919764971976983115
660
660
  segments:
661
661
  - 0
662
662
  version: "0"