dashdog 0.3.4 → 0.4.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: c8f52202079753030c78a43a9dc55d4969e08f8d
4
- data.tar.gz: 3a8e63df90ebc3cd3379952207d271109755ebb1
3
+ metadata.gz: e2024692d81c992df3d9a4731e8c70da5e3289d1
4
+ data.tar.gz: 9f50c1c46b5ad1eb98a277f8f3d5a5df6242396d
5
5
  SHA512:
6
- metadata.gz: d14f0eccd950ebcd7d8f57e25465fae553d8f8e392785996744abf6202cc8e02ae695ccc8d0b1d0865758b50bcf5138fa836d20923eb5db35fd6a9e13f6d788f
7
- data.tar.gz: fff13b43e6c0afca81014ca8cf882b6019455525a7d5b09ea7b864f00a7fb305e9141fca8268dfe58ac044403124dad93fff47e748085e302f323ed3ddebc938
6
+ metadata.gz: 14c6d4daadca356d558c81647fb30d5093ecd6599b9b04d31de275878cbad97c3c02f60cbce0da3c7c955a72c13fe7c3de475c9c99b416e991cdd3473a91a477
7
+ data.tar.gz: 4ae6d1c12619b1e728a10c843d84157c4a517df069235355a575bf8f210f68e9f576859d15b658ec3726f1aa883ffd898bb254a42a53f8e1f34e9cce033b9854
@@ -1,3 +1,7 @@
1
+ ## 0.4.0
2
+
3
+ - Add `exclude-title` option [#12][] ([@aibou][])
4
+
1
5
  ## 0.3.4
2
6
 
3
7
  - Stop warning when execute `dashdog apply` [#11][] ([@aibou][])
@@ -49,6 +53,7 @@
49
53
  [#9]: https://github.com/serverworks/dashdog/issues/9
50
54
  [#10]: https://github.com/serverworks/dashdog/issues/10
51
55
  [#11]: https://github.com/serverworks/dashdog/issues/11
56
+ [#12]: https://github.com/serverworks/dashdog/issues/12
52
57
  [@aibou]: https://github.com/aibou
53
58
  [@n0ts]: https://github.com/n0ts
54
- [@winebarrel]: https://github.com/winebarrel
59
+ [@winebarrel]: https://github.com/winebarrel
data/README.md CHANGED
@@ -70,9 +70,12 @@ Usage:
70
70
  dashdog apply
71
71
 
72
72
  Options:
73
- -d, [--dry-run=DRY_RUN] # Dry run (Only output the difference)
74
- -f, [--file=FILE] # Configuration file
75
- # Default: Boardfile
73
+ -d, [--dry-run], [--no-dry-run] # Dry run (Only display the difference)
74
+ -f, [--file=FILE] # Configuration file
75
+ # Default: Boardfile
76
+ [--color], [--no-color] # Disable colorize
77
+ # Default: true
78
+ -e, [--exclude-title=EXCLUDE_TITLE] # Exclude patterns of title
76
79
  ```
77
80
 
78
81
  ## Development
@@ -91,4 +94,4 @@ The gem is available as open source under the terms of the [MIT License](http://
91
94
 
92
95
  ## Copyright
93
96
 
94
- Copyright (c) 2016 Serverworks Co.,Ltd. See [LICENSE](https://github.com/serverworks/dashdog/blob/master/LICENSE.txt) for details.
97
+ Copyright (c) 2016-2018 Serverworks Co.,Ltd. See [LICENSE](https://github.com/serverworks/dashdog/blob/master/LICENSE.txt) for details.
@@ -24,14 +24,15 @@ module Dashdog
24
24
  dry_run = options['dry_run'] ? '[Dry run] ' : ''
25
25
  conf = @converter.to_h(options['file'])
26
26
 
27
- _apply_timeboards(conf['timeboards'], @client.get_timeboards, dry_run)
28
- _apply_screenboards(conf['screenboards'], @client.get_screenboards, dry_run)
27
+ _apply_timeboards(conf['timeboards'], @client.get_timeboards, dry_run, options)
28
+ _apply_screenboards(conf['screenboards'], @client.get_screenboards, dry_run, options)
29
29
  end
30
30
 
31
31
  private
32
32
 
33
- def _apply_timeboards(local, remote, dry_run)
33
+ def _apply_timeboards(local, remote, dry_run, options)
34
34
  local.each do |l|
35
+ next if !options['exclude_title'].nil? && l['title'].match(options['exclude_title'])
35
36
  r = _choice_by_title(remote, l['title'])
36
37
  if r.nil?
37
38
  info("#{dry_run}Create the new timeboard '#{l['title']}'")
@@ -53,6 +54,7 @@ module Dashdog
53
54
  end
54
55
 
55
56
  remote.each do |r|
57
+ next if !options['exclude_title'].nil? && r['title'].match(options['exclude_title'])
56
58
  if _choice_by_title(local, r['title']).nil?
57
59
  warn("#{dry_run}Delete the timeboard '#{r['title']}'")
58
60
  @client.delete_timeboard(r['id']) if dry_run.empty?
@@ -60,8 +62,9 @@ module Dashdog
60
62
  end
61
63
  end
62
64
 
63
- def _apply_screenboards(local, remote, dry_run)
65
+ def _apply_screenboards(local, remote, dry_run, options)
64
66
  local.each do |l|
67
+ next if !options['exclude_title'].nil? && l['title'].match(options['exclude_title'])
65
68
  r = _choice_by_title(remote, l['board_title'])
66
69
  if r.nil?
67
70
  info("#{dry_run}Create the new screenboards '#{l['board_title']}'")
@@ -90,6 +93,7 @@ module Dashdog
90
93
  end
91
94
 
92
95
  remote.each do |r|
96
+ next if !options['exclude_title'].nil? && r['title'].match(options['exclude_title'])
93
97
  if _choice_by_title(local, r['board_title']).nil?
94
98
  warn("#{dry_run}Delete the screenboard '#{r['board_title']}'")
95
99
  @client.delete_screenboard(r['id']) if dry_run.empty?
@@ -2,8 +2,9 @@ require 'thor'
2
2
 
3
3
  module Dashdog
4
4
  class Cli < Thor
5
- class_option :file, aliases: '-f', desc: 'Configuration file', type: :string, default: 'Boardfile'
6
- class_option :color, desc: 'Disable colorize', type: :boolean, default: $stdout.tty?
5
+ class_option :file, aliases: '-f', desc: 'Configuration file', type: :string, default: 'Boardfile'
6
+ class_option :color, desc: 'Disable colorize', type: :boolean, default: $stdout.tty?
7
+ class_option :exclude_title, aliases: '-e', desc: 'Exclude patterns of title', type: :string, default: nil
7
8
 
8
9
  def initialize(*args)
9
10
  @actions = Dashdog::Actions.new
@@ -1,3 +1,3 @@
1
1
  module Dashdog
2
- VERSION = "0.3.4"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dashdog
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.4
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Serverworks Co.,Ltd.
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-10-12 00:00:00.000000000 Z
11
+ date: 2018-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dogapi