project_monitor_stat 0.0.7 → 0.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9ef3f44c9a7b97f66cbe1418ea316431af361c1
4
- data.tar.gz: 2b4ee8859d568cc37c03e3cb047a5e07411cd668
3
+ metadata.gz: 1b908e4a408820b47d5464207475dea5bfdc9caa
4
+ data.tar.gz: 2df94ef021bb1ff13761443816645f25036a9777
5
5
  SHA512:
6
- metadata.gz: 1403642cdb4c77c26bad5ba55830411bab9108035fb6dba32e9a75726ca9692fe7784aaeb8b0e8951e0bc13864553954d25325d94389d2deb79347e24ecae5a6
7
- data.tar.gz: d450706ae7cc5d6086d0cc6bfcf856d1fe46c409e36149c56c6da5272dd72c35f3c6b9cc39d5d0d51e94dcc038e3d15a57d0260432d7d55499711997261cfee4
6
+ metadata.gz: 338e7e6a8e4d189a2dbab24b20f9208634578463a89752b96f0196e1ced224b9b64373c7623f5d99b204496b2669a9446f1d2933ac96449f32b182dd7651e6c8
7
+ data.tar.gz: 394f43f10d66e37c6792361234c0d6a1ae8b448d7905c644c2f3d4f31f76a8238ee970d1bfe8eb30b0a2e4d93eeefa4fc7194d630e8037845bdc77fb546b696c
@@ -1,5 +1,5 @@
1
1
  module ProjectMonitorStat
2
- VERSION = '0.0.7'
2
+ VERSION = '0.0.8'
3
3
 
4
4
  autoload :Config, 'project_monitor_stat/config'
5
5
  autoload :GitEmailParser, 'project_monitor_stat/git_email_parser'
@@ -5,6 +5,7 @@ module ProjectMonitorStat
5
5
  class Config
6
6
  def self.parse_options(argv: raise)
7
7
  instance = new
8
+ instance.tags = []
8
9
  instance.base_url = 'http://pulse.pivotallabs.com/projects.json'
9
10
  instance.idle_seconds = 600
10
11
 
@@ -13,7 +14,7 @@ module ProjectMonitorStat
13
14
 
14
15
  opts.on('-t tag1,tag2', '--tags tag1,tag2,tag3', Array,
15
16
  'Project Monitor tags') do |t|
16
- instance.tags = t
17
+ instance.tags |= t
17
18
  end
18
19
 
19
20
  opts.on('-g', '--git-author-tags',
@@ -26,7 +27,7 @@ module ProjectMonitorStat
26
27
  exit(1)
27
28
  end
28
29
 
29
- instance.tags = git_email_parser.username_tags
30
+ instance.tags |= git_email_parser.username_tags
30
31
  end
31
32
 
32
33
  opts.on('-sCOMMAND', '--success COMMAND',
@@ -80,6 +81,12 @@ module ProjectMonitorStat
80
81
 
81
82
  opt_parser.parse!(argv)
82
83
 
84
+ if instance.tags.empty?
85
+ Util.puts "Error: At least one tag required"
86
+ Util.puts opt_parser.help
87
+ exit(1)
88
+ end
89
+
83
90
  instance
84
91
  end
85
92
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: project_monitor_stat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Micah Young