perf_check 0.7.2 → 0.7.3
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 +4 -4
- data/bin/perf_check +1 -4
- data/lib/perf_check/config.rb +9 -1
- 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: cb44924865dcae6f7d575c2e103c6b4bdfbed211
|
4
|
+
data.tar.gz: 9054301c33fa709b1392483903833f5692b7acce
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4e34560dde5989e873d2f8d760a61a84fa075491a1def4a65cf41dbf70b656a5a9454373e49647ac27584d3271ca2504916f9b6d2108ad95ef2143452938ae96
|
7
|
+
data.tar.gz: d6a00b3d913dd33cdf3d1b5f1c8a11468f5338e2839f9d3b530ff08de997c2d7576d78171ca4e4ced36a81bd295fd6ed99f8679d886367e9808906f7e7d398e9
|
data/bin/perf_check
CHANGED
@@ -22,10 +22,7 @@ if File.exists?("#{app_root}/tmp/pids/server.pid")
|
|
22
22
|
end
|
23
23
|
|
24
24
|
perf_check = PerfCheck.new(app_root).tap(&:load_config)
|
25
|
-
|
26
|
-
perf_check.option_parser.parse(ARGV).each do |route|
|
27
|
-
perf_check.add_test_case(route)
|
28
|
-
end
|
25
|
+
perf_check.parse_arguments(ARGV)
|
29
26
|
|
30
27
|
if perf_check.test_cases.empty?
|
31
28
|
abort(perf_check.option_parser.help)
|
data/lib/perf_check/config.rb
CHANGED
@@ -1,6 +1,14 @@
|
|
1
|
-
require
|
1
|
+
require "optparse"
|
2
|
+
require "shellwords"
|
2
3
|
|
3
4
|
class PerfCheck
|
5
|
+
def parse_arguments(argv)
|
6
|
+
options.argv = argv.is_a?(String) ? Shellwords.shellsplit(argv) : argv
|
7
|
+
option_parser.parse(options.argv).each do |route|
|
8
|
+
add_test_case(route.strip)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
4
12
|
def option_parser
|
5
13
|
@optparse ||= OptionParser.new do |opts|
|
6
14
|
opts.banner = "Usage: perf_check [options] [route ...]"
|