apirunner 0.4.4 → 0.4.5

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.4.4
1
+ 0.4.5
data/apirunner.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{apirunner}
8
- s.version = "0.4.4"
8
+ s.version = "0.4.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jan@moviepilot.com"]
@@ -86,6 +86,9 @@ class ResponseBodyChecker < Checker
86
86
  # returns relative path for matching the target tree of the response body
87
87
  # explicit array adressing is replaced by *
88
88
  def relative_path(path)
89
- path.gsub(/\/([^\/]+)\[\d+\]\//i,"/*/")
89
+ # replace array referenced IN the path
90
+ first_pass = path.gsub(/\/([^\/]+)\[\d+\]\//i,"/*/")
91
+ # replace array references AT THE END of the path too
92
+ first_pass.gsub(/\/([^\/]+)\[\d+\]$/,"/*")
90
93
  end
91
94
  end
@@ -10,7 +10,8 @@ describe "ResponseBodyChecker" do
10
10
  path = "/bla/foo/values[6]/duffy/friends[1]/duck"
11
11
  ResponseBodyChecker.new({},{}).send(:relative_path, path).should eql "/bla/foo/*/duffy/*/duck"
12
12
  end
13
- it "should substiiture at the end of the path too" do
13
+ it "should substiture at the end of the path too" do
14
+ # pending "Had to revert the code change, caused a bug in tree parsing"
14
15
  path = "/bla/foo/values[6]/duffy/friends[1]/duck/ibizas[7]"
15
16
  ResponseBodyChecker.new({}, {}).send(:relative_path, path).should eql "/bla/foo/*/duffy/*/duck/*"
16
17
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 4
9
- version: 0.4.4
8
+ - 5
9
+ version: 0.4.5
10
10
  platform: ruby
11
11
  authors:
12
12
  - jan@moviepilot.com
@@ -283,7 +283,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
283
283
  requirements:
284
284
  - - ">="
285
285
  - !ruby/object:Gem::Version
286
- hash: -2053420010015030724
286
+ hash: -3546115168935278311
287
287
  segments:
288
288
  - 0
289
289
  version: "0"