rest-api-client 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rest/api/client/version.rb +1 -1
- data/lib/rest/api/client.rb +5 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f118ba8b5b82c0a1704d9ede8544350aa7ce1981
|
4
|
+
data.tar.gz: ae299b41686e6b9d2d5d6f839db68e27a03f583f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bcd68e8b60249b1468346f5235b9d58cd91f6895a389e6a1556c713a5a087ddd016793e55e09776c589292b2220a0e045906aba0b40049451523934bcfdbef38
|
7
|
+
data.tar.gz: f4ac50c68fb4b6210f4f5cc359b9ca094e69eaa4f9ce3f2a8bcd54152084783f3d29b43421d6fb515a44743f6b25338553031b4df18292e023fa97476cddd491
|
data/lib/rest/api/client.rb
CHANGED
@@ -12,8 +12,8 @@ require 'rest/api/client/request_handler'
|
|
12
12
|
module RestApiClient
|
13
13
|
|
14
14
|
class RestModel
|
15
|
-
extend
|
16
|
-
extend
|
15
|
+
extend ActiveModel::Naming
|
16
|
+
extend ActiveModel::Translation
|
17
17
|
|
18
18
|
include Virtus.model(:nullify_blank => true)
|
19
19
|
include ActiveModel::Conversion
|
@@ -43,6 +43,7 @@ module RestApiClient
|
|
43
43
|
end
|
44
44
|
|
45
45
|
def save!
|
46
|
+
return false unless valid?
|
46
47
|
begin
|
47
48
|
update_attributes(perform_post path, get_params)
|
48
49
|
self
|
@@ -53,6 +54,8 @@ module RestApiClient
|
|
53
54
|
end
|
54
55
|
|
55
56
|
def save
|
57
|
+
return false unless valid?
|
58
|
+
|
56
59
|
begin
|
57
60
|
update_attributes(perform_post path, get_params)
|
58
61
|
self
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rest-api-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor
|
@@ -210,7 +210,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
version: '0'
|
211
211
|
requirements: []
|
212
212
|
rubyforge_project:
|
213
|
-
rubygems_version: 2.
|
213
|
+
rubygems_version: 2.2.2
|
214
214
|
signing_key:
|
215
215
|
specification_version: 4
|
216
216
|
summary: rest-api-client
|