knife-supermarket 0.2.1 → 0.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8474981819bce841989f81880315cfda302b7a93
4
- data.tar.gz: 66872e5a548a8d94e415e2ae2d13ddadbd71fa67
3
+ metadata.gz: dbe81f168d581bc4dae8c8bd3338f8db49b1fe9c
4
+ data.tar.gz: d50acda261b2cfe4e7ae09a8380632ae4b481d91
5
5
  SHA512:
6
- metadata.gz: e29ed028e2a28e238d39501b871f93980980737fdd1e55beea1ad512c3de6b6830f689bced4ac2083fb11eb8faf27cd52aac2350e5300cf29b88070baff302a0
7
- data.tar.gz: ab5b5d0ba35d16cc7a0f70d3a51fbcaf7a024ea81d85141e3145ccbb7f73dfdf4af176815b02819e22ca927ecdb4ac923664df7c72b48785f7569c474a5a056b
6
+ metadata.gz: 0dcae880ccd5ec541a075f27ec2e166abd74f235bddfcae20437ea6bcb26f8459d3ab2babfc2f99cb35b56f2395499fd6c64d29ca64e791fc6178f8fe179da14
7
+ data.tar.gz: 4e5dbbe206c5815a3b741225b80e9b5902029ead5298eeb4bcac8d4b49b5a6812174098d3c874fb7c7fbc092dfab749809325aca6437bf80d892710ce87632e5
data/Gemfile ADDED
@@ -0,0 +1,2 @@
1
+ source "https://rubygems.org"
2
+ gemspec
data/README.md CHANGED
@@ -1,10 +1,15 @@
1
1
  # knife-supermarket
2
2
 
