rightresource 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/right_resource.rb +2 -2
- data/lib/right_resource/base.rb +3 -3
- metadata +3 -3
data/lib/right_resource.rb
CHANGED
@@ -4,7 +4,7 @@ require 'logger'
|
|
4
4
|
require 'pp'
|
5
5
|
require 'rubygems'
|
6
6
|
|
7
|
-
require 'json'
|
7
|
+
require 'json/pure'
|
8
8
|
require 'rest_client'
|
9
9
|
require 'crack'
|
10
10
|
|
@@ -38,6 +38,6 @@ require 'right_resource/macro'
|
|
38
38
|
require 'right_resource/credential'
|
39
39
|
|
40
40
|
module RightResource
|
41
|
-
VERSION = '0.3.
|
41
|
+
VERSION = '0.3.2'
|
42
42
|
API_VERSION = "1.0"
|
43
43
|
end
|
data/lib/right_resource/base.rb
CHANGED
@@ -343,10 +343,10 @@ module RightResource
|
|
343
343
|
@attributes = {}
|
344
344
|
load_attributes(attributes)
|
345
345
|
if @attributes
|
346
|
-
if self.class.resource_id.
|
347
|
-
@id = @attributes[:href].match(/\d+$/).to_s if @attributes[:href]
|
348
|
-
else
|
346
|
+
if self.class.resource_id && self.class.status_code == 201
|
349
347
|
@id = self.class.resource_id
|
348
|
+
else
|
349
|
+
@id = @attributes[:href].match(/\d+$/).to_s if @attributes[:href]
|
350
350
|
end
|
351
351
|
load_accessor(@attributes)
|
352
352
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rightresource
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 23
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Satoshi Ohki
|