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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 65f4425663b8d7f4e0220e7b5c72d94b19435a55
4
- data.tar.gz: ebeaa2abc095754772f49c9761d2dfb3db8c266f
3
+ metadata.gz: f118ba8b5b82c0a1704d9ede8544350aa7ce1981
4
+ data.tar.gz: ae299b41686e6b9d2d5d6f839db68e27a03f583f
5
5
  SHA512:
6
- metadata.gz: ad54667d719b3cafadcfb8b1f75511f6b45a04715fcfeda50f60c4e63b8ccf6d7de5cb1e878bdcc09b4b703e7c64afda50163d4ddb2cc0fd49a452c19afbf742
7
- data.tar.gz: 5d2e79716dfe994092b3c7a579f11f25d90a50a524d5b86a28f1d1a49e91601fffc2102a7eb175ac99b181b20b3551808b6c3f7b0df0e1ec96155c057c36d928
6
+ metadata.gz: bcd68e8b60249b1468346f5235b9d58cd91f6895a389e6a1556c713a5a087ddd016793e55e09776c589292b2220a0e045906aba0b40049451523934bcfdbef38
7
+ data.tar.gz: f4ac50c68fb4b6210f4f5cc359b9ca094e69eaa4f9ce3f2a8bcd54152084783f3d29b43421d6fb515a44743f6b25338553031b4df18292e023fa97476cddd491
@@ -1,3 +1,3 @@
1
1
  module RestApiClient
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
@@ -12,8 +12,8 @@ require 'rest/api/client/request_handler'
12
12
  module RestApiClient
13
13
 
14
14
  class RestModel
15
- extend ActiveModel::Naming
16
- extend ActiveModel::Translation
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.6
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.4.7
213
+ rubygems_version: 2.2.2
214
214
  signing_key:
215
215
  specification_version: 4
216
216
  summary: rest-api-client