webstub 1.1.2 → 1.1.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: 417c4590e0317c76435c058817bf99abf978ed1d
4
- data.tar.gz: b4bdc1d2000e39c50545b09e08ca84ecc869c047
3
+ metadata.gz: dab6a7224711a9b346e0e025185c193232f48544
4
+ data.tar.gz: 78f95e5a74f4daac8dd0790a9c97f3ab22f2b8ae
5
5
  SHA512:
6
- metadata.gz: c510ac76a7fffb353a52e2c0090bac01b92a5940fdd74c94bf3d66e5647b1fa4449aad9a99b7a5d36d7ab692b9e3ecb08075f99ebe6ce200827ee8841f8d2253
7
- data.tar.gz: 844d47d28fdcf93b6700297623da1177b631bdf1fe236c752a1eec4cddaf33b5c44cb6f9e1e739c013f11f7157bf5a248ec04c52629925a6d38051c6a91a1111
6
+ metadata.gz: 0343926f70ed862ed33181cfd96c7ce9e9411935f7aea4fe7d0feb78e87dd3066dc8ec0447cecc40f69f2a1d0c5544b5e6111af161640573c0d883626c9f5e2c
7
+ data.tar.gz: 5d12d87852b07ec5c21cbe9d3fba3fc48562cd7b583c185a1138371de5fea8f321a4f7cec579c17416dc87f9dba40df950b6300fe4ecaeaa9f66db223efebf0e
data/.travis.yml CHANGED
@@ -1 +1,7 @@
1
1
  language: objective-c
2
+ before_install:
3
+ - (ruby --version)
4
+ - sudo chown -R travis ~/Library/RubyMotion
5
+ - sudo mkdir -p ~/Library/RubyMotion/build
6
+ - sudo chown -R travis ~/Library/RubyMotion/build
7
+ - sudo motion update
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- WebStub [![Code Climate](https://codeclimate.com/github/mattgreen/webstub.png)](https://codeclimate.com/github/mattgreen/webstub) [![Travis](https://api.travis-ci.org/mattgreen/webstub.png)](https://travis-ci.org/mattgreen/webstub) [![Gem Version](https://badge.fury.io/rb/webstub.png)](http://badge.fury.io/rb/webstub)
1
+ WebStub [![Code Climate](https://codeclimate.com/github/mattgreen/webstub.png)](https://codeclimate.com/github/mattgreen/webstub) [![Travis](https://api.travis-ci.org/nathankot/webstub.png)](https://travis-ci.org/nathankot/webstub) [![Gem Version](https://badge.fury.io/rb/webstub.png)](http://badge.fury.io/rb/webstub)
2
2
  ======
3
3
 
4
4
  What if [WebMock](https://github.com/bblimke/webmock) and [NSURLProtocol](https://developer.apple.com/library/mac/#documentation/Cocoa/Reference/Foundation/Classes/NSURLProtocol_Class/Reference/Reference.html) had a baby?
data/lib/webstub/stub.rb CHANGED
@@ -181,7 +181,8 @@ module WebStub
181
181
  end
182
182
 
183
183
  if query && !query.empty?
184
- parts << "?#{query}"
184
+ q = query.chomp("&")
185
+ parts << "?#{q}"
185
186
  end
186
187
 
187
188
  if fragment && !fragment.empty?
@@ -1,3 +1,3 @@
1
1
  module WebStub
2
- VERSION = "1.1.2"
2
+ VERSION = "1.1.3"
3
3
  end
data/spec/stub_spec.rb CHANGED
@@ -100,6 +100,20 @@ describe WebStub::Stub do
100
100
  end
101
101
  end
102
102
 
103
+ describe "query string" do
104
+ before do
105
+ @stub = WebStub::Stub.new(:get, "http://www.yahoo.com/search?count=1")
106
+ end
107
+
108
+ it "returns true when the query string matches" do
109
+ @stub.matches?(:get, "http://www.yahoo.com/search?count=1").should.be.true
110
+ end
111
+
112
+ it "strips any trailing &" do
113
+ @stub.matches?(:get, "http://www.yahoo.com/search?count=1&").should.be.true
114
+ end
115
+ end
116
+
103
117
  describe "body" do
104
118
  describe "with a dictionary" do
105
119
  before do
data/webstub.gemspec CHANGED
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["mattgreenrocks@gmail.com"]
7
7
  gem.description = "Easily stub out HTTP responses in RubyMotion specs"
8
8
  gem.summary = "Easily stub out HTTP responses in RubyMotion specs"
9
- gem.homepage = "https://github.com/mattgreen/webstub"
9
+ gem.homepage = "https://github.com/nathankot/webstub"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webstub
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Green
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-09-20 00:00:00.000000000 Z
11
+ date: 2015-08-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -74,7 +74,7 @@ files:
74
74
  - spec/stub_spec.rb
75
75
  - spec/uri_spec.rb
76
76
  - webstub.gemspec
77
- homepage: https://github.com/mattgreen/webstub
77
+ homepage: https://github.com/nathankot/webstub
78
78
  licenses:
79
79
  - MIT
80
80
  metadata: {}