ritsudo 0.1.6 → 0.1.8

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
  SHA256:
3
- metadata.gz: 89f6b3348dfd799aa0fc14980192e45eb0d22e67f3667e7a26bc2a6a4a6b8d48
4
- data.tar.gz: 0120a045a3b2843aa4b3a46f87bff9728d07b6d0d290c820149905b6be2c8fed
3
+ metadata.gz: 2396e7dc48c6005364d5f35a728c22b09cca4a7ec40445cc81984c2e34317c7a
4
+ data.tar.gz: 82b0a8c4e870801d707e16ec3e21de34431e67d19f73283f1005f7385238a188
5
5
  SHA512:
6
- metadata.gz: '090b109e08b6709f250d1eeb4afdeab064669194348d3bfdbaaf4fd62004fad9c43553b9e96a8c66855c7424e29e1eb16212c62eefb8f566297948fb390558a7'
7
- data.tar.gz: 6fa5f9c3edfef86966fba07a58c0e5c13a517bc01d9a39f4ec2c513b300460572dbd461bd11d35f6869b6cb4d22b91d0b544f92d078039348794e717a505d5c4
6
+ metadata.gz: 474cc72036aa278b67344d832556face7ebe1569fdee8ac6601cc493f60e39fccfd668f5a40b4cf2986125cb9cdd4f323e4fd5e0c15e34fa7b81dc6e63d1b57a
7
+ data.tar.gz: 40285a426da3b945854f8a3dc94a5b6c7e4832d18f9d28b56e9f9247634dbd71a3aacde37d9b538b62558c0b5d67a22e8ea0c8d83701a1229c8a7d6dd88abaa1
data/bin/ritsudo CHANGED
@@ -2,5 +2,8 @@
2
2
  # -*- coding: utf-8 -*-
3
3
  # vim:fenc=utf-8 ff=unix ft=ruby ts=4 sw=2 sts=2 si et :
4
4
 
5
+ lib = File.expand_path("../../lib", __FILE__)
6
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
7
+
5
8
  require 'ritsudo/cli'
6
9
  Ritsudo::Cli.start(ARGV)
data/lib/ritsudo/cli.rb CHANGED
@@ -3,14 +3,15 @@ require 'thor'
3
3
  module Ritsudo
4
4
  class Cli < Thor
5
5
  default_command :benchmark
6
- option :url, required: true, aliases: ['-a']
7
- option :count, default: 5, type: :numeric, aliases: ['-c']
8
- option :cookies, type: :string, aliases: ['-C']
9
- option :sub_process_timeout, default: 5, type: :numeric, aliases: ['-s']
10
- option :timeout, default: 10, type: :numeric, aliases: ['-t']
11
- option :wait_time, default: 1, type: :numeric, aliases: ['-w']
12
- option :ua, type: :string, aliases: ['-u']
13
- option :match, type: :string, aliases: ['-m']
6
+ class_option :url, required: true, aliases: ['-a']
7
+ class_option :count, default: 5, type: :numeric, aliases: ['-c']
8
+ class_option :cookies, type: :string, aliases: ['-C']
9
+ class_option :sub_process_timeout, default: 5, type: :numeric, aliases: ['-s']
10
+ class_option :timeout, default: 10, type: :numeric, aliases: ['-t']
11
+ class_option :wait_time, default: 1, type: :numeric, aliases: ['-w']
12
+ class_option :ua, type: :string, aliases: ['-u']
13
+ class_option :match, type: :string, aliases: ['-m']
14
+
14
15
  desc "benchmark URL", "benchmark"
15
16
  def benchmark()
16
17
  match = options[:match] ? Regexp.new(options[:match]) : nil
@@ -28,5 +29,6 @@ module Ritsudo
28
29
  )
29
30
  benchmark.collector.report
30
31
  end
32
+ tasks["benchmark"].options = self.class_options
31
33
  end
32
34
  end
@@ -1,3 +1,3 @@
1
1
  module Ritsudo
2
- VERSION = "0.1.6"
2
+ VERSION = "0.1.8"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ritsudo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - shingo morita