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 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.5
4
+ version: 0.2.6
5
5
  require_paths:
6
6
  - lib
7
7
  platform: ruby
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"
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-07-29}
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.5
1
+ 0.2.6
@@ -211,5 +211,6 @@ module LVS
211
211
  class NotFoundError < Error; end
212
212
  class TimeoutError < Error; end
213
213
  class BackendUnavailableError < Error; end
214
+ class NotModified < Error; end
214
215
  end
215
216
  end
@@ -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.5
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-07-29 00:00:00 -07:00
12
+ date: 2009-08-06 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies: []
15
15