knife-supermarket 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/chef/knife/supermarket_share.rb +18 -2
- data/lib/knife-supermarket/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8474981819bce841989f81880315cfda302b7a93
|
4
|
+
data.tar.gz: 66872e5a548a8d94e415e2ae2d13ddadbd71fa67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e29ed028e2a28e238d39501b871f93980980737fdd1e55beea1ad512c3de6b6830f689bced4ac2083fb11eb8faf27cd52aac2350e5300cf29b88070baff302a0
|
7
|
+
data.tar.gz: ab5b5d0ba35d16cc7a0f70d3a51fbcaf7a024ea81d85141e3145ccbb7f73dfdf4af176815b02819e22ca927ecdb4ac923664df7c72b48785f7569c474a5a056b
|
data/CHANGELOG.md
CHANGED
@@ -22,7 +22,7 @@ class Chef
|
|
22
22
|
class Knife
|
23
23
|
class SupermarketShare < Knife::CookbookSiteShare
|
24
24
|
|
25
|
-
banner "knife supermarket share COOKBOOK
|
25
|
+
banner "knife supermarket share COOKBOOK (options)"
|
26
26
|
category "supermarket"
|
27
27
|
|
28
28
|
deps do
|
@@ -44,10 +44,26 @@ class Chef
|
|
44
44
|
:description => "A colon-separated path to look for cookbooks in",
|
45
45
|
:proc => lambda { |o| Chef::Config.cookbook_path = o.split(":") }
|
46
46
|
|
47
|
+
# since we subclass cookbook_site and it expects a category, pass a phantom empty category
|
48
|
+
# parameter before invoking Chef::Knife::CookbookSiteShare#run ...
|
49
|
+
# Tested on 11.16.4 and 12.0.3.
|
50
|
+
def run
|
51
|
+
@name_args << "" if @name_args.length == 1
|
52
|
+
super
|
53
|
+
end
|
47
54
|
def do_upload(cookbook_filename, cookbook_category, user_id, user_secret_filename)
|
48
55
|
uri = "#{config[:supermarket_site]}/api/v1/cookbooks"
|
49
56
|
|
50
|
-
|
57
|
+
# Categories are optional both in knife cookbook site
|
58
|
+
# (which this plugin seeks to replace) and on the
|
59
|
+
# Supermarket community site. Best practice now
|
60
|
+
# seems to be to just omit the category entirely.
|
61
|
+
#
|
62
|
+
# see:
|
63
|
+
# https://github.com/chef/supermarket/pull/915
|
64
|
+
# https://github.com/chef/chef/pull/2198
|
65
|
+
|
66
|
+
category_string = { 'category'=>'' }.to_json
|
51
67
|
|
52
68
|
http_resp = Chef::CookbookSiteStreamingUploader.post(uri, user_id, user_secret_filename, {
|
53
69
|
:tarball => File.open(cookbook_filename),
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: knife-supermarket
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher Webber
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-01-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: chef
|