cookbook-omnifetch 0.8.0 → 0.8.1

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
- SHA1:
3
- metadata.gz: 43c39456987fef3b32d9b037565804e5293bd8ed
4
- data.tar.gz: 776b3865d04123606bdafb1f4f7c7412b993724b
2
+ SHA256:
3
+ metadata.gz: 9d885dea1d6f27e93aa303376a7caddd2725945daff18a30c07da8a98bebc5bd
4
+ data.tar.gz: ca7bde1e963ce293d9f04d2fc3f09dc07fb76d33c4a014998d92bbb9faf08500
5
5
  SHA512:
6
- metadata.gz: 1dea15259b08c5de8a97f111c103f9f8a54d6ad6499806c4659b9870f6b73fb587a57b1297d1fb52faa146904b643e698f18572c393f7fd2c334b3f71484d9b2
7
- data.tar.gz: 1005b451253f385241b319c7601f7bb2594502c712d7583f0c92761836acdda45dde4a027aafd303d6a730fa344ece4fb8276bcad1fbec58d6b2d07bda6d5e14
6
+ metadata.gz: 32cb4fc4f4af6122720bb3bd3e4e8841f526c237a70b44041d38025eaefebcfaf1e7c79e078972d8908349fef2bdca8c94a49f3e231b66dd31efd5fca73c7899
7
+ data.tar.gz: ea541a9ca6d65c6ca4d50865fcf6b7ee975f04e4bf644d062cf6f35a54a7eba9adc76b90bb694c14045513813138478f3c3ac47f06610c5e9a289dc5d4bbc238
@@ -30,7 +30,7 @@ module CookbookOmnifetch
30
30
  #
31
31
  # @return [~BaseLocation, nil]
32
32
  def self.init(dependency, options = {})
33
- if klass = klass_from_options(options)
33
+ if klass = klass_from_options(options) # rubocop: disable Lint/AssignmentInCondition
34
34
  klass.new(dependency, options)
35
35
  else
36
36
  nil
@@ -135,7 +135,7 @@ module CookbookOmnifetch
135
135
  #
136
136
  # @return [Boolean]
137
137
  def self.cookbook?(path)
138
- File.exists?(File.join(path, "metadata.json")) || File.exists?(File.join(path, "metadata.rb"))
138
+ File.exist?(File.join(path, "metadata.json")) || File.exist?(File.join(path, "metadata.rb"))
139
139
  end
140
140
 
141
141
  class << self
@@ -23,7 +23,7 @@ module CookbookOmnifetch
23
23
 
24
24
  def files(&block)
25
25
  FILE_TYPES.each do |type|
26
- next unless @metadata.has_key?(type.to_s)
26
+ next unless @metadata.key?(type.to_s)
27
27
 
28
28
  @metadata[type.to_s].each do |file|
29
29
  yield file["url"], file["path"]
@@ -1,3 +1,3 @@
1
1
  module CookbookOmnifetch
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cookbook-omnifetch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -13,22 +13,28 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2017-11-06 00:00:00.000000000 Z
16
+ date: 2019-03-18 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: mixlib-archive
20
20
  requirement: !ruby/object:Gem::Requirement
21
21
  requirements:
22
- - - "~>"
22
+ - - ">="
23
23
  - !ruby/object:Gem::Version
24
24
  version: '0.4'
25
+ - - "<"
26
+ - !ruby/object:Gem::Version
27
+ version: '2.0'
25
28
  type: :runtime
26
29
  prerelease: false
27
30
  version_requirements: !ruby/object:Gem::Requirement
28
31
  requirements:
29
- - - "~>"
32
+ - - ">="
30
33
  - !ruby/object:Gem::Version
31
34
  version: '0.4'
35
+ - - "<"
36
+ - !ruby/object:Gem::Version
37
+ version: '2.0'
32
38
  - !ruby/object:Gem::Dependency
33
39
  name: rake
34
40
  requirement: !ruby/object:Gem::Requirement
@@ -64,19 +70,12 @@ email:
64
70
  - michael.ivey@riotgames.com
65
71
  - justin@justincampbell.me
66
72
  - sethvargo@gmail.com
67
- - dan@getchef.com
73
+ - dan@chef.io
68
74
  executables: []
69
75
  extensions: []
70
76
  extra_rdoc_files: []
