standardapi 6.0.0.11 → 6.0.0.12

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
  SHA256:
3
- metadata.gz: 46019bd95b04e5330790d39b9b98044ba78d23ebf224f28f7342d26d66c937f7
4
- data.tar.gz: 395bd84163e97c60d3fe5d9b7a0df1f64b5c3b9157855ba28bd48226ea3f6c09
3
+ metadata.gz: dea6fe2070a9d9f2e92b545da5d2f7415568fee783ba45e1be6628822eb49fa7
4
+ data.tar.gz: a4b14c21227e9790fe4913b173faadc310b7384d09c39cd1891b864fd98c2ff6
5
5
  SHA512:
6
- metadata.gz: aa2aa74379bd742b03d1af0272b427f31a8614b712e74ef058db03a13bec9e7a2356429964ff9792705bdeac1e753699e6dd5da1bfa852fa4bb2cd55e53da74c
7
- data.tar.gz: eb51107d8fb44dc1f46774776ed3f20e85e157599ed0b9458b9cbdd27b079e05f6fc839c21b7a26d5600479c380bcb0c9cbc076f139d31665b649b06aa7119fd
6
+ metadata.gz: 451fbdbd66417b109b33d4bc1631f7a9e2913e345b966074baad332168c4184f5d8c7cda94f4e48afb771ef22bd4eb7d9b38986bbd1bd874ceef251001aeddc9
7
+ data.tar.gz: cd109f69f5115e62a66719b1310af3d28a71ce7124d4cc873c139d44b59680edac0ff6330f935a9b1d2ddca2919d18a89fa7d7718d323689bffbed3ec3f04837
@@ -3,9 +3,12 @@ module StandardAPI
3
3
  module CalculateTests
4
4
  extend ActiveSupport::Testing::Declarative
5
5
 
6
+ CALCULATE_COLUMN_TYPES = ["smallint", "int", "bigint", "real", "double precision", "numeric", "interval"]
7
+
6
8
  test '#calculate.json' do
7
9
  create_model
8
- column = model.columns.find { |x| [:integer, :decimal, :date, :datetime].include?(x.type) }.name
10
+
11
+ column = model.columns.find { |x| CALCULATE_COLUMN_TYPES.include?(x.sql_type) }.name
9
12
  selects = [{ count: column}, { maximum: column }, { minimum: column }, { average: column }]
10
13
 
11
14
  get resource_path(:calculate, select: selects, format: :json)
@@ -18,7 +21,7 @@ module StandardAPI
18
21
  m1 = create_model
19
22
  create_model
20
23
 
21
- column = model.columns.find { |x| ![:uuid].include?(x.type) }.name
24
+ column = model.columns.find { |x| CALCULATE_COLUMN_TYPES.include?(x.sql_type) }.name
22
25
  selects = [{ count: column}, { maximum: column }, { minimum: column }, { average: column }]
23
26
  predicate = { id: { gt: m1.id } }
24
27
 
@@ -1,3 +1,3 @@
1
1
  module StandardAPI
2
- VERSION = '6.0.0.11'
2
+ VERSION = '6.0.0.12'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: standardapi
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.0.11
4
+ version: 6.0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Bracy