knife-github-cookbooks 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,10 +7,10 @@ Gem::Specification.new do |s|
7
7
  s.version = Knife::GithubCookbooks::VERSION
8
8
  s.platform = Gem::Platform::RUBY
9
9
  s.has_rdoc = false
10
- s.extra_rdoc_files = ["LICENSE" ]
10
+ s.extra_rdoc_files = ["LICENSE"]
11
11
  s.authors = ["Jesse Newland"]
12
12
  s.email = ["jesse@websterclay.com"]
13
- s.homepage = "https://github.com/websterclay/knife-github-cookbooks"
13
+ s.homepage = "https://github.com/nphase/knife-github-cookbooks"
14
14
  s.summary = %q{Github Cookbook installation support for Chef's Knife Command}
15
15
  s.description = s.summary
16
16
  s.files = `git ls-files`.split("\n")
@@ -141,7 +141,20 @@ class Chef
141
141
  end
142
142
 
143
143
  def sha
144
- @sha ||= noauth_rest.get_rest("http://github.com/api/v2/json/repos/show/#{@github_user}/#{@github_repo}/branches")['branches'][github_branch]
144
+ @sha ||= begin
145
+ data = nil
146
+ raise "Unable to find SHA checksum" unless ['heads','tags'].any? do |ref_type|
147
+ begin
148
+ data = noauth_rest.get_rest("https://api.github.com/repos/#{@github_user}/#{@github_repo}/git/refs/#{ref_type}/#{github_branch}")
149
+ ui.info("Found #{github_branch} amoung #{ref_type}.")
150
+ true
151
+ rescue
152
+ ui.info("Unable to find #{github_branch} amoung #{ref_type}.")
153
+ false
154
+ end
155
+ end
156
+ data['object']['sha']
157
+ end
145
158
  end
146
159
 
147
160
  def github_branch
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module GithubCookbooks
3
- VERSION = "0.1.5"
3
+ VERSION = "0.1.6"
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,65 +1,56 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: knife-github-cookbooks
3
- version: !ruby/object:Gem::Version
4
- hash: 17
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.6
5
5
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 5
10
- version: 0.1.5
11
6
  platform: ruby
12
- authors:
7
+ authors:
13
8
  - Jesse Newland
14
9
  autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
-
18
- date: 2011-06-10 00:00:00 -04:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
12
+ date: 2012-08-08 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
22
15
  name: launchy
23
- prerelease: false
24
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
25
17
  none: false
26
- requirements:
18
+ requirements:
27
19
  - - ~>
28
- - !ruby/object:Gem::Version
29
- hash: 15
30
- segments:
31
- - 0
32
- - 4
33
- - 0
20
+ - !ruby/object:Gem::Version
34
21
  version: 0.4.0
35
22
  type: :runtime
36
- version_requirements: *id001
37
- - !ruby/object:Gem::Dependency
38
- name: chef
39
23
  prerelease: false
40
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.4.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: chef
32
+ requirement: !ruby/object:Gem::Requirement
41
33
  none: false
42
- requirements:
34
+ requirements:
43
35
  - - ~>
44
- - !ruby/object:Gem::Version
45
- hash: 55
46
- segments:
47
- - 0
48
- - 10
49
- - 0
36
+ - !ruby/object:Gem::Version
50
37
  version: 0.10.0
51
38
  type: :runtime
52
- version_requirements: *id002
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 0.10.0
53
46
  description: Github Cookbook installation support for Chef's Knife Command
54
- email:
47
+ email:
55
48
  - jesse@websterclay.com
56
49
  executables: []
57
-
58
50
  extensions: []
59
-
60
- extra_rdoc_files:
51
+ extra_rdoc_files:
61
52
  - LICENSE
62
- files:
53
+ files:
63
54
  - .gitignore
64
55
  - LICENSE
65
56
  - README.md
@@ -68,39 +59,28 @@ files:
68
59
  - lib/chef/knife/cookbook_github_install.rb
69
60
  - lib/chef/knife/core/coobook_scm_repo_extensions.rb
70
61
  - lib/knife-github-cookbooks/version.rb
71
- has_rdoc: true
72
- homepage: https://github.com/websterclay/knife-github-cookbooks
62
+ homepage: https://github.com/nphase/knife-github-cookbooks
73
63
  licenses: []
74
-
75
64
  post_install_message:
76
65
  rdoc_options: []
77
-
78
- require_paths:
66
+ require_paths:
79
67
  - lib
80
- required_ruby_version: !ruby/object:Gem::Requirement
68
+ required_ruby_version: !ruby/object:Gem::Requirement
81
69
  none: false
82
- requirements:
83
- - - ">="
84
- - !ruby/object:Gem::Version
85
- hash: 3
86
- segments:
87
- - 0
88
- version: "0"
89
- required_rubygems_version: !ruby/object:Gem::Requirement
70
+ requirements:
71
+ - - ! '>='
72
+ - !ruby/object:Gem::Version
73
+ version: '0'
74
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
75
  none: false
91
- requirements:
92
- - - ">="
93
- - !ruby/object:Gem::Version
94
- hash: 3
95
- segments:
96
- - 0
97
- version: "0"
76
+ requirements:
77
+ - - ! '>='
78
+ - !ruby/object:Gem::Version
79
+ version: '0'
98
80
  requirements: []
99
-
100
81
  rubyforge_project:
101
- rubygems_version: 1.6.2
82
+ rubygems_version: 1.8.24
102
83
  signing_key:
103
84
  specification_version: 3
104
85
  summary: Github Cookbook installation support for Chef's Knife Command
105
86
  test_files: []
106
-