71
77
  files:
72
- - ".gitignore"
73
- - ".rspec"
74
- - ".travis.yml"
75
- - Gemfile
76
78
  - LICENSE
77
- - README.md
78
- - Rakefile
79
- - cookbook-omnifetch.gemspec
80
79
  - lib/cookbook-omnifetch.rb
81
80
  - lib/cookbook-omnifetch/artifactory.rb
82
81
  - lib/cookbook-omnifetch/artifactserver.rb
@@ -91,29 +90,9 @@ files:
91
90
  - lib/cookbook-omnifetch/path.rb
92
91
  - lib/cookbook-omnifetch/threaded_job_queue.rb
93
92
  - lib/cookbook-omnifetch/version.rb
94
- - spec/fixtures/cookbooks/example_cookbook-0.5.0/README.md
95
- - spec/fixtures/cookbooks/example_cookbook-0.5.0/metadata.rb
96
- - spec/fixtures/cookbooks/example_cookbook-0.5.0/recipes/default.rb
97
- - spec/fixtures/cookbooks/example_cookbook/.gitignore
98
- - spec/fixtures/cookbooks/example_cookbook/.kitchen.yml
99
- - spec/fixtures/cookbooks/example_cookbook/Berksfile
100
- - spec/fixtures/cookbooks/example_cookbook/Berksfile.lock
101
- - spec/fixtures/cookbooks/example_cookbook/README.md
102
- - spec/fixtures/cookbooks/example_cookbook/metadata.rb
103
- - spec/fixtures/cookbooks/example_cookbook/recipes/default.rb
104
- - spec/spec_helper.rb
105
- - spec/unit/artifactory_spec.rb
106
- - spec/unit/artifactserver_spec.rb
107
- - spec/unit/base_spec.rb
108
- - spec/unit/chef_server_artifact_spec.rb
109
- - spec/unit/chef_server_spec.rb
110
- - spec/unit/exceptions_spec.rb
111
- - spec/unit/git_spec.rb
112
- - spec/unit/metadata_based_installer_spec.rb
113
- - spec/unit/path_spec.rb
114
- homepage: http://www.getchef.com/
93
+ homepage: https://github.com/chef/cookbook-omnifetch
115
94
  licenses:
116
- - Apache 2.0
95
+ - Apache-2.0
117
96
  metadata: {}
118
97
  post_install_message:
119
98
  rdoc_options: []
@@ -130,30 +109,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
130
109
  - !ruby/object:Gem::Version
131
110
  version: '0'
132
111
  requirements: []
133
- rubyforge_project:
134
- rubygems_version: 2.6.13
112
+ rubygems_version: 3.0.3
135
113
  signing_key:
136
114
  specification_version: 4
137
115
  summary: Library code to fetch Chef cookbooks from a variety of sources to a local
138
116
  cache
