berkshelf 2.0.16 → 2.0.17

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: f2aff91918198bd7d6473d3617e2ecb7dd752307
4
- data.tar.gz: ca38034da3fb93aed5690336b53fe4e8b9706746
3
+ metadata.gz: 035b73ca9d93250f44face7e14fa87e16f37a721
4
+ data.tar.gz: c8a993b85d430f63c52ed12c9ac9f822ac09e5cf
5
5
  SHA512:
6
- metadata.gz: fce308d0bebaa52f13694432fb89eb1bf0e223f2550e888f3c05d262c841270c48d4ec218bb63043da3b38d4087a8fa6403ff59999e2e2aebe23e508d14f9ba0
7
- data.tar.gz: 8373246fcea14fbd2e07f0e3b5a49cf6758cab6c16b9831b074bd0a159d32de54cc9ff789cebdc9156a4189d74e13ff2be34c301c4e79899257859118a836453
6
+ metadata.gz: 5d5a6e17179a2583624cd8e4bb36a71989a978826df47f392173cf41d59314d5a0a24e49491a1ab3a37731b6badc1f820d3e490f0abffe5b3e0ea375fffa1910
7
+ data.tar.gz: b3a28330ba65f165f4058af6b2fe4f8eacec5a4bb6519bd2331ef2dcab97d833f4a4e0173392b1bb5aa32476b944cbcd2b217a56d0a52b4d0b1796794479247e
@@ -1,3 +1,7 @@
1
+ # 2.0.17
2
+
3
+ * Fix constraint on Hashie
4
+
1
5
  # 2.0.16
2
6
 
3
7
  * Update constraint on Ridley
@@ -34,15 +34,14 @@ Gem::Specification.new do |s|
34
34
  s.add_dependency 'addressable', '~> 2.3.4'
35
35
  s.add_dependency 'buff-shell_out', '~> 0.1'
36
36
  s.add_dependency 'chozo', '>= 0.6.1'
37
- s.add_dependency 'faraday', '~> 0.8.5'
38
- s.add_dependency 'hashie', '>= 2.0.2'
37
+ s.add_dependency 'hashie', '~> 2.0'
39
38
  s.add_dependency 'minitar', '~> 0.5.4'
40
39
  s.add_dependency 'retryable', '~> 1.3.3'
41
40
  s.add_dependency 'ridley', '~> 1.7.0'
42
41
  s.add_dependency 'solve', '~> 0.8.2'
43
42
  s.add_dependency 'thor', '~> 0.18.0'
44
43
  s.add_dependency 'rbzip2', '~> 0.2.0'
45
- s.add_dependency 'faraday', '~> 0.8.0' # lock tranisitive dependency of Ridley
44
+ s.add_dependency 'faraday', '~> 0.8.5' # lock tranisitive dependency of Ridley
46
45
 
47
46
  s.add_development_dependency 'aruba', '~> 0.5'
48
47
  s.add_development_dependency 'cane', '~> 2.5'
@@ -564,9 +564,20 @@ module Berkshelf
564
564
  #
565
565
  # @raise [EnvironmentNotFound] if the target environment was not found
566
566
  # @raise [ChefConnectionError] if you are locking cookbooks with an invalid or not-specified client configuration
567
+ # @raise [EnvironmentFileNotFound] if you are uploading environment from local file
567
568
  def apply(environment_name, options = {})
568
569
  conn = ridley_connection(options)
569
- environment = conn.environment.find(environment_name)
570
+
571
+ if options[:from_file]
572
+ environment_path = options[:from_file]
573
+ begin
574
+ environment = conn.environment.from_file(environment_path)
575
+ rescue # Ridley::Errors::RidleyError => ex
576
+ raise EnvironmentFileNotFound, "Local environment file #{environment_path} not found."
577
+ end
578
+ else
579
+ environment = conn.environment.find(environment_name)
580
+ end
570
581
 
571
582
  if environment
572
583
  install
@@ -240,6 +240,11 @@ module Berkshelf
240
240
  type: :boolean,
241
241
  default: nil,
242
242
  desc: 'Disable/Enable SSL verification when locking cookbooks.'
243
+ method_option :from_file,
244
+ type: :string,
245
+ desc: 'overwrite environment attributes when using apply using local environment file',
246
+ aliases: '-f',
247
+ banner: 'PATH'
243
248
  desc 'apply ENVIRONMENT', 'Apply the cookbook version locks from Berksfile.lock to a Chef environment'
244
249
  def apply(environment_name)
245
250
  berksfile = ::Berkshelf::Berksfile.from_file(options[:berksfile])
@@ -294,6 +294,8 @@ module Berkshelf
294
294
  end
295
295
  end
296
296
 
297
+ class EnvironmentFileNotFound < BerkshelfError; status_code(137); end
298
+
297
299
  class ChefConnectionError < BerkshelfError
298
300
  status_code(130)
299
301
 
@@ -1,3 +1,3 @@
1
1
  module Berkshelf
2
- VERSION = "2.0.16"
2
+ VERSION = "2.0.17"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berkshelf
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.16
4
+ version: 2.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamie Winsor
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2014-04-22 00:00:00.000000000 Z
15
+ date: 2014-06-10 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: activesupport
@@ -71,33 +71,19 @@ dependencies:
71
71
  - !ruby/object:Gem::Version
72
72
  version: 0.6.1
73
73
  - !ruby/object:Gem::Dependency
74
- name: faraday
74
+ name: hashie
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ~>
78
78
  - !ruby/object:Gem::Version
79
- version: 0.8.5
79
+ version: '2.0'
80
80
  type: :runtime
81
81
  prerelease: false
82
82
  version_requirements: !ruby/object:Gem::Requirement
83
83
  requirements:
84
84
  - - ~>
85
85
  - !ruby/object:Gem::Version
86
- version: 0.8.5
87
- - !ruby/object:Gem::Dependency
88
- name: hashie
89
- requirement: !ruby/object:Gem::Requirement
90
- requirements:
91
- - - '>='
92
- - !ruby/object:Gem::Version
93
- version: 2.0.2
94
- type: :runtime
95
- prerelease: false
96
- version_requirements: !ruby/object:Gem::Requirement
97
- requirements:
98
- - - '>='
99
- - !ruby/object:Gem::Version
100
- version: 2.0.2
86
+ version: '2.0'
101
87
  - !ruby/object:Gem::Dependency
102
88
  name: minitar
103
89
  requirement: !ruby/object:Gem::Requirement
@@ -188,14 +174,14 @@ dependencies:
188
174
  requirements:
189
175
  - - ~>
190
176
  - !ruby/object:Gem::Version
191
- version: 0.8.0
177
+ version: 0.8.5
192
178
  type: :runtime
193
179
  prerelease: false
194
180
  version_requirements: !ruby/object:Gem::Requirement
195
181
  requirements:
196
182
  - - ~>
197
183
  - !ruby/object:Gem::Version
198
- version: 0.8.0
184
+ version: 0.8.5
199
185
  - !ruby/object:Gem::Dependency
200
186
  name: aruba
201
187
  requirement: !ruby/object:Gem::Requirement