sandi_meter 1.1.7 → 1.1.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sandi_meter/cli.rb +9 -1
- data/lib/sandi_meter/version.rb +1 -1
- data/spec/cli_spec.rb +16 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 54a3a95954d2e42aaf57f24b88a0988b793015b2
|
4
|
+
data.tar.gz: 0b71ff002bb37ceee3e65b2d70ba3ebd8ff1db35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfbf7a4c4374cdc0f78ef62faf90500fcf2e85895fb2f52d26da3ed66b6c9507b9fb8c0a72350fa1e50dfd54e3f1865a255217f4e2a99bbed43b871b45efcc7c
|
7
|
+
data.tar.gz: 7e7158e10271549a4c5fad4004874bacb629e6dc77efd8d9db36c8f35f42dfbe9019c63ab459d9175843cb1c7ff9f98d249d0b1b83d8ea7d01974d50afb0dc3d
|
data/lib/sandi_meter/cli.rb
CHANGED
@@ -39,6 +39,12 @@ module SandiMeter
|
|
39
39
|
description: "HTML mode. Create folder, log data and output stats to HTML file.",
|
40
40
|
boolean: true
|
41
41
|
|
42
|
+
option :quiet,
|
43
|
+
short: "-q",
|
44
|
+
long: "--quiet",
|
45
|
+
description: "Do not open HTML report for graph option in browser.",
|
46
|
+
boolean: true
|
47
|
+
|
42
48
|
option :version,
|
43
49
|
short: "-v",
|
44
50
|
long: "--version",
|
@@ -112,7 +118,9 @@ module SandiMeter
|
|
112
118
|
html_generator.generate_details!(cli.config[:path], data)
|
113
119
|
|
114
120
|
index_html_path = File.join(cli.config[:path], 'sandi_meter/index.html')
|
115
|
-
|
121
|
+
unless cli.config[:quiet]
|
122
|
+
open_in_browser(index_html_path)
|
123
|
+
end
|
116
124
|
else
|
117
125
|
puts "WARNING!!! HTML mode works only if you scan folder."
|
118
126
|
end
|
data/lib/sandi_meter/version.rb
CHANGED
data/spec/cli_spec.rb
CHANGED
@@ -24,5 +24,21 @@ describe SandiMeter::CLI do
|
|
24
24
|
expect { cli.execute }.to raise_error(SystemExit)
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
context 'with the quiet flag passed in' do
|
29
|
+
before do
|
30
|
+
ARGV.push('-q')
|
31
|
+
ARGV.push('-g')
|
32
|
+
end
|
33
|
+
after do
|
34
|
+
ARGV.pop
|
35
|
+
ARGV.pop
|
36
|
+
end
|
37
|
+
|
38
|
+
it 'does not open the browser' do
|
39
|
+
cli.should_not_receive(:open_in_browser)
|
40
|
+
expect { cli.execute }.to raise_error(SystemExit)
|
41
|
+
end
|
42
|
+
end
|
27
43
|
end
|
28
44
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sandi_meter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anatoli Makarevich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-12-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|