builderator 1.3.2 → 2.0.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
  SHA1:
3
- metadata.gz: 4695e9899231ab9dd8523045fbcaeb378fc85c7f
4
- data.tar.gz: dffbda2a0efc219410b4517d62aab396f06b7d0c
3
+ metadata.gz: 41c837996139c2caf0e0d243fc3fca3aaee1104f
4
+ data.tar.gz: '0097d382431ab9d0c461b95cbfee4648b7c8fe98'
5
5
  SHA512:
6
- metadata.gz: a379d1f004e2542f9271d524015019ddb040f95b979253265b87d77baf3c69c579d84286458a7590084c66e1145fd73b1f84f52e670e49f126296c61ee6c5125
7
- data.tar.gz: 523709de7d8b87929cab70358b2bbc133c4f20dce9d8494e8f35df32ed59564d353c46f0940fc2b5a7919298abd149eee0d9af6bb9766252c39f1a238559a636
6
+ metadata.gz: '083437ac7c570f71e9af19a2d63bed22c39e8d9486c06ca95e3c3924e4772058eded19d5f1585c1bb8e8c7abbc711e161216aa96cca94989aa23ff56830d8c34'
7
+ data.tar.gz: 8fea96556083b8b4ff137210124031292702c75db1980bfc2c30598b71efc242f66de7547d7b60f9e8eb5fd05d589b9f4a3aab1eb3c81f5ae7c4596a9c1a4745
@@ -18,21 +18,30 @@ module Builderator
18
18
  ##
19
19
  class CLI < Thor
20
20
  include Thor::Actions
21
+ VERSION = ['--version', '-v'].freeze
22
+
23
+ map VERSION => :print_version
21
24
 
22
25
  def initialize(*_)
23
26
  super
24
27
 
28
+ # Ignore existing config when we don't need it: i.e. `help`
29
+ ignore_existing_config = ['help'] + VERSION
30
+ return if ignore_existing_config.any? do |i|
31
+ ARGV.include?(i) || ARGV.empty?
32
+ end
33
+
25
34
  Config.argv(options) ## Load command flags
26
35
  Config.load(File.join(ENV['HOME'], '.builderator/Buildfile'))
27
36
  Config.load(Util.relative_path('Buildfile').to_s)
28
-
29
- # Ignore existing config when we don't need it: i.e. `help`
30
- ignore_existing_config = ['help']
31
- return if ignore_existing_config.any? { |i| ARGV.include?(i) }
32
-
33
37
  Config.compile
34
38
  end
35
39
 
40
+ desc '--version, -v', 'Print Builderator version'
41
+ def print_version
42
+ say Gem.loaded_specs['builderator'].version
43
+ end
44
+
36
45
  def self.exit_on_failure?
37
46
  true
38
47
  end
@@ -1,5 +1,3 @@
1
- require 'builderator/patch/berkshelf'
2
-
3
1
  <% cookbook.sources.each do |s| -%>
4
2
  source '<%= s %>'
5
3
  <% end -%>
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: builderator
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Manero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-19 00:00:00.000000000 Z
11
+ date: 2017-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -86,14 +86,14 @@ dependencies:
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '4.3'
89
+ version: '6.2'
90
90
  type: :runtime
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
94
  - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '4.3'
96
+ version: '6.2'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: childprocess
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -239,7 +239,6 @@ files:
239
239
  - lib/builderator/model/cleaner/scaling_groups.rb
240
240
  - lib/builderator/model/cleaner/snapshots.rb
241
241
  - lib/builderator/model/cleaner/volumes.rb
242
- - lib/builderator/patch/berkshelf.rb
243
242
  - lib/builderator/patch/thor-actions.rb
244
243
  - lib/builderator/tasks.rb
245
244
  - lib/builderator/tasks/berkshelf.rb
@@ -1,18 +0,0 @@
1
- # Monkey patch to handle the case where Content-Type headers returned by servers
2
- # say "gzip" by the resulting message body isn't in gzip format.
3
- # TODO Remove this when we upgrade Berkshelf and the gzip response goes away.
4
- # https://github.com/berkshelf/berkshelf-api-client/blob/v1.3.0/lib/berkshelf/api_client/connection.rb#L37
5
- require 'faraday_middleware'
6
-
7
- module FaradayMiddleware
8
- class Gzip
9
- alias_method :__uncompress_gzip__, :uncompress_gzip
10
- def uncompress_gzip(body)
11
- __uncompress_gzip__(body)
12
- rescue Zlib::GzipFile::Error
13
- StringIO.new(body).read
14
- end
15
- end
16
- end
17
-
18
- Faraday::Response.register_middleware :gzip => FaradayMiddleware::Gzip