rhino_project_core 0.30.0.alpha.4 → 0.30.0.alpha.6
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7375d890b7e9ecf59b945b1ee1e46b4ae26aac484cde59f062b0ce36cb466e65
|
4
|
+
data.tar.gz: b78b8369c48e61b6fc28780ac708649a20fbc18a41206b0abd7d12ea288ec2ad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4c67e043a995c9b6166cdf232b7c0c6d56f69001ba1e501fbc7ec395c9c5039c24ce460e3396b7fd2bd388e4ce5238ed50f39c5447606a4b6a9763fe1d54d143
|
7
|
+
data.tar.gz: 1d87c78f76add2df4c33e5ac071ccf126a1cea7a8b29eb59cbb49c97cf22837a226d7c90877498ca683b1600370f1679f23306f171056e48f33f346cbbe2b8e1
|
@@ -61,27 +61,29 @@ module Rhino
|
|
61
61
|
}
|
62
62
|
end
|
63
63
|
|
64
|
+
DATE_FORMATS = %i[datetime date time].freeze
|
64
65
|
def property_type_and_format_attr(name)
|
65
|
-
|
66
|
+
type = attribute_types[name.to_s].type
|
67
|
+
format = nil
|
66
68
|
|
67
69
|
# The PG array delegates type to "subtype" which is the actual type of the array elements
|
68
70
|
if attribute_types[name.to_s].is_a? ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Array
|
69
71
|
return {
|
70
72
|
type: :array,
|
71
|
-
items: {
|
72
|
-
type: atype
|
73
|
-
}
|
73
|
+
items: { type: }
|
74
74
|
}
|
75
75
|
end
|
76
76
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
# Identifier is a special format for identification on the front end
|
78
|
+
format = :identifier if name == identifier_property
|
79
|
+
|
80
|
+
# Dates and times are strings
|
81
|
+
if DATE_FORMATS.include?(type)
|
82
|
+
format = type
|
83
|
+
type = :string
|
82
84
|
end
|
83
85
|
|
84
|
-
{ type:
|
86
|
+
{ type:, format: }.compact
|
85
87
|
end
|
86
88
|
|
87
89
|
def nested_array_options(name)
|
@@ -126,7 +128,6 @@ module Rhino
|
|
126
128
|
|
127
129
|
def property_type_and_format(name) # rubocop:disable Metrics/AbcSize
|
128
130
|
# Special cases
|
129
|
-
return { type: :identifier } if name == identifier_property
|
130
131
|
return { type: :string } if defined_enums.key?(name)
|
131
132
|
|
132
133
|
# FIXME: Hack for tags for now
|
data/lib/rhino/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rhino_project_core
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.30.0.alpha.
|
4
|
+
version: 0.30.0.alpha.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Rosevear
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-12-
|
11
|
+
date: 2024-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|