coaster 1.3.22 → 1.3.24
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coaster/core_ext/standard_error.rb +1 -1
- data/lib/coaster/serialized_properties.rb +8 -5
- data/lib/coaster/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 93d6eff77edc91b0d5989d307825945689cfc919db3bd239b4f78f1618613efe
|
4
|
+
data.tar.gz: 427785528213c55a795202ccc1ce8f0022df964049d5c6ac19a7e3ada026addc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c679ef541736287ab90c0ae9cba765c3df13ee4713371bc124b36bd35e9bf48b4ed98e08dae42a1850be4f0c7d6f42e805e7062ccc0b927707ad7ff2d0910e6
|
7
|
+
data.tar.gz: cd12e7dadf13ffb039c75674d82868cc9a61f086fb1f55a1bdd73a02002895eb68107359a557d7d18d343a8f768a2cd8773956f2e00c5e811a2853695cc6a605
|
@@ -278,7 +278,7 @@ class StandardError
|
|
278
278
|
dh = _dh || to_inspection_hash(options: options, _h: {}.with_indifferent_access, _depth: 0)
|
279
279
|
lg = "[#{dh[:type]}] status:#{dh[:status]}"
|
280
280
|
lg += "\n MESSAGE: #{dh[:message]&.gsub(/\n/, "\n ")}"
|
281
|
-
dh[:instance_variables]
|
281
|
+
dh[:instance_variables]&.each do |var, val|
|
282
282
|
lg += "\n #{var}: #{val}"
|
283
283
|
end
|
284
284
|
if (bt = dh[:backtrace] || [])
|
@@ -73,7 +73,8 @@ module Coaster
|
|
73
73
|
},
|
74
74
|
getter: proc { |val|
|
75
75
|
type.include?(val) ? val : nil
|
76
|
-
}
|
76
|
+
},
|
77
|
+
default: default
|
77
78
|
else
|
78
79
|
if type == Time
|
79
80
|
_define_serialized_property serialize_column, key,
|
@@ -82,18 +83,20 @@ module Coaster
|
|
82
83
|
if val.is_a?(Time)
|
83
84
|
val.respond_to?(:to_fs) ? val.to_fs(:default_tz) : val.to_s(:default_tz)
|
84
85
|
end
|
85
|
-
}
|
86
|
+
},
|
87
|
+
default: default
|
86
88
|
elsif type == Integer
|
87
89
|
_define_serialized_property serialize_column, key,
|
88
90
|
setter: proc { |val|
|
89
91
|
val = val.blank? ? nil : Integer(val)
|
90
92
|
val = setter.call(val) if setter
|
91
93
|
val
|
92
|
-
}
|
94
|
+
},
|
95
|
+
default: default
|
93
96
|
elsif type == Array
|
94
|
-
_define_serialized_property(serialize_column, key, default: [])
|
97
|
+
_define_serialized_property(serialize_column, key, default: default || [])
|
95
98
|
elsif type && type < ActiveRecord::Base
|
96
|
-
_define_serialized_property serialize_column, "#{key}_id"
|
99
|
+
_define_serialized_property serialize_column, "#{key}_id", default: default
|
97
100
|
|
98
101
|
define_method key.to_sym do
|
99
102
|
instance_val = instance_variable_get("@#{key}".to_sym)
|
data/lib/coaster/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coaster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.24
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- buzz jung
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-12-
|
11
|
+
date: 2022-12-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: i18n
|