project_monitor_stat 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/project_monitor_stat.rb +1 -1
- data/lib/project_monitor_stat/config.rb +9 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1b908e4a408820b47d5464207475dea5bfdc9caa
|
4
|
+
data.tar.gz: 2df94ef021bb1ff13761443816645f25036a9777
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 338e7e6a8e4d189a2dbab24b20f9208634578463a89752b96f0196e1ced224b9b64373c7623f5d99b204496b2669a9446f1d2933ac96449f32b182dd7651e6c8
|
7
|
+
data.tar.gz: 394f43f10d66e37c6792361234c0d6a1ae8b448d7905c644c2f3d4f31f76a8238ee970d1bfe8eb30b0a2e4d93eeefa4fc7194d630e8037845bdc77fb546b696c
|
data/lib/project_monitor_stat.rb
CHANGED
@@ -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
|
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
|
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
|
|