cookbook-omnifetch 0.8.1 → 0.9.0

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
  SHA256:
3
- metadata.gz: 9d885dea1d6f27e93aa303376a7caddd2725945daff18a30c07da8a98bebc5bd
4
- data.tar.gz: ca7bde1e963ce293d9f04d2fc3f09dc07fb76d33c4a014998d92bbb9faf08500
3
+ metadata.gz: c776e06270962068025639cf40aa13a8bf2314d955a7ffb6a2eb5c70adaf3b2f
4
+ data.tar.gz: 4cdcf27b72e5f78c844f0bfe76bffb2d0b2f28994cb9cce4d73acaf75b8267f0
5
5
  SHA512:
6
- metadata.gz: 32cb4fc4f4af6122720bb3bd3e4e8841f526c237a70b44041d38025eaefebcfaf1e7c79e078972d8908349fef2bdca8c94a49f3e231b66dd31efd5fca73c7899
7
- data.tar.gz: ea541a9ca6d65c6ca4d50865fcf6b7ee975f04e4bf644d062cf6f35a54a7eba9adc76b90bb694c14045513813138478f3c3ac47f06610c5e9a289dc5d4bbc238
6
+ metadata.gz: 251ea1a319078be708323b242db7dad3dfc2a857c9d4991377bf05a7242837842b6e618d119b5cf1bbc4cbd854a9ae7057850fcc8396944218df0b3ae9d22eb1
7
+ data.tar.gz: f78bf50440d50ae17afc3e322750e8e0bea9dc0a1b75c0b44bb9605148a8cfe0fb7e4a21b65192d2e09c7869f34f1e3f7a58003ca8f1c492585b6110abb70715
@@ -15,7 +15,12 @@ module CookbookOmnifetch
15
15
  super
16
16
  @uri ||= options[:artifactory]
17
17
  @cookbook_version = options[:version]
18
- @http_client = options[:http_client]
18
+ if options[:http_client]
19
+ @http_client = options[:http_client]
20
+ else
21
+ headers = { "X-Jfrog-Art-API" => Chef::Config.artifactory_api_key || ENV["ARTIFACTORY_API_KEY"] }
22
+ @http_client = Chef::HTTP::Simple.new(uri, headers: headers)
23
+ end
19
24
  end
20
25
 
21
26
  def repo_host
@@ -93,13 +98,13 @@ module CookbookOmnifetch
93
98
  "#to_lock must be implemented on #{self.class.name}!"
94
99
  end
95
100
 
96
- # The path where all pristine tarballs from an artifactserver are held.
101
+ # The path where all pristine tarballs from an artifactory are held.
97
102
  # Tarballs are moved/swapped into this location once they have been staged
98
103
  # in a co-located staging directory.
99
104
  #
100
105
  # @return [Pathname]
101
106
  def cache_root
102
- Pathname.new(CookbookOmnifetch.cache_path).join(".cache", "artifactserver")
107
+ Pathname.new(CookbookOmnifetch.cache_path).join(".cache", "artifactory")
103
108
  end
104
109
 
105
110
  # The path where tarballs are downloaded to and unzipped. On certain platforms
@@ -113,7 +118,7 @@ module CookbookOmnifetch
113
118
  #
114
119
  # @return [Pathname]
115
120
  def staging_root
116
- Pathname.new(CookbookOmnifetch.cache_path).join(".cache_tmp", "artifactserver")
121
+ Pathname.new(CookbookOmnifetch.cache_path).join(".cache_tmp", "artifactory")
117
122
  end
118
123
 
119
124
  # The path where the pristine tarball is cached
@@ -5,17 +5,17 @@ module CookbookOmnifetch
5
5
  class MetadataBasedInstaller
6
6
  class CookbookMetadata
7
7
 
8
- FILE_TYPES = [
9
- :resources,
10
- :providers,
11
- :recipes,
12
- :definitions,
13
- :libraries,
14
- :attributes,
15
- :files,
16
- :templates,
17
- :root_files,
18
- ].freeze
8
+ FILE_TYPES = %i{
9
+ resources
10
+ providers
11
+ recipes
12
+ definitions
13
+ libraries
14
+ attributes
15
+ files
16
+ templates
17
+ root_files
18
+ }.freeze
19
19
 
20
20
  def initialize(metadata)
21
21
  @metadata = metadata
@@ -40,7 +40,7 @@ module CookbookOmnifetch
40
40
  end
41
41
  end
42
42
  workers.each { |worker| self << Thread.method(:exit) }
43
- workers.each { |worker| worker.join }
43
+ workers.each(&:join)
44
44
  end
45
45
  end
46
46
  end
@@ -1,3 +1,3 @@
1
1
  module CookbookOmnifetch
2
- VERSION = "0.8.1".freeze
2
+ VERSION = "0.9.0".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.1
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -13,7 +13,7 @@ authors:
13
13
  autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
- date: 2019-03-18 00:00:00.000000000 Z
16
+ date: 2019-07-09 00:00:00.000000000 Z
17
17
  dependencies:
18
18
  - !ruby/object:Gem::Dependency
19
19
  name: mixlib-archive
@@ -35,34 +35,6 @@ dependencies:
35
35
  - - "<"
36
36
  - !ruby/object:Gem::Version
37
37
  version: '2.0'
38
- - !ruby/object:Gem::Dependency
39
- name: rake
40
- requirement: !ruby/object:Gem::Requirement
41
- requirements:
42
- - - ">="
43
- - !ruby/object:Gem::Version
44
- version: '0'
45
- type: :development
46
- prerelease: false
47
- version_requirements: !ruby/object:Gem::Requirement
48
- requirements:
49
- - - ">="
50
- - !ruby/object:Gem::Version
51
- version: '0'
52
- - !ruby/object:Gem::Dependency
53
- name: rspec
54
- requirement: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - "~>"
57
- - !ruby/object:Gem::Version
58
- version: '3.0'
59
- type: :development
60
- prerelease: false
61
- version_requirements: !ruby/object:Gem::Requirement
62
- requirements:
63
- - - "~>"
64
- - !ruby/object:Gem::Version
65
- version: '3.0'
66
38
  description:
67
39
  email:
68
40
  - jamie@vialstudios.com
@@ -102,7 +74,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
102
74
  requirements:
103
75
  - - ">="
104
76
  - !ruby/object:Gem::Version
105
- version: '0'
77
+ version: '2.4'
106
78
  required_rubygems_version: !ruby/object:Gem::Requirement
107
79
  requirements:
108
80
  - - ">="