rhino_project_core 0.30.0.alpha.5 → 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: 2c236921f30ba92d324fbf5a6dbce5ecc8d3a3545d87d569aac256d38fb07cf7
4
- data.tar.gz: 96280b81678975fa81b37179acf8897520dfc2b5a9e789040df7c272c5997349
3
+ metadata.gz: 7375d890b7e9ecf59b945b1ee1e46b4ae26aac484cde59f062b0ce36cb466e65
4
+ data.tar.gz: b78b8369c48e61b6fc28780ac708649a20fbc18a41206b0abd7d12ea288ec2ad
5
5
  SHA512:
6
- metadata.gz: c69239c775a3da2f7451e66b800ff0887b813cd9f61f3a314f693e46c78120a332c556ae2b0f93b70040aadb9c7c7e70a6c6da821c4d84073ad45fb7baf75a0c
7
- data.tar.gz: 8ffa86b1fd8eb3d713f616b4941fd8a77a015c2a94d0e7dd7347dfde9f0816f262186b54de099b71319e5b840fed1842f62e5ae220b8fb01ce9652277025f5f3
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
- atype = attribute_types[name.to_s].type
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
- if %i[datetime date time].include?(atype)
78
- return {
79
- type: "string",
80
- format: atype
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: atype }
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
@@ -10,7 +10,7 @@ module Rhino
10
10
  MAJOR = 0
11
11
  MINOR = 30
12
12
  TINY = 0
13
- PRE = "alpha.5"
13
+ PRE = "alpha.6"
14
14
 
15
15
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join(".")
16
16
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.5
4
+ version: 0.30.0.alpha.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Rosevear