auto_increment 1.6.0 → 1.6.1

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: 3c836f605764b93022052c3f43a7d94b9aab895bb6bbe3d24c970599a7731d3c
4
- data.tar.gz: 3848325812e4694689d7dd8b010d62e4aaf9288b0b1314f6c5392a5949042e75
3
+ metadata.gz: 6940fc0d6bcea7dc3c707943c1e8c150478341ac85738be4554c308e8e254b1c
4
+ data.tar.gz: e49d98c47e8b2823b13fc10d79c7cb5f2a6c703dfaf25e4baf1e7bf099f14a39
5
5
  SHA512:
6
- metadata.gz: b3c9fe3f8ec4934c528fd87e2abfaa6e42db4022378a62ae2d36f948867b27c52331885be4767ccbade6ee70b3f13379428c0c69a132d19cdc1889ab07b34c8b
7
- data.tar.gz: 22a60299c98af77d0c1ce288b7c7a99c5361b41d90a543ca9a14d55c3460f179968339e24990e39e6c27402e6445039e5894b61c4963c46ac619af05e899e26e
6
+ metadata.gz: c37ff7e20c1dabca443f1e1543da29e14203aebf69f97c2814c9d19b049e5a819c1936700966afadbd59f085e11a69dbf15a3336b45e8b5d5f6225c9b148808a
7
+ data.tar.gz: 39a037e16ec85e9626d5b658760539fdef96201d0a8e00a289c40f5b321630e142ab9547c9a25473d72720e581774974dc71df5ab857a5a9a4040fce38e52123
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- auto_increment (1.5.2)
4
+ auto_increment (1.6.0)
5
5
  activerecord (>= 6.0)
6
6
  activesupport (>= 6.0)
7
7
 
@@ -14,8 +14,6 @@ module AutoIncrement
14
14
  @options = options.reverse_merge initial: 1, force: false
15
15
  @options[:scope] = [@options[:scope]].compact unless @options[:scope].is_a?(Array)
16
16
  @options[:model_scope] = [@options[:model_scope]].compact unless @options[:model_scope].is_a?(Array)
17
-
18
- deprecated_warning
19
17
  end
20
18
 
21
19
  def before_create(record)
@@ -78,13 +76,5 @@ module AutoIncrement
78
76
  def string?
79
77
  @options[:initial].instance_of?(String)
80
78
  end
81
-
82
- def deprecated_warning
83
- return if @options[:scope].empty?
84
-
85
- ActiveSupport::Deprecation.warn <<~WARNING.squish
86
- Passing a scope to auto_increment is deprecated and will be removed in the next version. Please use model_scope instead.
87
- WARNING
88
- end
89
79
  end
90
80
  end
@@ -2,5 +2,5 @@
2
2
 
3
3
  # +AutoIncrement::VERSION+
4
4
  module AutoIncrement
5
- VERSION = '1.6.0'
5
+ VERSION = '1.6.1'
6
6
  end
@@ -30,23 +30,4 @@ describe AutoIncrement::Incrementor do
30
30
  expect(subject.send(:increment)).to eq 'A'
31
31
  end
32
32
  end
33
-
34
- describe 'deprecates scope' do
35
- subject { AutoIncrement::Incrementor.new :code, **options }
36
- let(:options) { { scope: :account_id } }
37
-
38
- it 'issues a deprecation warning' do
39
- expect(ActiveSupport::Deprecation).to receive(:warn).with(/Passing a scope to auto_increment is deprecated/)
40
- subject
41
- end
42
-
43
- context 'when @options[:scope] is not present' do
44
- let(:options) { {} }
45
-
46
- it 'does not issue a deprecation warning' do
47
- expect(ActiveSupport::Deprecation).not_to receive(:warn)
48
- subject
49
- end
50
- end
51
- end
52
33
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auto_increment
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.6.0
4
+ version: 1.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Diesel