ringioAPI 0.0.9 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/ringioAPI/contact.rb +4 -0
- data/lib/ringioAPI/ring.rb +2 -17
- data/lib/ringioAPI/version.rb +1 -1
- metadata +3 -3
data/lib/ringioAPI/contact.rb
CHANGED
data/lib/ringioAPI/ring.rb
CHANGED
@@ -2,28 +2,13 @@ module RingioAPI
|
|
2
2
|
|
3
3
|
class Ring < Base
|
4
4
|
|
5
|
-
# override
|
5
|
+
# override method as a temporary solution of the JSON parsing bugs of Rails
|
6
6
|
def self.find(ring_id)
|
7
7
|
super(ring_id).ring
|
8
8
|
end
|
9
9
|
|
10
10
|
def save
|
11
|
-
|
12
|
-
result = super
|
13
|
-
|
14
|
-
# move the fields returned after an update response to their proper place in the root
|
15
|
-
begin
|
16
|
-
self.id = self.ring.id
|
17
|
-
rescue NoMethodError
|
18
|
-
end
|
19
|
-
|
20
|
-
# clean the unused nested resource
|
21
|
-
begin
|
22
|
-
self.ring = nil
|
23
|
-
rescue NoMethodError
|
24
|
-
end
|
25
|
-
|
26
|
-
result
|
11
|
+
raise "Cannot change Ringio rings"
|
27
12
|
end
|
28
13
|
|
29
14
|
|
data/lib/ringioAPI/version.rb
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
+
- 1
|
7
8
|
- 0
|
8
|
-
|
9
|
-
version: 0.0.9
|
9
|
+
version: 0.1.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- "\xC3\x81lvaro Mart\xC3\xADn Fraguas"
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date:
|
17
|
+
date: 2011-01-04 00:00:00 +01:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|