monosasi 0.1.1.beta → 0.1.2

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
- SHA1:
3
- metadata.gz: c7321064f1ddf7507cb4605361c7365f794888f9
4
- data.tar.gz: c2c9f6c18d97677f3bf02f5651fe1edcac59bd0e
2
+ SHA256:
3
+ metadata.gz: 63b5ca92ef0f34c5bf34918c052ea174c773e4c922c2a8d50566d4c076ae0528
4
+ data.tar.gz: 2fc652012a6b88a1bc513c25af6d225141cf25a9b6099ae74cbddd87a6b0410e
5
5
  SHA512:
6
- metadata.gz: f604eeda4e494d52cc0ffee25f240d0470a3e10f725b51cb94943f877de336cf7cff79764c1146972c1a9cb48827c6a1a25ed5bdb310939d5520050a68ae25d4
7
- data.tar.gz: 4a866f2dce81d88beedd3d6e8da69665513522d93876af9cace50046b90a2e457eafc429e474cda65537b4a87681cbfd2b4331fb739cdbc4b1060024cbbba880
6
+ metadata.gz: d4b1bbaffe09a909168eaa9e2fb9a8762adcbb87400931ff8520bf82860917b117f630680a3cc4aa20438d0de8d168d0b73f7a3855d6d83a5132083c935106c5
7
+ data.tar.gz: d3ec0030f3f55c2f482a5eb1d8c6cd91e22473329e31c24e71d7eeff1bafa9eb21c7635a4ae5f2e8395f4f66f8d3ac2754e6752be71681f278461d7b88324d70
data/README.md CHANGED
@@ -50,10 +50,14 @@ Usage: monosasi [options]
50
50
  -o, --output FILE
51
51
  --split
52
52
  --target REGEXP
53
+ --include REGEXP
54
+ --exclude REGEXP
53
55
  --no-color
54
56
  --debug
55
57
  ```
56
58
 
59
+ Note that now `--target` option is deprecated so it will be removed eventually. So consider use equivalent option `--include` instead of.
60
+
57
61
  ## Rulefile example
58
62
 
59
63
  ```ruby
data/exe/monosasi CHANGED
@@ -36,15 +36,17 @@ def parse_options(argv)
36
36
  options[:aws][:credentials][:path] = v
37
37
  end
38
38
 
39
- opt.on('-a', '--apply') { options[:mode] = :apply }
40
- opt.on('-f', '--file FILE') {|v| options[:file] = v }
41
- opt.on('' , '--dry-run') { options[:dry_run] = true }
42
- opt.on('-e', '--export') { options[:mode] = :export }
43
- opt.on('-o', '--output FILE') {|v| options[:output] = v }
44
- opt.on('' , '--split') { options[:split] = :true }
45
- opt.on('' , '--target REGEXP') {|v| options[:target] = Regexp.new(v) }
46
- opt.on('' , '--no-color') { options[:color] = false }
47
- opt.on('' , '--debug') { options[:debug] = true }
39
+ opt.on('-a', '--apply') { options[:mode] = :apply }
40
+ opt.on('-f', '--file FILE') {|v| options[:file] = v }
41
+ opt.on('' , '--dry-run') { options[:dry_run] = true }
42
+ opt.on('-e', '--export') { options[:mode] = :export }
43
+ opt.on('-o', '--output FILE') {|v| options[:output] = v }
44
+ opt.on('' , '--split') { options[:split] = :true }
45
+ opt.on('' , '--target REGEXP') {|v| options[:target] = Regexp.new(v) }
46
+ opt.on('' , '--include REGEXP') {|v| options[:include] = Regexp.new(v) }
47
+ opt.on('' , '--exclude REGEXP') {|v| options[:exclude] = Regexp.new(v) }
48
+ opt.on('' , '--no-color') { options[:color] = false }
49
+ opt.on('' , '--debug') { options[:debug] = true }
48
50
 
49
51
  opt.parse!(argv)
50
52
 
@@ -70,6 +72,10 @@ def parse_options(argv)
70
72
  )
71
73
  end
72
74
 
75
+ if options[:target]
76
+ Monosasi::Logger.instance.warn('--target option is deprecated so it will be removed eventually. Consider use --incldue option instead of.')
77
+ end
78
+
73
79
  options
74
80
  rescue => e
75
81
  $stderr.puts("[ERROR] #{e.message}")
@@ -1,8 +1,13 @@
1
1
  class Monosasi::Utils
2
2
  module TargetMatcher
3
3
  def target?(name)
4
- if @options[:target]
5
- @options[:target] =~ name
4
+ case
5
+ when @options[:include]
6
+ @options.fetch(:include) =~ name
7
+ when @options[:target]
8
+ @options.fetch(:target) =~ name
9
+ when @options[:exclude]
10
+ @options.fetch(:exclude) !~ name
6
11
  else
7
12
  true
8
13
  end
@@ -1,3 +1,3 @@
1
1
  module Monosasi
2
- VERSION = '0.1.1.beta'
2
+ VERSION = '0.1.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: monosasi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.beta
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - winebarrel
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-02-19 00:00:00.000000000 Z
11
+ date: 2018-03-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: aws-sdk
@@ -186,12 +186,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
186
186
  version: '0'
187
187
  required_rubygems_version: !ruby/object:Gem::Requirement
188
188
  requirements:
189
- - - ">"
189
+ - - ">="
190
190
  - !ruby/object:Gem::Version
191
- version: 1.3.1
191
+ version: '0'
192
192
  requirements: []
193
193
  rubyforge_project:
194
- rubygems_version: 2.6.13
194
+ rubygems_version: 2.7.3
195
195
  signing_key:
196
196
  specification_version: 4
197
197
  summary: Monosasi is a tool to manage Cloudwatch Events rules.