sandi_meter 1.1.7 → 1.1.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: 373b45812e2e56fe45638fa58809d785e88938d5
4
- data.tar.gz: 6d56c4f940d36e8af9752c85673885b7d9070822
3
+ metadata.gz: 54a3a95954d2e42aaf57f24b88a0988b793015b2
4
+ data.tar.gz: 0b71ff002bb37ceee3e65b2d70ba3ebd8ff1db35
5
5
  SHA512:
6
- metadata.gz: a7b7c50c7b8ef49169cd967423763b0a1aed277299d31e0727973ce665c0f1a88be3773cdb548c807c7411eccb3bc8d593634345fde03e83416bf11c1aa5dec5
7
- data.tar.gz: e172d4204ca422e7b55538c03eb9d7aa8f39cbe535b12299faa0910cba0376b0c2ce42065cf86f1c48f8393b795a46f75331ade45a1ed16ac61368f75f995dc8
6
+ metadata.gz: bfbf7a4c4374cdc0f78ef62faf90500fcf2e85895fb2f52d26da3ed66b6c9507b9fb8c0a72350fa1e50dfd54e3f1865a255217f4e2a99bbed43b871b45efcc7c
7
+ data.tar.gz: 7e7158e10271549a4c5fad4004874bacb629e6dc77efd8d9db36c8f35f42dfbe9019c63ab459d9175843cb1c7ff9f98d249d0b1b83d8ea7d01974d50afb0dc3d
@@ -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
- open_in_browser(index_html_path)
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
@@ -1,3 +1,3 @@
1
1
  module SandiMeter
2
- VERSION = "1.1.7"
2
+ VERSION = "1.1.8"
3
3
  end
@@ -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.7
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-08-18 00:00:00.000000000 Z
11
+ date: 2014-12-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler