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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 2804b7a11446f5570e967f4ea65be3ee2da5af62a54c3a345acfd2d9b9f58d7b
4
- data.tar.gz: 1c1787e5388145ec1a8ae81276fda0488be7fc2d7e192355aaf8d76ef0c00005
3
+ metadata.gz: 27ae145f4edb218307dce4bf78aefff0de21188a481f8c9180a33831fe6ae9dc
4
+ data.tar.gz: a8750df254820e71a477763731d09367449469d243021a6b246a4cd7118b2eee
5
5
  SHA512:
6
- metadata.gz: 2eaff1f5f1e0e0ded155db135646df64a9e38a04c64511550e98ed7857e182b63f45558b309dcbaf93d3a22bff6781b95b94418aa90604fbdafda076384bbde5
7
- data.tar.gz: a8e380d8e2b1fadf9aeceeea58d3a2a1503330191dcb8f4f4fc507f7b6d191b4dec2f191e94820d7fb21efacfc95c571e5589612517904c48d91dde2d2866973
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- declare_schema (0.14.2)
4
+ declare_schema (0.14.3)
5
5
  rails (>= 5.0)
6
6
 
7
7
  GEM
@@ -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, *(args + [@options.merge(options)]))
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'?
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeclareSchema
4
- VERSION = "0.14.2"
4
+ VERSION = "0.14.3"
5
5
  end
@@ -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.2
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-01 00:00:00.000000000 Z
11
+ date: 2021-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails