proxima 2.1.1 → 2.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8eed8f62108a8840bc2f3dd904b44a0fe55a0c9
4
- data.tar.gz: 9bf0e95d4233ae8f1b8d482b0f8ab490cdaa3ee9
3
+ metadata.gz: 172add0db2041ab0e2d4ca1fc8640661af86de23
4
+ data.tar.gz: e96625b4fc91d708093752f3c6cc74b743003808
5
5
  SHA512:
6
- metadata.gz: 6d2eed6723fa0d8ee190c7170dd805110ccd8e43889ff5ef0f0f64178110fbf37c7a97a627a6447e5bff0f8944dbc64d156ec4464accbff60d87b5e0878ea5b0
7
- data.tar.gz: f45e22445a1f491b9de8714370c23012a51cd679aa22cd114a3dee2096cc130006e3ee5a3d2678d4935c28d8f7d88dab8948696f0a99f14b89852df75495defe
6
+ metadata.gz: abc938c70b64a424b8af37cf751d4aa12c26183c595919fc156c890feca7e3101ae454b89c4e332e7a9952e0238e84d8f70834494b670d07fb696d5c8c431d9a
7
+ data.tar.gz: fb26576b44949f52cde4c68ba4213b3c16ae8dcd795835a1d8fb0497daece7d33e094ac18fb7c9f8ffc355c932470238cb1a0c16e7fecb416f526a94afa75ad7
data/lib/proxima/model.rb CHANGED
@@ -122,26 +122,26 @@ module Proxima
122
122
  @response
123
123
  end
124
124
 
125
- def save(options = {}, params = {})
125
+ def save(opts = {}, params = {})
126
126
  return false unless self.valid?
127
127
 
128
128
  if self.new_record?
129
129
  path = self.class.create_path.call self.to_h
130
- payload = { json: self.as_json(options) }
130
+ payload = { json: self.as_json(opts) }
131
131
  @response = self.class.api.post path, payload
132
132
 
133
133
  return false unless @response.code == 201
134
134
 
135
- self.from_json @response.body, options[:include_root]
135
+ self.from_json @response.body, opts
136
136
  self.new_record = false
137
137
  return true
138
138
  end
139
139
 
140
140
  return true if self.persisted?
141
141
 
142
- options[:flatten] = true if options[:flatten] == nil
142
+ opts[:flatten] = true if opts[:flatten] == nil
143
143
  path = self.class.update_by_id_path.call params.merge(self.to_h)
144
- payload = { json: self.as_json(options) }
144
+ payload = { json: self.as_json(opts) }
145
145
  @response = self.class.api.put path, payload
146
146
 
147
147
  return false unless @response.code == 204
@@ -1,5 +1,5 @@
1
1
 
2
2
 
3
3
  module Proxima
4
- VERSION = "2.1.1"
4
+ VERSION = "2.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxima
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Hurst