LVS-JSONService 0.2.5 → 0.2.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.
- data/.specification +1 -1
- data/JSONService.gemspec +2 -2
- data/VERSION +1 -1
- data/lib/lvs/json_service/base.rb +1 -0
- data/lib/lvs/json_service/request.rb +4 -0
- data/spec/lvs/json_service/request_spec.rb +7 -0
- metadata +2 -2
data/.specification
CHANGED
data/JSONService.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{JSONService}
|
5
|
-
s.version = "0.2.
|
5
|
+
s.version = "0.2.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["LVS"]
|
9
|
-
s.date = %q{2009-
|
9
|
+
s.date = %q{2009-08-06}
|
10
10
|
s.email = %q{info@lvs.co.uk}
|
11
11
|
s.extra_rdoc_files = [
|
12
12
|
"LICENSE",
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.6
|
@@ -68,6 +68,10 @@ module LVS
|
|
68
68
|
raise LVS::JsonService::NotFoundError.new("404 Found for the service", 404, service, args)
|
69
69
|
end
|
70
70
|
|
71
|
+
if response.is_a?(Net::HTTPNotModified)
|
72
|
+
raise LVS::JsonService::NotModified.new("304 Data hasn't changed", 304, service, args)
|
73
|
+
end
|
74
|
+
|
71
75
|
response
|
72
76
|
end
|
73
77
|
|
@@ -180,6 +180,13 @@ describe LVS::JsonService::Request do
|
|
180
180
|
}.should raise_error(LVS::JsonService::NotFoundError)
|
181
181
|
end
|
182
182
|
|
183
|
+
it "should raise LVS::JsonService::NotModified if HTTPNotModified is raised" do
|
184
|
+
@connection.stub!(:request).and_return(Net::HTTPNotModified.new(304, 1.1, "Not Modified"))
|
185
|
+
lambda {
|
186
|
+
do_request
|
187
|
+
}.should raise_error(LVS::JsonService::NotModified)
|
188
|
+
end
|
189
|
+
|
183
190
|
def do_request
|
184
191
|
ClassWithRequest.http_request_with_timeout(@url, @args, @options)
|
185
192
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: LVS-JSONService
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LVS
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-
|
12
|
+
date: 2009-08-06 00:00:00 -07:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|