declare_schema 0.14.2 → 0.14.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/declare_schema/dsl.rb +1 -1
- data/lib/declare_schema/version.rb +1 -1
- data/spec/lib/declare_schema/field_spec_spec.rb +2 -2
- data/spec/lib/declare_schema/schema_change/column_add_spec.rb +1 -1
- data/spec/lib/declare_schema/schema_change/column_remove_spec.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: 27ae145f4edb218307dce4bf78aefff0de21188a481f8c9180a33831fe6ae9dc
|
4
|
+
data.tar.gz: a8750df254820e71a477763731d09367449469d243021a6b246a4cd7118b2eee
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b042815d991c698b5975a810ec25d741aa7897c3ec4df4acbbe2bcd29f47e52ba7b04ec4256bf9800fc721d5f81e27b8adbef7dfcda930d7cc4941a944ad3dfa
|
7
|
+
data.tar.gz: 66528d14e7fcf88766271bd507e5e69b45514db5342baa39f2db75e5da562335c19159a1e7ed45c20a8cb9c4485283c1027aadb079f465a3eea2fe1ef5cdcc3f
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ Inspired by [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|
4
4
|
|
5
5
|
Note: this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
6
6
|
|
7
|
+
## [0.14.3] - 2021-09-01
|
8
|
+
### Fixed
|
9
|
+
- Fixed more Ruby 2.7 warnings about needing `**options` when calling a method that has `**options` in its signature.
|
10
|
+
|
7
11
|
## [0.14.2] - 2021-09-01
|
8
12
|
### Fixed
|
9
13
|
- Fixed another Ruby 2.7 warning about needing `**options` when calling a method that has `**options` in its signature.
|
@@ -204,6 +208,7 @@ using the appropriate Rails configuration attributes.
|
|
204
208
|
### Added
|
205
209
|
- Initial version from https://github.com/Invoca/hobo_fields v4.1.0.
|
206
210
|
|
211
|
+
[0.14.3]: https://github.com/Invoca/declare_schema/compare/v0.14.2...v0.14.3
|
207
212
|
[0.14.2]: https://github.com/Invoca/declare_schema/compare/v0.14.1...v0.14.2
|
208
213
|
[0.14.1]: https://github.com/Invoca/declare_schema/compare/v0.14.0...v0.14.1
|
209
214
|
[0.14.0]: https://github.com/Invoca/declare_schema/compare/v0.13.1...v0.14.0
|
data/Gemfile.lock
CHANGED
data/lib/declare_schema/dsl.rb
CHANGED
@@ -29,7 +29,7 @@ module DeclareSchema
|
|
29
29
|
end
|
30
30
|
|
31
31
|
def field(name, type, *args, **options)
|
32
|
-
@model.declare_field(name, type, *
|
32
|
+
@model.declare_field(name, type, *args, **@options.merge(options))
|
33
33
|
end
|
34
34
|
|
35
35
|
# TODO: make [:required] just another option. Either 'required: true] or 'optional: false'?
|
@@ -185,12 +185,12 @@ RSpec.describe DeclareSchema::Model::FieldSpec do
|
|
185
185
|
|
186
186
|
it 'does not allow precision:' do
|
187
187
|
expect_any_instance_of(described_class).to receive(:warn).with(/precision: only allowed for :decimal type/)
|
188
|
-
described_class.new(model, :quantity, t, { precision: 8, null: true, position: 3 }.merge(extra))
|
188
|
+
described_class.new(model, :quantity, t, **{ precision: 8, null: true, position: 3 }.merge(extra))
|
189
189
|
end unless t == :datetime
|
190
190
|
|
191
191
|
it 'does not allow scale:' do
|
192
192
|
expect_any_instance_of(described_class).to receive(:warn).with(/scale: only allowed for :decimal type/)
|
193
|
-
described_class.new(model, :quantity, t, { scale: 10, null: true, position: 3 }.merge(extra))
|
193
|
+
described_class.new(model, :quantity, t, **{ scale: 10, null: true, position: 3 }.merge(extra))
|
194
194
|
end
|
195
195
|
end
|
196
196
|
end
|
@@ -12,7 +12,7 @@ RSpec.describe DeclareSchema::SchemaChange::ColumnAdd do
|
|
12
12
|
let(:column_type) { :integer }
|
13
13
|
let(:column_options) { { limit: 8 } }
|
14
14
|
let(:column_options_string) { "limit: 8" }
|
15
|
-
subject { described_class.new(table_name, column_name, column_type, column_options) }
|
15
|
+
subject { described_class.new(table_name, column_name, column_type, **column_options) }
|
16
16
|
|
17
17
|
describe '#up/down' do
|
18
18
|
describe '#up' do
|
@@ -12,7 +12,7 @@ RSpec.describe DeclareSchema::SchemaChange::ColumnRemove do
|
|
12
12
|
let(:column_type) { :integer }
|
13
13
|
let(:column_options) { { limit: 8 } }
|
14
14
|
let(:column_options_string) { "limit: 8" }
|
15
|
-
subject { described_class.new(table_name, column_name, column_type, column_options) }
|
15
|
+
subject { described_class.new(table_name, column_name, column_type, **column_options) }
|
16
16
|
|
17
17
|
describe '#up/down' do
|
18
18
|
describe '#up' do
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: declare_schema
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Invoca Development adapted from hobo_fields by Tom Locke
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-09-
|
11
|
+
date: 2021-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|