granite-form 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop_todo.yml +1 -1
- data/CHANGELOG.md +7 -0
- data/Rakefile +4 -0
- data/granite-form.gemspec +1 -0
- data/lib/granite/form/config.rb +10 -10
- data/lib/granite/form/model/associations/nested_attributes.rb +3 -3
- data/lib/granite/form/model/associations/reflections/references_many.rb +3 -1
- data/lib/granite/form/model/associations/reflections/references_one.rb +3 -1
- data/lib/granite/form/model/attributes/attribute.rb +1 -1
- data/lib/granite/form/model/attributes/base.rb +13 -16
- data/lib/granite/form/model/attributes/collection.rb +1 -1
- data/lib/granite/form/model/attributes/dictionary.rb +1 -1
- data/lib/granite/form/model/attributes/localized.rb +1 -1
- data/lib/granite/form/model/attributes/reference_many.rb +1 -1
- data/lib/granite/form/model/attributes/reference_one.rb +1 -9
- data/lib/granite/form/model/attributes/reflections/base.rb +1 -5
- data/lib/granite/form/model/attributes/reflections/reference_one.rb +0 -4
- data/lib/granite/form/model/validations/nested.rb +1 -1
- data/lib/granite/form/types/active_support/time_zone.rb +22 -0
- data/lib/granite/form/types/array.rb +17 -0
- data/lib/granite/form/types/big_decimal.rb +15 -0
- data/lib/granite/form/types/boolean.rb +38 -0
- data/lib/granite/form/types/date.rb +15 -0
- data/lib/granite/form/types/date_time.rb +15 -0
- data/lib/granite/form/types/float.rb +15 -0
- data/lib/granite/form/types/hash_with_action_controller_parameters.rb +18 -0
- data/lib/granite/form/types/integer.rb +13 -0
- data/lib/granite/form/types/object.rb +30 -0
- data/lib/granite/form/types/string.rb +13 -0
- data/lib/granite/form/types/time.rb +15 -0
- data/lib/granite/form/types/uuid.rb +22 -0
- data/lib/granite/form/types.rb +15 -0
- data/lib/granite/form/version.rb +1 -1
- data/lib/granite/form.rb +19 -118
- data/spec/{lib/granite → granite}/form/active_record/associations_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/active_record/nested_attributes_spec.rb +0 -1
- data/spec/{lib/granite → granite}/form/config_spec.rb +22 -10
- data/spec/granite/form/extensions_spec.rb +12 -0
- data/spec/{lib/granite → granite}/form/model/associations/embeds_many_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/embeds_one_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/nested_attributes_spec.rb +0 -1
- data/spec/{lib/granite → granite}/form/model/associations/persistence_adapters/active_record_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/references_many_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/references_one_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/reflections/embeds_any_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/reflections/embeds_many_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/reflections/embeds_one_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/reflections/references_many_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/reflections/references_one_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations/validations_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/associations_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/attribute_spec.rb +4 -46
- data/spec/{lib/granite → granite}/form/model/attributes/base_spec.rb +11 -2
- data/spec/{lib/granite → granite}/form/model/attributes/collection_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/dictionary_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/localized_spec.rb +1 -1
- data/spec/{lib/granite → granite}/form/model/attributes/reflections/attribute_spec.rb +0 -12
- data/spec/{lib/granite → granite}/form/model/attributes/reflections/base_spec.rb +1 -1
- data/spec/{lib/granite → granite}/form/model/attributes/reflections/collection_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/reflections/dictionary_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/reflections/localized_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/reflections/represents_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes/represents_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/attributes_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/callbacks_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/conventions_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/dirty_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/lifecycle_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/persistence_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/primary_spec.rb +1 -1
- data/spec/{lib/granite → granite}/form/model/representation_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/scopes_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/validations/associated_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model/validations/nested_spec.rb +55 -11
- data/spec/{lib/granite → granite}/form/model/validations_spec.rb +0 -0
- data/spec/{lib/granite → granite}/form/model_spec.rb +0 -0
- data/spec/granite/form/types/active_support/time_zone_spec.rb +24 -0
- data/spec/granite/form/types/array_spec.rb +13 -0
- data/spec/granite/form/types/big_decimal_spec.rb +19 -0
- data/spec/granite/form/types/boolean_spec.rb +21 -0
- data/spec/granite/form/types/date_spec.rb +18 -0
- data/spec/granite/form/types/date_time_spec.rb +20 -0
- data/spec/granite/form/types/float_spec.rb +19 -0
- data/spec/granite/form/types/hash_with_action_controller_parameters_spec.rb +22 -0
- data/spec/granite/form/types/integer_spec.rb +18 -0
- data/spec/granite/form/types/object_spec.rb +40 -0
- data/spec/granite/form/types/string_spec.rb +13 -0
- data/spec/granite/form/types/time_spec.rb +31 -0
- data/spec/granite/form/types/uuid_spec.rb +21 -0
- data/spec/{lib/granite → granite}/form_spec.rb +0 -0
- data/spec/{shared → support/shared}/nested_attribute_examples.rb +0 -0
- data/spec/support/shared/type_examples.rb +7 -0
- metadata +147 -91
- data/spec/lib/granite/form/model/typecasting_spec.rb +0 -193
@@ -0,0 +1,20 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::DateTime do
|
6
|
+
# rubocop:disable Style/DateTime
|
7
|
+
describe 'typecasting' do
|
8
|
+
include_context 'type setup', 'DateTime'
|
9
|
+
let(:datetime) { DateTime.new(2013, 6, 13, 23, 13) }
|
10
|
+
|
11
|
+
specify { expect(typecast(nil)).to be_nil }
|
12
|
+
specify { expect(typecast('2013-06-13 23:13')).to eq(datetime) }
|
13
|
+
specify { expect(typecast('2013-55-55 55:55')).to be_nil }
|
14
|
+
specify { expect(typecast('blablabla')).to be_nil }
|
15
|
+
specify { expect(typecast(Date.new(2013, 6, 13))).to eq(DateTime.new(2013, 6, 13, 0, 0)) }
|
16
|
+
specify { expect(typecast(Time.utc(2013, 6, 13, 23, 13).utc)).to eq(datetime) }
|
17
|
+
specify { expect(typecast(DateTime.new(2013, 6, 13, 23, 13))).to eq(datetime) }
|
18
|
+
end
|
19
|
+
# rubocop:enable Style/DateTime
|
20
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::Float do
|
6
|
+
describe 'typecasting' do
|
7
|
+
include_context 'type setup', 'Float'
|
8
|
+
|
9
|
+
specify { expect(typecast('hello')).to be_nil }
|
10
|
+
specify { expect(typecast('123hello')).to be_nil }
|
11
|
+
specify { expect(typecast('123')).to eq(123.0) }
|
12
|
+
specify { expect(typecast('123.')).to be_nil }
|
13
|
+
specify { expect(typecast('123.5')).to eq(123.5) }
|
14
|
+
specify { expect(typecast(123)).to eq(123.0) }
|
15
|
+
specify { expect(typecast(123.5)).to eq(123.5) }
|
16
|
+
specify { expect(typecast(nil)).to be_nil }
|
17
|
+
specify { expect(typecast([123.5])).to be_nil }
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::HashWithActionControllerParameters do
|
6
|
+
describe 'typecasting' do
|
7
|
+
include_context 'type setup', 'Hash'
|
8
|
+
|
9
|
+
before(:all) do
|
10
|
+
require 'action_controller'
|
11
|
+
Class.new(ActionController::Base)
|
12
|
+
end
|
13
|
+
|
14
|
+
let(:to_h) { {'x' => {'foo' => 'bar'}, 'y' => 2} }
|
15
|
+
let(:parameters) { ActionController::Parameters.new(to_h) }
|
16
|
+
|
17
|
+
specify { expect(typecast(nil)).to be_nil }
|
18
|
+
specify { expect(typecast(to_h)).to eq(to_h) }
|
19
|
+
specify { expect(typecast(parameters)).to be_nil }
|
20
|
+
specify { expect(typecast(parameters.permit(:y, x: [:foo]))).to eq(to_h) }
|
21
|
+
end
|
22
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::Integer do
|
6
|
+
describe 'typecasting' do
|
7
|
+
include_context 'type setup', 'Integer'
|
8
|
+
|
9
|
+
specify { expect(typecast('hello')).to be_nil }
|
10
|
+
specify { expect(typecast('123hello')).to be_nil }
|
11
|
+
specify { expect(typecast('123')).to eq(123) }
|
12
|
+
specify { expect(typecast('123.5')).to eq(123) }
|
13
|
+
specify { expect(typecast(123)).to eq(123) }
|
14
|
+
specify { expect(typecast(123.5)).to eq(123) }
|
15
|
+
specify { expect(typecast(nil)).to be_nil }
|
16
|
+
specify { expect(typecast([123])).to be_nil }
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::Object do
|
6
|
+
subject(:type) { described_class.new(String, reflection, model.new) }
|
7
|
+
let(:model) { stub_model }
|
8
|
+
let(:reflection) { Granite::Form::Model::Attributes::Reflections::Base.new(:field) }
|
9
|
+
|
10
|
+
describe '#initialize' do
|
11
|
+
it { is_expected.to have_attributes(type: String, reflection: reflection, owner: an_instance_of(model)) }
|
12
|
+
end
|
13
|
+
|
14
|
+
describe 'typecasting' do
|
15
|
+
before { stub_class(:descendant) }
|
16
|
+
|
17
|
+
context 'with Object type' do
|
18
|
+
include_context 'type setup', 'Object'
|
19
|
+
|
20
|
+
specify { expect(typecast('hello')).to eq('hello') }
|
21
|
+
specify { expect(typecast([])).to eq([]) }
|
22
|
+
specify { expect(typecast(Descendant.new)).to be_a(Descendant) }
|
23
|
+
specify { expect(typecast(Object.new)).to be_a(Object) }
|
24
|
+
specify { expect(typecast(nil)).to be_nil }
|
25
|
+
end
|
26
|
+
|
27
|
+
context 'with Descendant type' do
|
28
|
+
include_context 'type setup', 'Descendant'
|
29
|
+
|
30
|
+
before { stub_class(:descendant2, Descendant) }
|
31
|
+
|
32
|
+
specify { expect(typecast('hello')).to be_nil }
|
33
|
+
specify { expect(typecast([])).to be_nil }
|
34
|
+
specify { expect(typecast(Descendant.new)).to be_a(Descendant) }
|
35
|
+
specify { expect(typecast(Descendant2.new)).to be_a(Descendant2) }
|
36
|
+
specify { expect(typecast(Object.new)).to be_nil }
|
37
|
+
specify { expect(typecast(nil)).to be_nil }
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::String do
|
6
|
+
describe 'typecasting' do
|
7
|
+
include_context 'type setup', 'String'
|
8
|
+
|
9
|
+
specify { expect(typecast('hello')).to eq('hello') }
|
10
|
+
specify { expect(typecast(123)).to eq('123') }
|
11
|
+
specify { expect(typecast(nil)).to be_nil }
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::Time do
|
6
|
+
# rubocop:disable Style/DateTime
|
7
|
+
describe 'typecasting' do
|
8
|
+
include_context 'type setup', 'Time'
|
9
|
+
|
10
|
+
specify { expect(typecast(nil)).to be_nil }
|
11
|
+
specify { expect(typecast('2013-06-13 23:13')).to eq('2013-06-13 23:13'.to_time) }
|
12
|
+
specify { expect(typecast('2013-55-55 55:55')).to be_nil }
|
13
|
+
specify { expect(typecast('blablabla')).to be_nil }
|
14
|
+
specify { expect(typecast(Date.new(2013, 6, 13))).to eq(Time.new(2013, 6, 13, 0, 0)) }
|
15
|
+
specify { expect(typecast(DateTime.new(2013, 6, 13, 19, 13))).to eq(DateTime.new(2013, 6, 13, 19, 13).to_time) }
|
16
|
+
specify { expect(typecast(Time.new(2013, 6, 13, 23, 13))).to eq(Time.new(2013, 6, 13, 23, 13)) }
|
17
|
+
|
18
|
+
context 'Time.zone set' do
|
19
|
+
around { |example| Time.use_zone('Bangkok', &example) }
|
20
|
+
|
21
|
+
specify { expect(typecast(nil)).to be_nil }
|
22
|
+
specify { expect(typecast('2013-06-13 23:13')).to eq(Time.zone.parse('2013-06-13 23:13')) }
|
23
|
+
specify { expect(typecast('2013-55-55 55:55')).to be_nil }
|
24
|
+
specify { expect(typecast('blablabla')).to be_nil }
|
25
|
+
specify { expect(typecast(Date.new(2013, 6, 13))).to eq(Time.new(2013, 6, 13, 0, 0)) }
|
26
|
+
specify { expect(typecast(DateTime.new(2013, 6, 13, 19, 13))).to eq(DateTime.new(2013, 6, 13, 19, 13).to_time) }
|
27
|
+
specify { expect(typecast(Time.new(2013, 6, 13, 23, 13))).to eq(Time.new(2013, 6, 13, 23, 13)) }
|
28
|
+
end
|
29
|
+
end
|
30
|
+
# rubocop:enable Style/DateTime
|
31
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
RSpec.describe Granite::Form::Types::UUID do
|
6
|
+
describe 'typecasting' do
|
7
|
+
include_context 'type setup', 'Granite::Form::UUID'
|
8
|
+
let(:uuid) { Granite::Form::UUID.random_create }
|
9
|
+
let(:uuid_tools) { UUIDTools::UUID.random_create }
|
10
|
+
|
11
|
+
specify { expect(typecast(nil)).to be_nil }
|
12
|
+
specify { expect(typecast(Object.new)).to be_nil }
|
13
|
+
specify { expect(typecast(uuid_tools)).to be_a Granite::Form::UUID }
|
14
|
+
specify { expect(typecast(uuid_tools)).to eq(uuid_tools) }
|
15
|
+
specify { expect(typecast(uuid)).to eq(uuid) }
|
16
|
+
specify { expect(typecast(uuid.to_s)).to eq(uuid) }
|
17
|
+
specify { expect(typecast(uuid.to_i)).to eq(uuid) }
|
18
|
+
specify { expect(typecast(uuid.hexdigest)).to eq(uuid) }
|
19
|
+
specify { expect(typecast(uuid.raw)).to eq(uuid) }
|
20
|
+
end
|
21
|
+
end
|
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: granite-form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pyromaniac
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-12-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|
@@ -52,6 +52,20 @@ dependencies:
|
|
52
52
|
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bump
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
55
69
|
- !ruby/object:Gem::Dependency
|
56
70
|
name: database_cleaner
|
57
71
|
requirement: !ruby/object:Gem::Requirement
|
@@ -283,55 +297,83 @@ files:
|
|
283
297
|
- lib/granite/form/model/validations/associated.rb
|
284
298
|
- lib/granite/form/model/validations/nested.rb
|
285
299
|
- lib/granite/form/railtie.rb
|
300
|
+
- lib/granite/form/types.rb
|
301
|
+
- lib/granite/form/types/active_support/time_zone.rb
|
302
|
+
- lib/granite/form/types/array.rb
|
303
|
+
- lib/granite/form/types/big_decimal.rb
|
304
|
+
- lib/granite/form/types/boolean.rb
|
305
|
+
- lib/granite/form/types/date.rb
|
306
|
+
- lib/granite/form/types/date_time.rb
|
307
|
+
- lib/granite/form/types/float.rb
|
308
|
+
- lib/granite/form/types/hash_with_action_controller_parameters.rb
|
309
|
+
- lib/granite/form/types/integer.rb
|
310
|
+
- lib/granite/form/types/object.rb
|
311
|
+
- lib/granite/form/types/string.rb
|
312
|
+
- lib/granite/form/types/time.rb
|
313
|
+
- lib/granite/form/types/uuid.rb
|
286
314
|
- lib/granite/form/undefined_class.rb
|
287
315
|
- lib/granite/form/version.rb
|
288
|
-
- spec/
|
289
|
-
- spec/
|
290
|
-
- spec/
|
291
|
-
- spec/
|
292
|
-
- spec/
|
293
|
-
- spec/
|
294
|
-
- spec/
|
295
|
-
- spec/
|
296
|
-
- spec/
|
297
|
-
- spec/
|
298
|
-
- spec/
|
299
|
-
- spec/
|
300
|
-
- spec/
|
301
|
-
- spec/
|
302
|
-
- spec/
|
303
|
-
- spec/
|
304
|
-
- spec/
|
305
|
-
- spec/
|
306
|
-
- spec/
|
307
|
-
- spec/
|
308
|
-
- spec/
|
309
|
-
- spec/
|
310
|
-
- spec/
|
311
|
-
- spec/
|
312
|
-
- spec/
|
313
|
-
- spec/
|
314
|
-
- spec/
|
315
|
-
- spec/
|
316
|
-
- spec/
|
317
|
-
- spec/
|
318
|
-
- spec/
|
319
|
-
- spec/
|
320
|
-
- spec/
|
321
|
-
- spec/
|
322
|
-
- spec/
|
323
|
-
- spec/
|
324
|
-
- spec/
|
325
|
-
- spec/
|
326
|
-
- spec/
|
327
|
-
- spec/
|
328
|
-
- spec/
|
329
|
-
- spec/
|
330
|
-
- spec/
|
331
|
-
- spec/
|
316
|
+
- spec/granite/form/active_record/associations_spec.rb
|
317
|
+
- spec/granite/form/active_record/nested_attributes_spec.rb
|
318
|
+
- spec/granite/form/config_spec.rb
|
319
|
+
- spec/granite/form/extensions_spec.rb
|
320
|
+
- spec/granite/form/model/associations/embeds_many_spec.rb
|
321
|
+
- spec/granite/form/model/associations/embeds_one_spec.rb
|
322
|
+
- spec/granite/form/model/associations/nested_attributes_spec.rb
|
323
|
+
- spec/granite/form/model/associations/persistence_adapters/active_record_spec.rb
|
324
|
+
- spec/granite/form/model/associations/references_many_spec.rb
|
325
|
+
- spec/granite/form/model/associations/references_one_spec.rb
|
326
|
+
- spec/granite/form/model/associations/reflections/embeds_any_spec.rb
|
327
|
+
- spec/granite/form/model/associations/reflections/embeds_many_spec.rb
|
328
|
+
- spec/granite/form/model/associations/reflections/embeds_one_spec.rb
|
329
|
+
- spec/granite/form/model/associations/reflections/references_many_spec.rb
|
330
|
+
- spec/granite/form/model/associations/reflections/references_one_spec.rb
|
331
|
+
- spec/granite/form/model/associations/validations_spec.rb
|
332
|
+
- spec/granite/form/model/associations_spec.rb
|
333
|
+
- spec/granite/form/model/attributes/attribute_spec.rb
|
334
|
+
- spec/granite/form/model/attributes/base_spec.rb
|
335
|
+
- spec/granite/form/model/attributes/collection_spec.rb
|
336
|
+
- spec/granite/form/model/attributes/dictionary_spec.rb
|
337
|
+
- spec/granite/form/model/attributes/localized_spec.rb
|
338
|
+
- spec/granite/form/model/attributes/reflections/attribute_spec.rb
|
339
|
+
- spec/granite/form/model/attributes/reflections/base_spec.rb
|
340
|
+
- spec/granite/form/model/attributes/reflections/collection_spec.rb
|
341
|
+
- spec/granite/form/model/attributes/reflections/dictionary_spec.rb
|
342
|
+
- spec/granite/form/model/attributes/reflections/localized_spec.rb
|
343
|
+
- spec/granite/form/model/attributes/reflections/represents_spec.rb
|
344
|
+
- spec/granite/form/model/attributes/represents_spec.rb
|
345
|
+
- spec/granite/form/model/attributes_spec.rb
|
346
|
+
- spec/granite/form/model/callbacks_spec.rb
|
347
|
+
- spec/granite/form/model/conventions_spec.rb
|
348
|
+
- spec/granite/form/model/dirty_spec.rb
|
349
|
+
- spec/granite/form/model/lifecycle_spec.rb
|
350
|
+
- spec/granite/form/model/persistence_spec.rb
|
351
|
+
- spec/granite/form/model/primary_spec.rb
|
352
|
+
- spec/granite/form/model/representation_spec.rb
|
353
|
+
- spec/granite/form/model/scopes_spec.rb
|
354
|
+
- spec/granite/form/model/validations/associated_spec.rb
|
355
|
+
- spec/granite/form/model/validations/nested_spec.rb
|
356
|
+
- spec/granite/form/model/validations_spec.rb
|
357
|
+
- spec/granite/form/model_spec.rb
|
358
|
+
- spec/granite/form/types/active_support/time_zone_spec.rb
|
359
|
+
- spec/granite/form/types/array_spec.rb
|
360
|
+
- spec/granite/form/types/big_decimal_spec.rb
|
361
|
+
- spec/granite/form/types/boolean_spec.rb
|
362
|
+
- spec/granite/form/types/date_spec.rb
|
363
|
+
- spec/granite/form/types/date_time_spec.rb
|
364
|
+
- spec/granite/form/types/float_spec.rb
|
365
|
+
- spec/granite/form/types/hash_with_action_controller_parameters_spec.rb
|
366
|
+
- spec/granite/form/types/integer_spec.rb
|
367
|
+
- spec/granite/form/types/object_spec.rb
|
368
|
+
- spec/granite/form/types/string_spec.rb
|
369
|
+
- spec/granite/form/types/time_spec.rb
|
370
|
+
- spec/granite/form/types/uuid_spec.rb
|
371
|
+
- spec/granite/form_spec.rb
|
332
372
|
- spec/spec_helper.rb
|
333
373
|
- spec/support/model_helpers.rb
|
334
374
|
- spec/support/muffle_helper.rb
|
375
|
+
- spec/support/shared/nested_attribute_examples.rb
|
376
|
+
- spec/support/shared/type_examples.rb
|
335
377
|
- spec/support/translations.rb
|
336
378
|
homepage: ''
|
337
379
|
licenses: []
|
@@ -351,56 +393,70 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
351
393
|
- !ruby/object:Gem::Version
|
352
394
|
version: '0'
|
353
395
|
requirements: []
|
354
|
-
rubygems_version: 3.
|
396
|
+
rubygems_version: 3.3.26
|
355
397
|
signing_key:
|
356
398
|
specification_version: 4
|
357
399
|
summary: Working with hashes in AR style
|
358
400
|
test_files:
|
359
|
-
- spec/
|
360
|
-
- spec/
|
361
|
-
- spec/
|
362
|
-
- spec/
|
363
|
-
- spec/
|
364
|
-
- spec/
|
365
|
-
- spec/
|
366
|
-
- spec/
|
367
|
-
- spec/
|
368
|
-
- spec/
|
369
|
-
- spec/
|
370
|
-
- spec/
|
371
|
-
- spec/
|
372
|
-
- spec/
|
373
|
-
- spec/
|
374
|
-
- spec/
|
375
|
-
- spec/
|
376
|
-
- spec/
|
377
|
-
- spec/
|
378
|
-
- spec/
|
379
|
-
- spec/
|
380
|
-
- spec/
|
381
|
-
- spec/
|
382
|
-
- spec/
|
383
|
-
- spec/
|
384
|
-
- spec/
|
385
|
-
- spec/
|
386
|
-
- spec/
|
387
|
-
- spec/
|
388
|
-
- spec/
|
389
|
-
- spec/
|
390
|
-
- spec/
|
391
|
-
- spec/
|
392
|
-
- spec/
|
393
|
-
- spec/
|
394
|
-
- spec/
|
395
|
-
- spec/
|
396
|
-
- spec/
|
397
|
-
- spec/
|
398
|
-
- spec/
|
399
|
-
- spec/
|
400
|
-
- spec/
|
401
|
-
- spec/
|
402
|
-
- spec/
|
401
|
+
- spec/granite/form/active_record/associations_spec.rb
|
402
|
+
- spec/granite/form/active_record/nested_attributes_spec.rb
|
403
|
+
- spec/granite/form/config_spec.rb
|
404
|
+
- spec/granite/form/extensions_spec.rb
|
405
|
+
- spec/granite/form/model/associations/embeds_many_spec.rb
|
406
|
+
- spec/granite/form/model/associations/embeds_one_spec.rb
|
407
|
+
- spec/granite/form/model/associations/nested_attributes_spec.rb
|
408
|
+
- spec/granite/form/model/associations/persistence_adapters/active_record_spec.rb
|
409
|
+
- spec/granite/form/model/associations/references_many_spec.rb
|
410
|
+
- spec/granite/form/model/associations/references_one_spec.rb
|
411
|
+
- spec/granite/form/model/associations/reflections/embeds_any_spec.rb
|
412
|
+
- spec/granite/form/model/associations/reflections/embeds_many_spec.rb
|
413
|
+
- spec/granite/form/model/associations/reflections/embeds_one_spec.rb
|
414
|
+
- spec/granite/form/model/associations/reflections/references_many_spec.rb
|
415
|
+
- spec/granite/form/model/associations/reflections/references_one_spec.rb
|
416
|
+
- spec/granite/form/model/associations/validations_spec.rb
|
417
|
+
- spec/granite/form/model/associations_spec.rb
|
418
|
+
- spec/granite/form/model/attributes/attribute_spec.rb
|
419
|
+
- spec/granite/form/model/attributes/base_spec.rb
|
420
|
+
- spec/granite/form/model/attributes/collection_spec.rb
|
421
|
+
- spec/granite/form/model/attributes/dictionary_spec.rb
|
422
|
+
- spec/granite/form/model/attributes/localized_spec.rb
|
423
|
+
- spec/granite/form/model/attributes/reflections/attribute_spec.rb
|
424
|
+
- spec/granite/form/model/attributes/reflections/base_spec.rb
|
425
|
+
- spec/granite/form/model/attributes/reflections/collection_spec.rb
|
426
|
+
- spec/granite/form/model/attributes/reflections/dictionary_spec.rb
|
427
|
+
- spec/granite/form/model/attributes/reflections/localized_spec.rb
|
428
|
+
- spec/granite/form/model/attributes/reflections/represents_spec.rb
|
429
|
+
- spec/granite/form/model/attributes/represents_spec.rb
|
430
|
+
- spec/granite/form/model/attributes_spec.rb
|
431
|
+
- spec/granite/form/model/callbacks_spec.rb
|
432
|
+
- spec/granite/form/model/conventions_spec.rb
|
433
|
+
- spec/granite/form/model/dirty_spec.rb
|
434
|
+
- spec/granite/form/model/lifecycle_spec.rb
|
435
|
+
- spec/granite/form/model/persistence_spec.rb
|
436
|
+
- spec/granite/form/model/primary_spec.rb
|
437
|
+
- spec/granite/form/model/representation_spec.rb
|
438
|
+
- spec/granite/form/model/scopes_spec.rb
|
439
|
+
- spec/granite/form/model/validations/associated_spec.rb
|
440
|
+
- spec/granite/form/model/validations/nested_spec.rb
|
441
|
+
- spec/granite/form/model/validations_spec.rb
|
442
|
+
- spec/granite/form/model_spec.rb
|
443
|
+
- spec/granite/form/types/active_support/time_zone_spec.rb
|
444
|
+
- spec/granite/form/types/array_spec.rb
|
445
|
+
- spec/granite/form/types/big_decimal_spec.rb
|
446
|
+
- spec/granite/form/types/boolean_spec.rb
|
447
|
+
- spec/granite/form/types/date_spec.rb
|
448
|
+
- spec/granite/form/types/date_time_spec.rb
|
449
|
+
- spec/granite/form/types/float_spec.rb
|
450
|
+
- spec/granite/form/types/hash_with_action_controller_parameters_spec.rb
|
451
|
+
- spec/granite/form/types/integer_spec.rb
|
452
|
+
- spec/granite/form/types/object_spec.rb
|
453
|
+
- spec/granite/form/types/string_spec.rb
|
454
|
+
- spec/granite/form/types/time_spec.rb
|
455
|
+
- spec/granite/form/types/uuid_spec.rb
|
456
|
+
- spec/granite/form_spec.rb
|
403
457
|
- spec/spec_helper.rb
|
404
458
|
- spec/support/model_helpers.rb
|
405
459
|
- spec/support/muffle_helper.rb
|
460
|
+
- spec/support/shared/nested_attribute_examples.rb
|
461
|
+
- spec/support/shared/type_examples.rb
|
406
462
|
- spec/support/translations.rb
|