knife-sharp 0.4.4 → 0.4.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f1a5548924fee079df802660b4e9a9d1980386db
4
- data.tar.gz: c6f27200d24340b77a27570c95e73ee10c106d94
3
+ metadata.gz: b78ccd3e3e6bbc90de1f096bbacbabf3d0c425d0
4
+ data.tar.gz: d0c0aa39d3c612b4967af96edbe28b297ba3ac19
5
5
  SHA512:
6
- metadata.gz: 556242f0e8727b7e9bdbe5384265b2f3f12fcef57756cf978ae5de787b8a1ff4cf69ebadab5fa737d918d5748da5935765a4bacbe3852e04f77de08cedaa6ca0
7
- data.tar.gz: 16ac33df09b42e16d5796bf63e1d88a3093c67f48e5d75c2e9e7940c7afc64f8c310b635e385c280b3ab8c09e52a7b19b3d8be7e240364cc28e2f4f52239f6dc
6
+ metadata.gz: 3988ac9a8e7986a48000f517aba4d507dee19291a619fcb87db86cc82aa544be2bcd7a583661902650df9c226ad124613fde5ce066fc7c58748cfd134356d8f8
7
+ data.tar.gz: 0576546edf62936eb81209157f56d8dab59f4b0540d963e535a05ded5fbaa44587b421d25eba8b50799c01cd058f51ecab2e5c1dafe463a89abf68c0eca646c4
@@ -212,8 +212,8 @@ module KnifeSharp
212
212
  end
213
213
 
214
214
  ui.msg "* Uploading cookbook(s) #{@cookbooks.join(", ")}"
215
- uploader = Chef::CookbookUploader.new(cbs, @cb_path)
216
- uploader.upload_cookbooks
215
+ cookbook_uploader(cbs).upload_cookbooks
216
+
217
217
 
218
218
  if env.save
219
219
  cbs.each do |cb|
@@ -496,6 +496,13 @@ module KnifeSharp
496
496
  ui.error "Unable to notify via hubot."
497
497
  end
498
498
  end
499
- end
500
499
 
500
+ def cookbook_uploader(cookbooks)
501
+ if Gem::Version.new(Chef::VERSION).release >= Gem::Version.new('12.0.0')
502
+ uploader = Chef::CookbookUploader.new(cookbooks)
503
+ else
504
+ uploader = Chef::CookbookUploader.new(cookbooks, Chef::Config.cookbook_path)
505
+ end
506
+ end
507
+ end
501
508
  end
@@ -8,7 +8,6 @@ module KnifeSharp
8
8
  deps do
9
9
  require 'chef/cookbook/metadata'
10
10
  require 'chef/cookbook_loader'
11
- require 'chef/cookbook_uploader'
12
11
  end
13
12
 
14
13
  def run
@@ -24,7 +24,6 @@ module KnifeSharp
24
24
  deps do
25
25
  require 'chef/cookbook/metadata'
26
26
  require 'chef/cookbook_loader'
27
- require 'chef/cookbook_uploader'
28
27
  end
29
28
 
30
29
  def run()
data/lib/knife-sharp.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module KnifeSharp
2
- VERSION = "0.4.4"
2
+ VERSION = "0.4.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-sharp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nicolas Szalay
@@ -75,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.2.0
78
+ rubygems_version: 2.2.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Knife sharp plugin