blitz 0.1.22 → 0.1.23

Sign up to get free protection for your applications and to get access to all the features.
data/blitz.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{blitz}
8
- s.version = "0.1.22"
8
+ s.version = "0.1.23"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["pcapr"]
12
- s.date = %q{2012-02-17}
12
+ s.date = %q{2012-03-01}
13
13
  s.default_executable = %q{blitz}
14
14
  s.description = %q{Make load and performance testing a fun sport}
15
15
  s.email = %q{support@blitz.io}
data/lib/blitz.rb CHANGED
@@ -6,7 +6,7 @@ require 'pp'
6
6
 
7
7
  class Blitz # :nodoc:
8
8
  require 'blitz/helper'
9
- Version = "0.1.22"
9
+ Version = "0.1.23"
10
10
 
11
11
  extend Blitz::Helper
12
12
 
data/lib/blitz/curl.rb CHANGED
@@ -36,6 +36,7 @@ class Curl
36
36
  end
37
37
 
38
38
  def self.strip_quotes text
39
+ return text unless text.match RE_DQ_STRING or text.match RE_SQ_STRING
39
40
  text[1, (text.size - 2)]
40
41
  end
41
42
 
@@ -239,4 +239,35 @@ describe Blitz::Curl do
239
239
  end
240
240
  end
241
241
  end
242
+
243
+ describe "xargv" do
244
+ context "without quotes" do
245
+ it "should break string into array" do
246
+ array = Blitz::Curl.xargv "-r california www.example.com"
247
+ array.size.should == 3
248
+ array.first.should == "-r"
249
+ array.last.should == "www.example.com"
250
+ end
251
+ end
252
+
253
+ context "with double quotes" do
254
+ it "should break string into array" do
255
+ array = Blitz::Curl.xargv '-r california -d "a b c d" www.example.com'
256
+ array.size.should == 5
257
+ array.first.should == "-r"
258
+ array.last.should == "www.example.com"
259
+ array[3].should == "a b c d"
260
+ end
261
+ end
262
+
263
+ context "with single quotes" do
264
+ it "should break string into array" do
265
+ array = Blitz::Curl.xargv "-r california -d 'a b c d' www.example.com"
266
+ array.size.should == 5
267
+ array.first.should == "-r"
268
+ array.last.should == "www.example.com"
269
+ array[3].should == "a b c d"
270
+ end
271
+ end
272
+ end
242
273
  end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: blitz
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.1.22
5
+ version: 0.1.23
6
6
  platform: ruby
7
7
  authors:
8
8
  - pcapr
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2012-02-17 00:00:00 -08:00
13
+ date: 2012-03-01 00:00:00 -08:00
14
14
  default_executable: blitz
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -171,7 +171,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
171
171
  requirements:
172
172
  - - ">="
173
173
  - !ruby/object:Gem::Version
174
- hash: -600337631
174
+ hash: -292640339
175
175
  segments:
176
176
  - 0
177
177
  version: "0"