enumerize 2.6.0 → 2.6.1

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: 7ed5759e8b7d540b7261ef4112d6ed175403650cd18f904e19c15826cc1b87b5
4
- data.tar.gz: 44fdf94b2adcf41a5ffd35e415b9ff622dab59658fd2d16efac6f52ddd89bfcb
3
+ metadata.gz: 07d568d0eb005ebea8b0ded7cb260d6c7792b1d676bd46f8441c7e33445e366c
4
+ data.tar.gz: b811acb983e8fac641fb2b9f9340089e8fd6149b1431af7f12446cb5203c39e1
5
5
  SHA512:
6
- metadata.gz: 0aab786d5ef4ebbd156211e9c659b6397facab2b1b075767f170ed706b7787d953baec2c3ffecb9a918d0cd3f87eecd541f41b7868045f4beafbb2584ca83fe3
7
- data.tar.gz: 06af74a445ac38938b90e15e5e14cfc529332189328b86929a976593c376f46189ae6ded196ce1ca93c3c31d9f5b68b5ef03c91d65fe7e38d8a392ba88ef1dc6
6
+ metadata.gz: b68609dbbc3eede78b640395ef59bf149f1bf00d7b55f2b03a1397430f4e8816bd6a19bdfe06151e28fb1a64a9595fe48893810b015899b00d4991af6539f5d7
7
+ data.tar.gz: 3999ab755693815c52779ca0124f6aec629a1dd639c41d33330211b0948f6f9d4aa3d79a3f20713bb99a508afa5b7e2b776a0465fe0c3c5a3c250043bbdfc0aa
data/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 2.6.1 (March 17, 2023)
2
+
3
+ ### bug fix
4
+
5
+ * Require rspec/matchers in enumerize matcher to fix rspec extensions load issue.
6
+ * Fix Ruby 2.7 issue with initializer without keyword args.
7
+
1
8
  ## 2.6.0 (March 7, 2023)
2
9
 
3
10
  ### enhancements
@@ -49,7 +49,7 @@ module Enumerize
49
49
  end
50
50
  end
51
51
 
52
- def initialize(*args, **kwargs)
52
+ def initialize(...)
53
53
  super
54
54
  _set_default_value_for_enumerized_attributes
55
55
  end
@@ -1,5 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'rspec/matchers'
3
4
  require 'enumerize/integrations/rspec/matcher'
4
5
 
5
6
  module Enumerize
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Enumerize
4
- VERSION = '2.6.0'
4
+ VERSION = '2.6.1'
5
5
  end
data/test/base_test.rb CHANGED
@@ -227,4 +227,28 @@ class BaseTest < MiniTest::Spec
227
227
 
228
228
  klass.new('arg1', key_word_argument: 'kwargs1')
229
229
  end
230
+
231
+ it 'allows initializing object without keyword arguments' do
232
+ parent_klass = Class.new do
233
+ attr_reader :arguments
234
+
235
+ def initialize(arguments)
236
+ @arguments = arguments
237
+ end
238
+ end
239
+
240
+ klass = Class.new(parent_klass) do
241
+ extend Enumerize
242
+
243
+ def initialize(arguments)
244
+ super
245
+ end
246
+ end
247
+
248
+ params = { 'string_key' => 1, symbol_key: 2 }
249
+
250
+ object = klass.new(params)
251
+
252
+ expect(object.arguments).must_equal params
253
+ end
230
254
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enumerize
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.0
4
+ version: 2.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Nartimov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-07 00:00:00.000000000 Z
11
+ date: 2023-03-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -99,7 +99,7 @@ homepage: https://github.com/brainspec/enumerize
99
99
  licenses:
100
100
  - MIT
101
101
  metadata: {}
102
- post_install_message:
102
+ post_install_message:
103
103
  rdoc_options: []
104
104
  require_paths:
105
105
  - lib
@@ -114,8 +114,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
114
114
  - !ruby/object:Gem::Version
115
115
  version: '0'
116
116
  requirements: []
117
- rubygems_version: 3.4.7
118
- signing_key:
117
+ rubygems_version: 3.1.6
118
+ signing_key:
119
119
  specification_version: 4
120
120
  summary: Enumerated attributes with I18n and ActiveRecord/Mongoid/MongoMapper support
121
121
  test_files: