proxima 3.4.1 → 4.0.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: b06a381230d881b181f14f786fc96556260373f8
4
- data.tar.gz: 592da9dab410e16df54e8ef6b1bffdd5d4aac7e5
3
+ metadata.gz: d51166ac91e422778f0a72853c2931c24381b03e
4
+ data.tar.gz: 18096643dda46b9a65f2a5143f549baa88a536ee
5
5
  SHA512:
6
- metadata.gz: 1bc5a9dfbe700358e914554580520d31459c2b6a19ffa736fb4759bc775142c9ce1881985109c4aee126908b817b56d486d235275bf64a26513415e0afd3703e
7
- data.tar.gz: c4fcbe0acc47df659dcd168ca63600ee5f9312cb6089b38507afb610601e0d467d7d0ff81d599ee9108adebbaa7c744a6f0f830e8fad5bfa36c4eed520ac07ab
6
+ metadata.gz: 2dd862f03f929a681f66808327d328d3a552b4a1a20d8cdeca3cfdc077ac142e463656250b7ea72f89850e4fb5697e6c2607a3583899731128e4b572447ca7da
7
+ data.tar.gz: a62056777352dd6ccfd6f11c8e846d6838e107a37aaed5d30dce8c2c00104eb251f0de38f6d0d4dd44fd10a31fe097bd53b428093fe59d58f0f8d437d30c7679
data/lib/proxima/model.rb CHANGED
@@ -82,7 +82,9 @@ module Proxima
82
82
 
83
83
  return nil unless @response.code == 200
84
84
 
85
- @response.headers[:x_total_count] || 0
85
+ total_count = @response.headers[:x_total_count]
86
+
87
+ total_count.present? ? total_count.to_i : 0
86
88
  end
87
89
 
88
90
  def self.find_by_id(id, params = {}, opts = {})
@@ -51,6 +51,8 @@ module Proxima
51
51
  json_path = params[:json_path]
52
52
  value = hash[attribute.to_s]
53
53
 
54
+ next if value.nil?
55
+
54
56
  if params[:klass]
55
57
  begin
56
58
  value = Proxima.type_to_json params[:klass], value
@@ -1,5 +1,4 @@
1
1
 
2
-
3
2
  module Proxima
4
- VERSION = "3.4.1"
3
+ VERSION = "4.0.0"
5
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: proxima
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.4.1
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Hurst
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-02 00:00:00.000000000 Z
11
+ date: 2017-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler