reactive_resource 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,17 +1,24 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- reactive_resource (0.5.0)
5
- activeresource (~> 2.3.10)
4
+ reactive_resource (0.5.1)
5
+ activeresource (>= 2.3.10)
6
6
 
7
7
  GEM
8
8
  remote: http://rubygems.org/
9
9
  specs:
10
- activeresource (2.3.10)
11
- activesupport (= 2.3.10)
12
- activesupport (2.3.10)
10
+ activemodel (3.0.3)
11
+ activesupport (= 3.0.3)
12
+ builder (~> 2.1.2)
13
+ i18n (~> 0.4)
14
+ activeresource (3.0.3)
15
+ activemodel (= 3.0.3)
16
+ activesupport (= 3.0.3)
17
+ activesupport (3.0.3)
13
18
  addressable (2.2.2)
19
+ builder (2.1.2)
14
20
  crack (0.1.8)
21
+ i18n (0.5.0)
15
22
  rake (0.8.7)
16
23
  shoulda (2.11.3)
17
24
  webmock (1.6.2)
@@ -22,7 +29,7 @@ PLATFORMS
22
29
  ruby
23
30
 
24
31
  DEPENDENCIES
25
- activeresource (~> 2.3.10)
32
+ activeresource (>= 2.3.10)
26
33
  rake
27
34
  reactive_resource!
28
35
  shoulda (~> 2.11.3)
@@ -194,6 +194,25 @@ module ReactiveResource
194
194
  end
195
195
  end
196
196
 
197
+ # ActiveResource (as of 3.0) assumes that you have a to_x method
198
+ # on ActiveResource::Base for any format 'x' that is assigned to
199
+ # the record. This seems weird -- the format should take care of
200
+ # encoding, not the object itself. To keep this as stable as
201
+ # possible, we should use to_x if it's defined, otherwise just
202
+ # delegate to the format's 'encode' function. This is how things
203
+ # worked as of Rails 2.3.
204
+ def encode(options = {})
205
+ if defined?(ActiveResource::VERSION) && ActiveResource::VERSION::MAJOR == 3
206
+ if respond_to?("to_#{self.class.format.extension}")
207
+ super(options)
208
+ else
209
+ self.class.format.encode(attributes, options)
210
+ end
211
+ else
212
+ super(options)
213
+ end
214
+ end
215
+
197
216
  # belongs_to in ReactiveResource works a little differently than
198
217
  # ActiveRecord. Because we have to deal with full class hierachies
199
218
  # in order to generate the full URL (as mentioned in
@@ -1,4 +1,4 @@
1
1
  module ReactiveResource
2
2
  # The current version of ReactiveResource
3
- VERSION = "0.5.0"
3
+ VERSION = "0.5.1"
4
4
  end
@@ -14,7 +14,7 @@ Gem::Specification.new do |s|
14
14
 
15
15
  s.rubyforge_project = "reactive_resource"
16
16
 
17
- s.add_dependency "activeresource", '~> 2.3.10'
17
+ s.add_dependency "activeresource", '>= 2.3.10'
18
18
  s.add_development_dependency "shoulda", '~> 2.11.3'
19
19
  s.add_development_dependency "webmock", '~> 1.6.1'
20
20
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 0
9
- version: 0.5.0
8
+ - 1
9
+ version: 0.5.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Justin Weiss
@@ -14,16 +14,15 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2011-01-18 00:00:00 -08:00
17
+ date: 2011-01-28 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: activeresource
22
- prerelease: false
23
22
  requirement: &id001 !ruby/object:Gem::Requirement
24
23
  none: false
25
24
  requirements:
26
- - - ~>
25
+ - - ">="
27
26
  - !ruby/object:Gem::Version
28
27
  segments:
29
28
  - 2
@@ -31,10 +30,10 @@ dependencies:
31
30
  - 10
32
31
  version: 2.3.10
33
32
  type: :runtime
33
+ prerelease: false
34
34
  version_requirements: *id001
35
35
  - !ruby/object:Gem::Dependency
36
36
  name: shoulda
37
- prerelease: false
38
37
  requirement: &id002 !ruby/object:Gem::Requirement
39
38
  none: false
40
39
  requirements:
@@ -46,10 +45,10 @@ dependencies:
46
45
  - 3
47
46
  version: 2.11.3
48
47
  type: :development
48
+ prerelease: false
49
49
  version_requirements: *id002
50
50
  - !ruby/object:Gem::Dependency
51
51
  name: webmock
52
- prerelease: false
53
52
  requirement: &id003 !ruby/object:Gem::Requirement
54
53
  none: false
55
54
  requirements:
@@ -61,6 +60,7 @@ dependencies:
61
60
  - 1
62
61
  version: 1.6.1
63
62
  type: :development
63
+ prerelease: false
64
64
  version_requirements: *id003
65
65
  description: ActiveRecord-like associations for ActiveResource
66
66
  email:
@@ -104,6 +104,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
104
104
  requirements:
105
105
  - - ">="
106
106
  - !ruby/object:Gem::Version
107
+ hash: 4176716010993460221
107
108
  segments:
108
109
  - 0
109
110
  version: "0"
@@ -112,6 +113,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
112
113
  requirements:
113
114
  - - ">="
114
115
  - !ruby/object:Gem::Version
116
+ hash: 4176716010993460221
115
117
  segments:
116
118
  - 0
117
119
  version: "0"