knife-pinnings 1.1.0 → 1.1.1

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: bf68c9548eb98813a8cb2fe8de5d266ffb86761e
4
- data.tar.gz: f7bc67ff850f3cd9c2f6d1e22af2d2602253eb1e
3
+ metadata.gz: a0b94a3ccd1734401c8be4e7c0c03cff2b2402d2
4
+ data.tar.gz: 2901f932dcc37602e9755a336b742368f2fc552c
5
5
  SHA512:
6
- metadata.gz: 9a1aea8c107c53e875a1c00c1ba44d8cd010b9cc474686b7dcd09032b5a1b7243b95d20143e8746abf2c187b30ff4c62e0a559b9e6d6212d5d24f62f181ab3e2
7
- data.tar.gz: ee2b9a24077acc3683fab6e9a444fcb4eaccfe8b68ec293f938b08b5e929ad6831a70f1d47f033ae9f42ced597c1e41c74ed961429e7bf2deb4382c322d7b48d
6
+ metadata.gz: 2457459da364e27ee43226b151d2fb7dea2957e355c82695b21453e7bc5cc9724cac747d9cd32eddc1d0842ce8202a2a5a0f10495aeaddc506039a0d0c5c3bc4
7
+ data.tar.gz: 75fc85d6d67f0d7caee9dcd5bc7f21abd0a62b26958239adc0cd0a1edccadcce07b2602aa033b157a5f3bb0c92697e72eafaf32c4c1ff0c8934aeb206e9352b1
data/README.md CHANGED
@@ -43,13 +43,16 @@ To find cookbooks in acceptance or production with names beginning with app_
43
43
  ### Comparing environments
44
44
  To get a color coded comparison grid showing whats not up to date and whats missing.
45
45
 
46
- knife compare ENV1 ENV2
46
+ knife pinnings compare ['environmnet_regex'] ['cookbook_regex']
47
47
 
48
+ To compare the versions of skunk app cookbooks in dev, acceptance and production
49
+
50
+ knife pinnings compare '(^dev$|^acceptance$|^production$)' '^skunk_app.*'
48
51
 
49
52
  ### Promoting pinnings between environments
50
53
  Promote pinnings from one environment to another.
51
54
 
52
- knife pinnings promote ENV1 ENV2
55
+ knife pinnings promote ENV1 ENV2 ['cookbook_regex']
53
56
 
54
57
  NOTE: Pinnings which are missing in the source environment will NOT be deleted from the target.
55
58
 
@@ -17,21 +17,21 @@ class Chef
17
17
  # This class copies cookbook pinnings between environments
18
18
  class PinningsPromote < Chef::Knife
19
19
  require 'chef/knife/pinnings_mixin'
20
- banner 'knife pinnings promote <SOURCE_ENV> <TARGET_ENV>'
20
+ banner "knife pinnings promote <SOURCE_ENV> <TARGET_ENV> ['cookbook_regex']"
21
21
 
22
22
  def run
23
- unless name_args.length > 2
23
+ unless name_args.length > 1
24
24
  ui.fatal('You must specify a source and target environment.')
25
25
  exit 255
26
26
  end
27
27
  source_env = Environment.load(name_args[0])
28
28
  target_env = Environment.load(name_args[1])
29
- cookbook_regex = name_args || '.*'
30
- display_pinnings_table([source_env, target_env], '.*')
31
- copy_pinnings(source_env, target_env)
29
+ cookbook_regex = name_args[2] || '.*'
30
+ display_pinnings_table([source_env, target_env], cookbook_regex)
31
+ copy_pinnings(source_env, target_env, cookbook_regex)
32
32
  end
33
33
 
34
- def copy_pinnings(source_env, target_env)
34
+ def copy_pinnings(source_env, target_env, cookbook_regex)
35
35
  ui.msg('')
36
36
  ui.confirm("Do you want to write to #{target_env.name}")
37
37
  ui.msg('')
@@ -15,7 +15,7 @@
15
15
  # rubocop:disable Style/Documentation
16
16
  module Knife
17
17
  module Pinnings
18
- VERSION = '1.1.0'
18
+ VERSION = '1.1.1'
19
19
  MAJOR, MINOR, TINY = VERSION.split('.')
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: knife-pinnings
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Nixon