miam 0.2.4.beta10 → 0.2.4.beta11

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: 8251e78648421d3acb0afa0a5a663a570ccd2f27
4
- data.tar.gz: 8e7322231ec3e6ece6e297aba849a0870f6edde6
3
+ metadata.gz: 9138483028ecd9f31271ee0104cc8315c3c2761d
4
+ data.tar.gz: 3d4561d7d711aa87e8476889638d2ecfb3f209f3
5
5
  SHA512:
6
- metadata.gz: 8de5260855df74629d5c7e2eac076469d686a711e652f5df43d478de1988d88d844d941055471ba112cfa45bc60eb0d27230aa11109c84db7813531d1bdd31b2
7
- data.tar.gz: 3b17645369feff700cc7c813c41602ffa887409276fa378f5ff332d163dd9b2bb90703dbe5e2f1fc207cb4034a22a5c0a6e0df561af3f155e1bd2bfaef4841c3
6
+ metadata.gz: 83cc09da8add9757a5069ffe4b157faef21426e25b9573af06ad97dbe439aaa6bc10f04ae43dc5150bfd1651b9b5181ef0a6856c9f40001ad085ff393029f126
7
+ data.tar.gz: 44b226fc05224222876d99fe7f767c929f4e33d089e2ec7a8d69fe0d2b86c54f4c7200e0778e779565f0ae98251fa9bfe72765cf158ec80d0dbc073bd2e74777
data/README.md CHANGED
@@ -27,6 +27,7 @@ It defines the state of IAM using DSL, and updates IAM according to DSL.
27
27
  * Fix `--target` option for Policies ([RP#21](https://github.com/winebarrel/miam/pull/21))
28
28
  * Fix for `Rate exceeded` ([PR#23](https://github.com/winebarrel/miam/pull/23))
29
29
  * Fix for non-User credentials ([PR#17](https://github.com/winebarrel/miam/pull/17))
30
+ * Add `--exclude` option
30
31
 
31
32
  ## Installation
32
33
 
@@ -76,6 +77,7 @@ Usage: miam [options]
76
77
  --format=FORMAT
77
78
  --export-concurrency N
78
79
  --target REGEXP
80
+ --exclude REGEXP
79
81
  --ignore-login-profile
80
82
  --no-color
81
83
  --no-progress
data/bin/miam CHANGED
@@ -52,6 +52,7 @@ ARGV.options do |opt|
52
52
  opt.on('', '--format=FORMAT', [:ruby, :json]) {|v| format_passed = true; options[:format] = v }
53
53
  opt.on('' , '--export-concurrency N', Integer) {|v| options[:export_concurrency] = v }
54
54
  opt.on('' , '--target REGEXP') {|v| options[:target] = Regexp.new(v) }
55
+ opt.on('' , '--exclude REGEXP') {|v| options[:exclude] = Regexp.new(v) }
55
56
  opt.on('' , '--ignore-login-profile') { options[:ignore_login_profile] = true }
56
57
  opt.on('' , '--no-color') { options[:color] = false }
57
58
  opt.on('' , '--no-progress') { options[:no_progress] = true }
data/lib/miam/client.rb CHANGED
@@ -508,11 +508,17 @@ class Miam::Client
508
508
  end
509
509
 
510
510
  def target_matched?(name)
511
+ result = true
512
+
513
+ if @options[:exclude]
514
+ result &&= name !~ @options[:exclude]
515
+ end
516
+
511
517
  if @options[:target]
512
- name =~ @options[:target]
513
- else
514
- true
518
+ result &&= name =~ @options[:target]
515
519
  end
520
+
521
+ result
516
522
  end
517
523
 
518
524
  def exec_by_format(proc_by_format)
@@ -193,10 +193,16 @@ end
193
193
  end
194
194
 
195
195
  def target_matched?(name)
196
+ result = true
197
+
198
+ if @options[:exclude]
199
+ result &&= name !~ @options[:exclude]
200
+ end
201
+
196
202
  if @options[:target]
197
- name =~ @options[:target]
198
- else
199
- true
203
+ result &&= name =~ @options[:target]
200
204
  end
205
+
206
+ result
201
207
  end
202
208
  end
data/lib/miam/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Miam
2
- VERSION = '0.2.4.beta10'
2
+ VERSION = '0.2.4.beta11'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: miam
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4.beta10
4
+ version: 0.2.4.beta11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-09 00:00:00.000000000 Z
11
+ date: 2017-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk-core