remotable 0.3.0.beta1 → 0.3.0

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: 85b05a6cc382c7d6d7c3308804b4feb1f78146b9
4
- data.tar.gz: bf62759812b727023fbea3535e9b5a414d785e38
3
+ metadata.gz: 55fd48684b48f738a160bce22e85c08a8bf206be
4
+ data.tar.gz: 8b157f2ee0ea3e3baf10de49391a22ceebe3459e
5
5
  SHA512:
6
- metadata.gz: fb553ea2e7a419ef3d8fc80554fd60ebccc6e09601098a2dc535aa225393af060058ac18ac888472e3a2394b3e9a2815ae6ee0cdd99594eb6373828366deb1f4
7
- data.tar.gz: 820228c09fc5bf588c039923782ef1b2799f5116eafc6ae8b6b0818eef72b433cf297048c5c5aba78ab6ce142fb8a105d35bee567d83e4b344ce7dc65789240f
6
+ metadata.gz: 08d450f3c0efde8b23c84a75135576293715df063657d608730ad6ad3f175082f1edf8c116ff8a92f9e5c50ee6693bee9fcf72b6854a6f3d4db63d6dabcb1ead
7
+ data.tar.gz: 5c89a432fa32638f8e28fc1e08e784dd059fb7d506bed8dec03d104be0c166f3b26df528804023f278f3d1550c1437d200f0864fa04904663b9a1cd6cdfeecb9
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- remotable (0.3.0.beta1)
4
+ remotable (0.3.0)
5
5
  activerecord
6
6
  activeresource
7
7
  activesupport
@@ -420,6 +420,12 @@ module Remotable
420
420
 
421
421
 
422
422
 
423
+ def accepts_not_modified?
424
+ respond_to?(:updated_at)
425
+ end
426
+
427
+
428
+
423
429
  def pull_remote_data!
424
430
  if remote_resource
425
431
  merge_remote_data!(remote_resource)
@@ -60,7 +60,7 @@ module Remotable
60
60
  had_previous_value = headers.key?(IF_MODIFIED_SINCE)
61
61
  previous_value = headers[IF_MODIFIED_SINCE]
62
62
 
63
- headers[IF_MODIFIED_SINCE] = Remotable.http_format_time(local_record.updated_at) if local_record.respond_to?(:updated_at)
63
+ headers[IF_MODIFIED_SINCE] = Remotable.http_format_time(local_record.updated_at) if local_record.accepts_not_modified?
64
64
  find_by(path)
65
65
  ensure
66
66
  if had_previous_value
@@ -87,6 +87,7 @@ module Remotable
87
87
  raise
88
88
  rescue ::ActiveResource::ServerError
89
89
  $!.extend Remotable::ServiceUnavailableError if $!.response.code == 503
90
+ $!.extend Remotable::TimeoutError if $!.response.code == 504
90
91
  raise
91
92
  end
92
93
 
@@ -1,3 +1,3 @@
1
1
  module Remotable
2
- VERSION = "0.3.0.beta1"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remotable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0.beta1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Lail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-02-26 00:00:00.000000000 Z
11
+ date: 2014-05-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource
@@ -241,9 +241,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
241
241
  version: '0'
242
242
  required_rubygems_version: !ruby/object:Gem::Requirement
243
243
  requirements:
244
- - - '>'
244
+ - - '>='
245
245
  - !ruby/object:Gem::Version
246
- version: 1.3.1
246
+ version: '0'
247
247
  requirements: []
248
248
  rubyforge_project: remotable
249
249
  rubygems_version: 2.2.1