copperegg 0.6.0.pre2 → 0.6.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/copperegg-0.6.0.pre2.gem +0 -0
- data/copperegg-0.6.0.pre3.gem +0 -0
- data/lib/copperegg/mixins/persistence.rb +6 -5
- data/lib/copperegg/ver.rb +1 -1
- metadata +2 -1
data/copperegg-0.6.0.pre2.gem
CHANGED
Binary file
|
File without changes
|
@@ -12,12 +12,13 @@ module CopperEgg
|
|
12
12
|
params = args.last.class == Hash ? args.pop : {}
|
13
13
|
id = args.first
|
14
14
|
response = request(params.merge(:request_type => "get", :id => id))
|
15
|
-
if response
|
16
|
-
response.
|
17
|
-
|
15
|
+
if response.code == "200"
|
16
|
+
json = JSON.parse(response.body)
|
17
|
+
if json.is_a?(Array)
|
18
|
+
json.map {|attributes| new(attributes)}
|
19
|
+
else
|
20
|
+
new(json)
|
18
21
|
end
|
19
|
-
elsif response
|
20
|
-
new JSON.parse(response.body)
|
21
22
|
end
|
22
23
|
end
|
23
24
|
|
data/lib/copperegg/ver.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: copperegg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.0.
|
4
|
+
version: 0.6.0.pre3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -35,6 +35,7 @@ extra_rdoc_files: []
|
|
35
35
|
files:
|
36
36
|
- ./CHANGELOG.md
|
37
37
|
- ./copperegg-0.6.0.pre2.gem
|
38
|
+
- ./copperegg-0.6.0.pre3.gem
|
38
39
|
- ./copperegg.gemspec
|
39
40
|
- ./Gemfile
|
40
41
|
- ./Gemfile.lock
|