standardapi 5.0.0.10 → 5.0.0.12
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7e4bd9a29e2b2aca1714dacb7fb88b4a3b68aa0a
|
4
|
+
data.tar.gz: 696774eaffe23e7a31c2b05fe2c4b8d05aceacbe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b06a888614e9e71a8fe72f2f999da46c639e7f22f306285bdf8ef48ea3031bf6604de46e0a64ba3a6a912f5eaf223314cacf48317ce96415283bd2234a6aa3c9
|
7
|
+
data.tar.gz: 3b4922dbe3dfa8cc26ab3a2566f87a81e1291e9b49ef68b2040344cc2753047e768f70e2799f2ca4ba5b9f8bd216fa17facfb6d4ac569aedb093c3c541d554c7
|
@@ -24,9 +24,9 @@ module StandardAPI
|
|
24
24
|
view_attributes(m.reload).select { |x| attrs.keys.map(&:to_s).include?(x) }.each do |key, value|
|
25
25
|
message = "Model / Attribute: #{m.class.name}##{key}"
|
26
26
|
if value.is_a?(BigDecimal)
|
27
|
-
|
27
|
+
assert_equal_or_nil normalize_to_json(m, key, attrs[key.to_sym]).to_s.to_f, json[key.to_s].to_s.to_f, message
|
28
28
|
else
|
29
|
-
|
29
|
+
assert_equal_or_nil normalize_to_json(m, key, attrs[key.to_sym]), json[key.to_s], message
|
30
30
|
end
|
31
31
|
end
|
32
32
|
end
|
@@ -53,7 +53,7 @@ module StandardAPI
|
|
53
53
|
m.reload
|
54
54
|
view_attributes(m).select { |x| attrs.keys.map(&:to_s).include?(x) }.each do |key, value|
|
55
55
|
message = "Model / Attribute: #{m.class.name}##{key}"
|
56
|
-
|
56
|
+
assert_equal_or_nil normalize_attribute(m, key, attrs[key.to_sym]), value, message
|
57
57
|
end
|
58
58
|
end
|
59
59
|
end
|
@@ -19,9 +19,9 @@ module StandardAPI
|
|
19
19
|
view_attributes(m.reload).select { |x| attrs.keys.map(&:to_s).include?(x) }.each do |key, value|
|
20
20
|
message = "Model / Attribute: #{m.class.name}##{key}"
|
21
21
|
if value.is_a?(BigDecimal)
|
22
|
-
|
22
|
+
assert_equal_or_nil normalize_attribute(m, key, attrs[key.to_sym]).to_s.to_f, value.to_s.to_f, message
|
23
23
|
else
|
24
|
-
|
24
|
+
assert_equal_or_nil normalize_attribute(m, key, attrs[key.to_sym]), value, message
|
25
25
|
end
|
26
26
|
end
|
27
27
|
assert JSON.parse(@response.body).is_a?(Hash)
|
@@ -58,7 +58,7 @@ module StandardAPI
|
|
58
58
|
# (m.attribute_names & attrs.keys.map(&:to_s)).each do |test_key|
|
59
59
|
view_attributes(m.reload).select { |x| attrs.keys.map(&:to_s).include?(x) }.each do |key, value|
|
60
60
|
message = "Model / Attribute: #{m.class.name}##{key}"
|
61
|
-
|
61
|
+
assert_equal_or_nil normalize_attribute(m, key, attrs[key.to_sym]), value, message
|
62
62
|
end
|
63
63
|
assert JSON.parse(@response.body).is_a?(Hash)
|
64
64
|
end
|
@@ -10,6 +10,14 @@ require File.expand_path(File.join(__FILE__, '../test_case/show_tests'))
|
|
10
10
|
require File.expand_path(File.join(__FILE__, '../test_case/update_tests'))
|
11
11
|
|
12
12
|
module StandardAPI::TestCase
|
13
|
+
|
14
|
+
def assert_equal_or_nil(expected, *args)
|
15
|
+
if expected.nil?
|
16
|
+
assert_nil(*args)
|
17
|
+
else
|
18
|
+
assert_equal(expected, *args)
|
19
|
+
end
|
20
|
+
end
|
13
21
|
|
14
22
|
def self.included(klass)
|
15
23
|
[:filters, :orders, :includes].each do |attribute|
|
data/lib/standard_api/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
1
|
module StandardAPI
|
2
|
-
VERSION = '5.0.0.
|
3
|
-
end
|
2
|
+
VERSION = '5.0.0.12'
|
3
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: standardapi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.0.0.
|
4
|
+
version: 5.0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Bracy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|