3
- This Knife Plugin is an easy way to switch between various supermarkets, the biggest of them being the Chef Community Site, located at [https://supermarket.getchef.com](https://supermarket.getchef.com). The `knife supermarket` commands mimic the `knife cookbook site` commands and work the same way.
3
+ This Knife Plugin is an easy way to switch between various supermarkets, the
4
+ biggest of them being the Chef Community Site, located at
5
+ [https://supermarket.chef.io](https://supermarket.chef.io). The `knife
6
+ supermarket` commands mimic the `knife cookbook site` commands and work the
7
+ same way.
4
8
 
5
9
  ## Installation
6
10
 
7
- If you are running [Chef-DK](http://www.getchef.com/downloads/chef-dk) you can install it by running:
11
+ If you are running [Chef-DK](https://downloads.chef.io/chef-dk/) you can
12
+ install it by running:
8
13
 
9
14
  $ chef gem install knife-supermarket
10
15
 
@@ -16,7 +21,8 @@ Depending on your system's configuration, you may need to run this command with
16
21
 
17
22
  ## Configuration
18
23
 
19
- Out of the box, knife-supermarket is configured to point at [https://supermarket.getchef.com](https://supermarket.getchef.com), but it can be configured to point at a supermarket that isn't the official one. To do this you can do this a few ways:
24
+ Out of the box, knife-supermarket is configured to point at [https://supermarket.chef.io](https://supermarket.chef.io), but it can be
25
+ configured to point at the unofficial supermarket. This can be done two ways:
20
26
 
21
27
  ### On The Command Line
22
28
 
@@ -24,12 +30,14 @@ When using the `knife supermarket` commands you can specify a `--supermarket-sit
24
30
 
25
31
  ### `knife.rb` Configuration
26
32
 
27
- It may be preferable to use have this setting default to another host. For that, we can set the `knife[:supermarket_site]` setting in our `knife.rb`. So if we wanted to default to a supermarket hosted at `https://franchise.somecompany.com` it would be:
33
+ It may be preferable to have this setting default to another host. For that, we can set the `knife[:supermarket_site]` setting in our `knife.rb`. So if we
34
+ wanted to default to a supermarket hosted at
35
+ `https://franchise.somecompany.com` it would be:
28
36
 
29
37
  knife[:supermarket_site] = 'https://franchise.somecompany.com'
30
38
 
31
39
  Now when you run `knife supermarket install mysql` it will install the mysql cookbook from `https://franchise.somecompany.com`.
32
40
 
33
41
  ## Subcommands
34
-
35
- The subcommands work the same way they for [knife cookbook site](http://docs.opscode.com/chef/knife.html#cookbook-site). Please see [http://docs.opscode.com/chef/knife.html#cookbook-site](http://docs.opscode.com/chef/knife.html#cookbook-site) for more information on the subcommands.
42
+ The subcommands work the same way they for [knife cookbook site](https://docs.chef.io/chef/knife.html#cookbook-site). Please see
43
+ <https://docs.chef.io/chef/knife.html#cookbook-site> for more information on the subcommands.
@@ -1,4 +1,4 @@
1
- #
1
+ #
2
2
  # Author:: Christopher Webber (<cwebber@getchef.com>)
3
3
  # Copyright:: Copyright (c) 2014 Chef Software, Inc.
4
4
  # License:: Apache License, Version 2.0
@@ -21,6 +21,9 @@ require 'chef/knife'
21
21
  class Chef
22
22
  class Knife
23
23
  class SupermarketDownload < Knife::CookbookSiteDownload
24
+ # Handle the subclassing (knife doesn't do this :()
25
+ dependency_loaders.concat(superclass.dependency_loaders)
26
+ options.merge!(superclass.options)
24
27
 
25
28
  banner "knife supermarket download COOKBOOK [VERSION] (options)"
26
29
  category "supermarket"
@@ -29,7 +32,7 @@ class Chef
29
32
  :short => '-m SUPERMARKET_SITE',
30
33
  :long => '--supermarket-site SUPERMARKET_SITE',
31
34
  :description => 'Supermarket Site',
32
- :default => 'https://supermarket.getchef.com',
35
+ :default => 'https://supermarket.chef.io',
33
36
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
34
37
 
35
38
  def cookbooks_api_url
@@ -17,16 +17,16 @@
17
17
  #
18
18
 
19
19
  require 'chef/knife'
20
- require 'shellwords'
21
20
 
22
21
  class Chef
23
22
  class Knife
24
23
  class SupermarketInstall < Knife::CookbookSiteInstall
24
+ # Handle the subclassing (knife doesn't do this :()
25
+ dependency_loaders.concat(superclass.dependency_loaders)
26
+ options.merge!(superclass.options)
25
27
 
26
28
  deps do
27
- require 'chef/mixin/shell_out'
28
- require 'chef/knife/core/cookbook_scm_repo'
29
- require 'chef/cookbook/metadata'
29
+ require 'chef/knife/supermarket_download'
30
30
  end
31
31
 
32
32
  banner "knife supermarket install COOKBOOK [VERSION] (options)"
@@ -36,7 +36,7 @@ class Chef
36
36
  :short => '-m SUPERMARKET_SITE',
37
37
  :long => '--supermarket-site SUPERMARKET_SITE',
38
38
  :description => 'Supermarket Site',
39
- :default => 'https://supermarket.getchef.com',
39
+ :default => 'https://supermarket.chef.io',
40
40
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
41
41
 
42
42
  def download_cookbook_to(download_path)
@@ -21,6 +21,9 @@ require 'chef/knife'
21
21
  class Chef
22
22
  class Knife
23
23
  class SupermarketList < Knife::CookbookSiteList
24
+ # Handle the subclassing (knife doesn't do this :()
25
+ dependency_loaders.concat(superclass.dependency_loaders)
26
+ options.merge!(superclass.options)
24
27
 
25
28
  banner "knife supermarket list (options)"
26
29
  category "supermarket"
@@ -29,7 +32,7 @@ class Chef
29
32
  :short => '-m SUPERMARKET_SITE',
30
33
  :long => '--supermarket-site SUPERMARKET_SITE',
31
34
  :description => 'Supermarket Site',
32
- :default => 'https://supermarket.getchef.com',
35
+ :default => 'https://supermarket.chef.io',
33
36
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
34
37
 
35
38
  def get_cookbook_list(items=10, start=0, cookbook_collection={})
@@ -29,7 +29,7 @@ class Chef
29
29
  :short => '-m SUPERMARKET_SITE',
30
30
  :long => '--supermarket-site SUPERMARKET_SITE',
31
31
  :description => 'Supermarket Site',
32
- :default => 'https://supermarket.getchef.com',
32
+ :default => 'https://supermarket.chef.io',
33
33
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
34
34
 
35
35
  def run
@@ -21,13 +21,15 @@ require 'chef/knife'
21
21
  class Chef
22
22
  class Knife
23
23
  class SupermarketShare < Knife::CookbookSiteShare
24
+ # Handle the subclassing (knife doesn't do this :()
25
+ dependency_loaders.concat(superclass.dependency_loaders)
26
+ options.merge!(superclass.options)
24
27
 
25
28
  banner "knife supermarket share COOKBOOK (options)"
26
29
  category "supermarket"
27
30
 
28
31
  deps do
29
- require 'chef/cookbook_loader'
30
- require 'chef/cookbook_uploader'
32
+ require 'chef/json_compat'
31
33
  require 'chef/cookbook_site_streaming_uploader'
32
34
  end
33
35
 
@@ -35,7 +37,7 @@ class Chef
35
37
  :short => '-m SUPERMARKET_SITE',
36
38
  :long => '--supermarket-site SUPERMARKET_SITE',
37
39
  :description => 'Supermarket Site',
38
- :default => 'https://supermarket.getchef.com',
40
+ :default => 'https://supermarket.chef.io',
39
41
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
40
42
 
41
43
  option :cookbook_path,
@@ -54,15 +56,15 @@ class Chef
54
56
  def do_upload(cookbook_filename, cookbook_category, user_id, user_secret_filename)
55
57
  uri = "#{config[:supermarket_site]}/api/v1/cookbooks"
56
58
 
57
- # Categories are optional both in knife cookbook site
59
+ # Categories are optional both in knife cookbook site
58
60
  # (which this plugin seeks to replace) and on the
59
61
  # Supermarket community site. Best practice now
60
62
  # seems to be to just omit the category entirely.
61
63
  #
62
- # see:
64
+ # see:
63
65
  # https://github.com/chef/supermarket/pull/915
64
66
  # https://github.com/chef/chef/pull/2198
65
-
67
+
66
68
  category_string = { 'category'=>'' }.to_json
67
69
 
68
70
  http_resp = Chef::CookbookSiteStreamingUploader.post(uri, user_id, user_secret_filename, {
@@ -21,6 +21,9 @@ require 'chef/knife'
21
21
  class Chef
22
22
  class Knife
23
23
  class SupermarketShow < Knife::CookbookSiteShow
24
+ # Handle the subclassing (knife doesn't do this :()
25
+ dependency_loaders.concat(superclass.dependency_loaders)
26
+ options.merge!(superclass.options)
24
27
 
25
28
  banner "knife supermarket show COOKBOOK [VERSION] (options)"
26
29
  category "supermarket"
@@ -29,7 +32,7 @@ class Chef
29
32
  :short => '-m SUPERMARKET_SITE',
30
33
  :long => '--supermarket-site SUPERMARKET_SITE',
31
34
  :description => 'Supermarket Site',
32
- :default => 'https://supermarket.getchef.com',
35
+ :default => 'https://supermarket.chef.io',
33
36
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
34
37
 
35
38
  def get_cookbook_data
@@ -33,7 +33,7 @@ class Chef
33
33
  :short => '-m SUPERMARKET_SITE',
34
34
  :long => '--supermarket-site SUPERMARKET_SITE',
35
35
  :description => 'Supermarket Site',
36
- :default => 'https://supermarket.getchef.com',
36
+ :default => 'https://supermarket.chef.io',
37
37
  :proc => Proc.new { |supermarket| Chef::Config[:knife][:supermarket_site] = supermarket }
38
38
 
39
39
  def run
@@ -1,6 +1,6 @@
1
1
  module Knife
2
2
  module Supermarket
3
- VERSION = '0.2.1'
3
+ VERSION = '0.2.2'
4
4
  MAJOR, MINOR, TINY = VERSION.split('.')
5
5
  end
6
6
  end
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Webber
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-01-22 00:00:00.000000000 Z
11
+ date: 2016-01-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: chef
@@ -32,6 +32,7 @@ extra_rdoc_files: []
32
32
  files:
33
33
  - ".gitignore"
34
34
  - CHANGELOG.md
35
+ - Gemfile
35
36
  - LICENSE
36
37
  - README.md
37
38
  - Rakefile
@@ -64,9 +65,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
65
  version: '0'
65
66
  requirements: []
66
67
  rubyforge_project:
67
- rubygems_version: 2.2.1
68
+ rubygems_version: 2.2.5
68
69
  signing_key:
69
70
  specification_version: 4
70
71
  summary: Knife support for interacting with Chef Supermarkets
71
72
  test_files: []
72
- has_rdoc: