restful_resource 0.0.5 → 0.0.6

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5e007325204f8aa0dfb465f3370a0d2e84f54a94
4
- data.tar.gz: c23007a5a0a3e8320fda92f43ed0a2290c0c3b65
3
+ metadata.gz: b63bd74149e842a3d3c1593186507f226559045f
4
+ data.tar.gz: 2df40c1661f47a33e6db3234186e5a1aeb944818
5
5
  SHA512:
6
- metadata.gz: 6f6abda88019ec8739f80b92aaab7c4a3b014689caf050b92ddc58ab9ef61b5da5c7eca24012917e39986d57cd1e667675c6598c85fe6b7730e12dcff7ee76cd
7
- data.tar.gz: 41eee9a852ea62125c0c44d6264a4d3817ac35304850bb9c1cb66cc66e8db85b234bbe9d800909003c54fd2b1593bbe20b44ebf1a61f2c28ff63b9eb4ca52cf3
6
+ metadata.gz: 7c870acbb5512f0062cbfd6f4e6169b745e700a95fe704cf7e3e6168414f4ebe5daeb48df87bdbdf8c4b4684c5eec3204d004f01ec663ec23eae5d7ceafc73e7
7
+ data.tar.gz: 82b50df9044b356a6d0dc1b612b101360c36261cb09ff535bec8dab895647647562610ed2446f274b3c02472901535a0db09bdb112c57a5732895688b00bc33a
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # RestfulResource
1
+ # [[RestfulResource]]
2
2
 
3
3
  TODO: Write a gem description
4
4
 
@@ -10,7 +10,7 @@ module RestfulResource
10
10
  url = url.gsub(':'+key.to_s, params[key].to_s)
11
11
  end
12
12
 
13
- url_params = url.scan(/:([^\/]+)/)
13
+ url_params = url.scan(/:([A-Za-z][^\/]*)/)
14
14
  if url_params.any?
15
15
  raise ParameterMissingError.new(url_params)
16
16
  end
@@ -1,3 +1,3 @@
1
1
  module RestfulResource
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -43,6 +43,12 @@ describe RestfulResource::Base do
43
43
  expected_error_message = 'You must pass values for the following parameters: [country_slug, team_id]'
44
44
  expect { Player.url }.to raise_error(RestfulResource::ParameterMissingError, expected_error_message)
45
45
  end
46
+
47
+ it "should not confuse port number as a parameter" do
48
+ Player.url = 'http://api.carwow.co.uk:7000/teams/:team_id/players'
49
+
50
+ expect { Player.url(team_id: 13) }.not_to raise_error
51
+ end
46
52
  end
47
53
 
48
54
  context "#all" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restful_resource
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Santoro