perf_check 0.7.2 → 0.7.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8d9f55a98d357b8cb8ac717479a5d0ac37a1726c
4
- data.tar.gz: 7f6bd6282e556777ca2de66d08773b31add7e872
3
+ metadata.gz: cb44924865dcae6f7d575c2e103c6b4bdfbed211
4
+ data.tar.gz: 9054301c33fa709b1392483903833f5692b7acce
5
5
  SHA512:
6
- metadata.gz: fcb24cd5f50311f07f2db1155e73dcdea20d355767b5f578fab2ce7debc2228f6bcbababf2addb0116f091a4b65d4f48614d96d66d81540eeea4781000231eb1
7
- data.tar.gz: 7ad3ae6e2b7337ce2acfcf9a7a455b21d88ba6bf2b34e766a32d4d6c34e7b5d638e0d6d9006e285c8e9ca5403edce109b46cf6f500b714631474e17e8f104235
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)
@@ -1,6 +1,14 @@
1
- require 'optparse'
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 ...]"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: perf_check
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.2
4
+ version: 0.7.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - rubytune