139
- test_files:
140
- - spec/fixtures/cookbooks/example_cookbook-0.5.0/README.md
141
- - spec/fixtures/cookbooks/example_cookbook-0.5.0/metadata.rb
142
- - spec/fixtures/cookbooks/example_cookbook-0.5.0/recipes/default.rb
143
- - spec/fixtures/cookbooks/example_cookbook/.gitignore
144
- - spec/fixtures/cookbooks/example_cookbook/.kitchen.yml
145
- - spec/fixtures/cookbooks/example_cookbook/Berksfile
146
- - spec/fixtures/cookbooks/example_cookbook/Berksfile.lock
147
- - spec/fixtures/cookbooks/example_cookbook/README.md
148
- - spec/fixtures/cookbooks/example_cookbook/metadata.rb
149
- - spec/fixtures/cookbooks/example_cookbook/recipes/default.rb
150
- - spec/spec_helper.rb
151
- - spec/unit/artifactory_spec.rb
152
- - spec/unit/artifactserver_spec.rb
153
- - spec/unit/base_spec.rb
154
- - spec/unit/chef_server_artifact_spec.rb
155
- - spec/unit/chef_server_spec.rb
156
- - spec/unit/exceptions_spec.rb
157
- - spec/unit/git_spec.rb
158
- - spec/unit/metadata_based_installer_spec.rb
159
- - spec/unit/path_spec.rb
117
+ test_files: []
data/.gitignore DELETED
@@ -1,23 +0,0 @@
1
- *.gem
2
- *.rbc
3
- .bundle
4
- .config
5
- .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
10
- doc/
11
- lib/bundler/man
12
- pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
18
- *.bundle
19
- *.so
20
- *.o
21
- *.a
22
- mkmf.log
23
- .idea/*
data/.rspec DELETED
@@ -1 +0,0 @@
1
- -c -f documentation
@@ -1,11 +0,0 @@
1
- branches:
2
- only:
3
- master
4
-
5
- language: ruby
6
- rvm:
7
- - 2.2
8
- - 2.3.3
9
- - 2.4.1
10
- before_install: gem install bundler -v 1.14.6
11
- script: bundle exec rake ci
data/Gemfile DELETED
@@ -1,8 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec
4
-
5
- group :development, :test do
6
- gem "minitar"
7
- gem "chefstyle"
8
- end
data/README.md DELETED
@@ -1,90 +0,0 @@
1
- # CookbookOmnifetch
2
-
3
- `CookbookOmnifetch` provides library code for fetching Chef cookbooks
4
- from an artifact server (usually https://supermarket.chef.io),
5
- git/github, a local path, or a chef-server to a local cache for
6
- developement.
7
-
8
- ## Installation
9
-
10
- Add this line to your application's Gemfile:
11
-
12
- gem 'cookbook-omnifetch'
13
-
14
- And then execute:
15
-
16
- $ bundle
17
-
18
- Or install it yourself as:
19
-
20
- $ gem install cookbook-omnifetch
21
-
22
- ## Usage
23
-
24
- #### Inject Dependencies and Configure
25
-
26
- Cookbook Omnifetch is designed to work with utilities from both the
27
- Berkshelf and Chef Software ecosystems, so you have to configure it
28
- before you can use it. In ChefDK, we do this:
29
-
30
- ```ruby
31
- # Configure CookbookOmnifetch's dependency injection settings to use our classes and config.
32
- CookbookOmnifetch.configure do |c|
33
- c.cache_path = File.expand_path('~/.chefdk/cache')
34
- c.storage_path = Pathname.new(File.expand_path('~/.chefdk/cache/cookbooks'))
35
- c.shell_out_class = ChefDK::ShellOut
36
- c.cached_cookbook_class = ChefDK::CookbookMetadata
37
- end
38
- ```
39
-
40
- #### Fetching Cookbooks
41
-
42
- To download a cookbook:
43
-
44
- ```ruby
45
- fetcher = CookbookOmnifetch.init(dependency, source_options)
46
- fetcher.install
47
- ```
48
-
49
- To specify the cookbook you want, you give CookbookOmnifetch a
50
- dependency object that responds to `#name` and `#version_constraint`,
51
- e.g.:
52
-
53
- ```ruby
54
- require 'semverse'
55
-
56
- Dependency = Struct.new(:name, :version_constraint)
57
-
58
- my_dep = Dependency.new("apache2", Semverse::Constraint.new("~> 1.0"))
59
- ```
60
-
61
- The source options for the cookbook are given as a Hash; the keys and
62
- values vary based on the kind of storage location. As with Bundler's
63
- `gem` options, one key specifies the type of upstream service for the
64
- cookbook while other keys specify other options specific to that type.
65
- For example:
66
-
67
- ```ruby
68
- CookbookOmnifetch.init(dependency, artifact_server: "https://supermarket.chef.io/api/v1/cookbooks/apache2/versions/3.0.1/download")
69
- CookbookOmnifetch.init(dependency, git: "git@github.com:svanzoest/apache2-cookbook.git", tag: "v3.0.1")
70
- CookbookOmnifetch.init(dependency, github: "svanzoest/apache2-cookbook", tag: "v3.0.1")
71
- CookbookOmnifetch.init(dependency, path: "~/chef-cookbooks/apache2")
72
- ```
73
-
74
- ## Contributing
75
-
76
- For information on contributing to this project, see https://github.com/chef/chef/blob/master/CONTRIBUTING.md
77
-
78
- After that:
79
-
80
- 1. Fork it
81
- 2. Create your feature branch (`git checkout -b my-new-feature`)
82
- 3. Commit your changes (`git commit -asm 'Add some feature'`)
83
- 4. Push to the branch (`git push origin my-new-feature`)
84
- 5. Create a new Pull Request
85
-
86
- ## Thanks
87
-
88
- This code was initially extracted from Berkshelf. Thanks to the
89
- Berkshelf core teams and contributors.
90
-
data/Rakefile DELETED
@@ -1,19 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
7
-
8
- desc "Run tests for Travis CI"
9
- task ci: [:style, :spec]
10
-
11
- begin
12
- require "chefstyle"
13
- require "rubocop/rake_task"
14
- RuboCop::RakeTask.new(:style) do |task|
15
- task.options += ["--display-cop-names", "--no-color"]
16
- end
17
- rescue LoadError
18
- puts "chefstyle/rubocop is not available. gem install chefstyle to do style checking."
19
- end
@@ -1,39 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "cookbook-omnifetch/version"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "cookbook-omnifetch"
8
- spec.version = CookbookOmnifetch::VERSION
9
- spec.authors = [
10
- "Jamie Winsor",
11
- "Josiah Kiehl",
12
- "Michael Ivey",
13
- "Justin Campbell",
14
- "Seth Vargo",
15
- "Daniel DeLeo",
16
- ]
17
- spec.email = [
18
- "jamie@vialstudios.com",
19
- "jkiehl@riotgames.com",
20
- "michael.ivey@riotgames.com",
21
- "justin@justincampbell.me",
22
- "sethvargo@gmail.com",
23
- "dan@getchef.com",
24
- ]
25
- spec.summary = %q{Library code to fetch Chef cookbooks from a variety of sources to a local cache}
26
- spec.homepage = "http://www.getchef.com/"
27
- spec.license = "Apache 2.0"
28
-
29
- spec.files = `git ls-files -z`.split("\x0")
30
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
31
- spec.test_files = spec.files.grep(%r{^spec/})
32
- spec.require_paths = ["lib"]
33
-
34
- spec.add_dependency "mixlib-archive", "~> 0.4"
35
-
36
- spec.add_development_dependency "rake"
37
- spec.add_development_dependency "rspec", "~> 3.0"
38
-
39
- end
@@ -1,12 +0,0 @@
1
- Description
2
- ===========
3
-
4
- Requirements
5
- ============
6
-
7
- Attributes
8
- ==========
9
-
10
- Usage
11
- =====
12
-
@@ -1,3 +0,0 @@
1
- name "example_cookbook"
2
- maintainer "Berkshelf Core"
3
- version "0.5.0"
@@ -1,8 +0,0 @@
1
- #
2
- # Cookbook Name:: example_cookbook
3
- # Recipe:: default
4
- #
5
- # Copyright 2012, YOUR_COMPANY_NAME
6
- #
7
- # All rights reserved - Do Not Redistribute
8
- #
@@ -1,2 +0,0 @@
1
- .kitchen/
2
- .kitchen.local.yml
@@ -1,26 +0,0 @@
1
- ---
2
- driver_plugin: vagrant
3
-
4
- platforms:
5
- - name: ubuntu-12.04
6
- driver_config:
7
- box: canonical-ubuntu-12.04
8
- box_url: http://cloud-images.ubuntu.com/vagrant/precise/current/precise-server-cloudimg-amd64-vagrant-disk1.box
9
- require_chef_omnibus: true
10
- - name: ubuntu-10.04
11
- driver_config:
12
- box: opscode-ubuntu-10.04
13
- box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-10.04_chef-11.2.0.box
14
- - name: centos-6.3
15
- driver_config:
16
- box: opscode-centos-6.3
17
- box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-6.3_chef-11.2.0.box
18
- - name: centos-5.8
19
- driver_config:
20
- box: opscode-centos-5.8
21
- box_url: http://opscode-vm.s3.amazonaws.com/vagrant/opscode_centos-5.8_chef-11.2.0.box
22
-
23
- suites:
24
- - name: default
25
- run_list: []
26
- attributes: {}
@@ -1 +0,0 @@
1
- site :opscode
@@ -1,3 +0,0 @@
1
- DEPENDENCIES
2
-
3
- GRAPH
@@ -1,12 +0,0 @@
1
- Description
2
- ===========
3
-
4
- Requirements
5
- ============
6
-
7
- Attributes
8
- ==========
9
-
10
- Usage
11
- =====
12
-