attr_extras 5.2.0 → 6.1.0

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
  SHA1:
3
- metadata.gz: 31be8de6a1c2dbbb19e44ea4255d099e656728b3
4
- data.tar.gz: f5a8e9dbfdef34e1f1d368c889ae7a0f825e07e2
3
+ metadata.gz: d927809a2d8cd1a5da0e4e910942027d230dfb45
4
+ data.tar.gz: 80988c71e715df538d82b902846ca660e5f5a4fb
5
5
  SHA512:
6
- metadata.gz: 30d562066800bdcc69011c4eb7ed26966d61aae06e4ebd1050ba7346bb15ef1b131edaa547f2aec9504f61ef103c9022126c40a2ebdd12bf4838d3b8722f387d
7
- data.tar.gz: 4ba342974d86d1c4d0d3eeb30d41caa1fa97720b4626e7bbbafe7245fbf5dd48c4a10ef52c7ce8a43d3f2557a9c7ccb19218c2c21fc94e711fe31a7918958f32
6
+ metadata.gz: 8d9bd920c1a3227cd592dab70c0035124322bc0a358ed535b8aa5e42c6a8fb26bdcde0c85c8ef92a81131179e0b9fafbb928ccff2ab454164bc549cec36bd745
7
+ data.tar.gz: 96ff27fb9e371d898f3056159a644cb3828ad2e10bc3c83273fb38ab8441661e78f46bf4f2960b59f0af09affaa39cb8033f5a75b64efbc74476705268a73735
@@ -1,5 +1,10 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.2.1
4
- - 2.0.0
5
- - jruby-19mode
3
+ - 2.6.1
4
+ - 2.5.3
5
+ - 2.4.1
6
+ - 2.3.3
7
+ - jruby-head
8
+ before_install: # For jruby-head to work.
9
+ - gem install bundler
10
+ - gem update bundler
@@ -0,0 +1,13 @@
1
+ # Changelog
2
+
3
+ # 6.1.0
4
+
5
+ * Bugfix when passing hash values to positional arguments.
6
+
7
+ # 6.0.0 (yanked)
8
+
9
+ * Default arguments! Thanks to [Ola K](https://github.com/lesin). For example: `pattr_initialize [:foo, bar: "default value"]`
10
+
11
+ # 5.2.0 and earlier
12
+
13
+ Please [see Git history](https://github.com/barsoom/attr_extras/releases).
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- [![Build status](https://secure.travis-ci.org/barsoom/attr_extras.png)](https://travis-ci.org/#!/barsoom/attr_extras/builds)
1
+ [![Build status](https://secure.travis-ci.org/barsoom/attr_extras.svg)](https://travis-ci.org/#!/barsoom/attr_extras/builds)
2
2
  [![Code Climate](https://codeclimate.com/github/barsoom/attr_extras/badges/gpa.svg)](https://codeclimate.com/github/barsoom/attr_extras)
3
3
 
4
4
  # attr\_extras
@@ -29,7 +29,7 @@ end
29
29
 
30
30
  This nicely complements Ruby's built-in `attr_accessor`, `attr_reader` and `attr_writer`.
31
31
 
32
- Supports positional arguments as well as optional and required hash arguments.
32
+ Supports positional arguments as well as optional and required keyword arguments.
33
33
 
34
34
  Also provides conveniences for creating value objects, method objects, query methods and abstract methods.
35
35
 
@@ -55,11 +55,15 @@ Also provides conveniences for creating value objects, method objects, query met
55
55
 
56
56
  `attr_initialize :foo, :bar` defines an initializer that takes two arguments and assigns `@foo` and `@bar`.
57
57
 
58
- `attr_initialize :foo, [:bar, :baz!]` defines an initializer that takes one regular argument, assigning `@foo`, and one hash argument, assigning `@bar` (optional) and `@baz` (required).
58
+ `attr_initialize :foo, [:bar, :baz!]` defines an initializer that takes one regular argument, assigning `@foo`, and two keyword arguments, assigning `@bar` (optional) and `@baz` (required).
59
59
 
60
- `attr_initialize [:bar, :baz!]` defines an initializer that takes one hash argument, assigning `@bar` (optional) and `@baz` (required).
60
+ `attr_initialize [:bar, :baz!]` defines an initializer that takes two keyword arguments, assigning `@bar` (optional) and `@baz` (required).
61
61
 
62
- If you pass unknown hash arguments, you will get an `ArgumentError`.
62
+ Keyword arguments can have default values:
63
+ `attr_initialize [:bar, baz: "default value"]` defines an initializer that takes two keyword arguments, assigning `@bar` (optional) and `@baz` (optional with default value `"default value"`).
64
+
65
+ If you pass unknown keyword arguments, you will get an `ArgumentError`.
66
+ If you don't pass required arguments and don't define default value for them, you will get a `KeyError`.
63
67
 
64
68
  `attr_initialize` can also accept a block which will be invoked after initialization. This is useful for e.g. initializing private data as necessary.
65
69
 
@@ -102,7 +106,7 @@ end
102
106
  Item.new("Pug", 100).price_with_vat # => 125.0
103
107
  ```
104
108
 
105
- [The `attr_initialize` notation](#attr_initialize) for hash arguments is also supported: `pattr_initialize :foo, [:bar, :baz!]`
109
+ [The `attr_initialize` notation](#attr_initialize) for keyword arguments is also supported: `pattr_initialize :foo, [:bar, :baz!]`
106
110
 
107
111
  ### `vattr_initialize`
108
112
  ### `attr_value_initialize`
@@ -127,7 +131,7 @@ Country.new("SE") == Country.new("SE") # => true
127
131
  Country.new("SE").code # => "SE"
128
132
  ```
129
133
 
130
- [The `attr_initialize` notation](#attr_initialize) for hash arguments is also supported: `vattr_initialize :foo, [:bar, :baz!]`
134
+ [The `attr_initialize` notation](#attr_initialize) for keyword arguments is also supported: `vattr_initialize :foo, [:bar, :baz!]`
131
135
 
132
136
 
133
137
  ### `rattr_initialize`
@@ -157,7 +161,7 @@ service = PublishBook.new("A Novel", publisher)
157
161
  service.book_name # => "A Novel"
158
162
  ```
159
163
 
160
- [The `attr_initialize` notation](#attr_initialize) for hash arguments is also supported: `rattr_initialize :foo, [:bar, :baz!]`
164
+ [The `attr_initialize` notation](#attr_initialize) for keyword arguments is also supported: `rattr_initialize :foo, [:bar, :baz!]`
161
165
 
162
166
  ### `aattr_initialize`
163
167
  ### `attr_accessor_initialize`
@@ -185,7 +189,7 @@ client.access_token = "NEW_SECRET"
185
189
  client.access_token # => "NEW_SECRET"
186
190
  ```
187
191
 
188
- [The `attr_initialize` notation](#attr_initialize) for hash arguments and blocks is also supported.
192
+ [The `attr_initialize` notation](#attr_initialize) for keyword arguments and blocks is also supported.
189
193
 
190
194
  ### `static_facade`
191
195
 
@@ -223,7 +227,7 @@ def self.allow?(user)
223
227
  end
224
228
  ```
225
229
 
226
- [The `attr_initialize` notation](#attr_initialize) for hash arguments is also supported: `static_facade :allow?, :user, [:user_agent, :ip!]`
230
+ [The `attr_initialize` notation](#attr_initialize) for keyword arguments is also supported: `static_facade :allow?, :user, [:user_agent, :ip!]`
227
231
 
228
232
  You don't have to specify arguments/readers if you don't want them: just `static_facade :tuesday?` is also valid.
229
233
 
@@ -288,7 +292,7 @@ def self.call(foo)
288
292
  end
289
293
  ```
290
294
 
291
- [The `attr_initialize` notation](#attr_initialize) for hash arguments is also supported: `method_object :foo, [:bar, :baz!]`
295
+ [The `attr_initialize` notation](#attr_initialize) for keyword arguments is also supported: `method_object :foo, [:bar, :baz!]`
292
296
 
293
297
  You don't have to specify arguments/readers if you don't want them: just `method_object` is also valid.
294
298
 
data/Rakefile CHANGED
@@ -19,5 +19,5 @@ Rake::TestTask.new(:test_explicit) do |t|
19
19
  t.test_files = explicit_tests
20
20
  end
21
21
 
22
- task :test => [ :test_implicit, :test_explicit ]
23
- task :default => :test
22
+ task test: [ :test_implicit, :test_explicit ]
23
+ task default: :test
@@ -2,7 +2,7 @@
2
2
  require File.expand_path('../lib/attr_extras/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Henrik Nyh", "Joakim Kolsjö", "Victor Arias"]
5
+ gem.authors = ["Henrik Nyh", "Joakim Kolsjö", "Victor Arias", "Ola K"]
6
6
  gem.email = ["henrik@nyh.se"]
7
7
  gem.summary = %q{Takes some boilerplate out of Ruby with methods like attr_initialize.}
8
8
  gem.homepage = "https://github.com/barsoom/attr_extras"
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.version = AttrExtras::VERSION
17
17
 
18
18
  gem.add_development_dependency "minitest", ">= 5"
19
- gem.add_development_dependency "m", "~> 1.3.1" # Running individual tests.
19
+ gem.add_development_dependency "m", "~> 1.5.0" # Running individual tests.
20
20
 
21
21
  # For Travis CI.
22
22
  gem.add_development_dependency "rake"
@@ -1,3 +1,5 @@
1
+ require "attr_extras/params_builder"
2
+
1
3
  class AttrExtras::AttrInitialize
2
4
  def initialize(klass, names, block)
3
5
  @klass, @names, @block = klass, names, block
@@ -9,31 +11,29 @@ class AttrExtras::AttrInitialize
9
11
  def apply
10
12
  # The define_method block can't call our methods, so we need to make
11
13
  # things available via local variables.
12
- names = @names
13
14
  block = @block
15
+
16
+ klass_params = AttrExtras::AttrInitialize::ParamsBuilder.new(names)
17
+
14
18
  validate_arity = method(:validate_arity)
15
- set_ivar_from_hash = method(:set_ivar_from_hash)
19
+ validate_args = method(:validate_args)
16
20
 
17
21
  klass.send(:define_method, :initialize) do |*values|
22
+ hash_values = values.select { |name| name.is_a?(Hash) }.inject(:merge) || {}
23
+
18
24
  validate_arity.call(values.length, self.class)
25
+ validate_args.call(values, klass_params)
26
+
27
+ klass_params.default_values.each do |name, default_value|
28
+ instance_variable_set("@#{name}", default_value)
29
+ end
30
+
31
+ klass_params.positional_args.zip(values).each do |name, value|
32
+ instance_variable_set("@#{name}", value)
33
+ end
19
34
 
20
- names.zip(values).each do |name_or_names, value|
21
- if name_or_names.is_a?(Array)
22
- hash = value || {}
23
-
24
- known_keys = name_or_names.map { |name| name.to_s.sub(/!\z/, "").to_sym }
25
- unknown_keys = hash.keys - known_keys
26
- if unknown_keys.any?
27
- raise ArgumentError, "Got unknown keys: #{unknown_keys.inspect}; allowed keys: #{known_keys.inspect}"
28
- end
29
-
30
- name_or_names.each do |name|
31
- set_ivar_from_hash.call(self, name, hash)
32
- end
33
- else
34
- name = name_or_names
35
- instance_variable_set("@#{name}", value)
36
- end
35
+ hash_values.each do |name, value|
36
+ instance_variable_set("@#{name}", value)
37
37
  end
38
38
 
39
39
  if block
@@ -54,15 +54,17 @@ class AttrExtras::AttrInitialize
54
54
  end
55
55
  end
56
56
 
57
- def set_ivar_from_hash(instance, name, hash)
58
- if name.to_s.end_with?("!")
59
- actual_name = name.to_s.chop.to_sym
60
- value = hash.fetch(actual_name)
61
- else
62
- actual_name = name
63
- value = hash[actual_name]
57
+ def validate_args(values, klass_params)
58
+ hash_values = values[(klass_params.positional_args.length)..-1].inject(:merge) || {}
59
+ unknown_keys = hash_values.keys - klass_params.hash_args_names
60
+
61
+ if unknown_keys.any?
62
+ raise ArgumentError, "Got unknown keys: #{unknown_keys.inspect}; allowed keys: #{klass_params.hash_args_names.inspect}"
64
63
  end
65
64
 
66
- instance.instance_variable_set("@#{actual_name}", value)
65
+ missing_args = klass_params.hash_args_required - klass_params.default_values.keys - hash_values.keys
66
+ if missing_args.any?
67
+ raise KeyError, "Missing required keys: #{missing_args.inspect}"
68
+ end
67
69
  end
68
70
  end
@@ -0,0 +1,49 @@
1
+ module AttrExtras
2
+ class AttrInitialize
3
+ class ParamsBuilder
4
+ REQUIRED_SIGN = "!".freeze
5
+
6
+ def initialize(names)
7
+ @names = names
8
+ end
9
+
10
+ attr_reader :names
11
+ private :names
12
+
13
+ def positional_args
14
+ @positional_args ||= names.take_while { |name| !name.is_a?(Array) }
15
+ end
16
+
17
+ def hash_args
18
+ @hash_args ||= (names - positional_args).flatten.flat_map { |name|
19
+ name.is_a?(Hash) ? name.keys : name
20
+ }
21
+ end
22
+
23
+ def hash_args_names
24
+ @hash_args_names ||= hash_args.map { |name| remove_required_sign(name) }
25
+ end
26
+
27
+ def hash_args_required
28
+ @hash_args_required ||= hash_args.select { |name| name.to_s.end_with?(REQUIRED_SIGN) }.
29
+ map { |name| remove_required_sign(name) }
30
+ end
31
+
32
+ def default_values
33
+ @default_values ||= begin
34
+ default_values_hash = names.flatten.select { |name| name.is_a?(Hash) }.inject(:merge) || {}
35
+
36
+ default_values_hash.map { |name, value|
37
+ [ remove_required_sign(name), value ]
38
+ }.to_h
39
+ end
40
+ end
41
+
42
+ private
43
+
44
+ def remove_required_sign(name)
45
+ name.to_s.sub(/#{REQUIRED_SIGN}\z/, "").to_sym
46
+ end
47
+ end
48
+ end
49
+ end
@@ -1,3 +1,3 @@
1
1
  module AttrExtras
2
- VERSION = "5.2.0"
2
+ VERSION = "6.1.0"
3
3
  end
@@ -27,7 +27,7 @@ describe Object, ".aattr_initialize" do
27
27
  aattr_initialize :foo, [:bar, :baz!]
28
28
  end
29
29
 
30
- example = klass.new("Foo", :bar => "Bar", :baz => "Baz")
30
+ example = klass.new("Foo", bar: "Bar", baz: "Baz")
31
31
 
32
32
  example.baz.must_equal "Baz"
33
33
  end
@@ -27,22 +27,36 @@ describe Object, ".attr_initialize" do
27
27
  attr_initialize :foo, [:bar, :baz]
28
28
  end
29
29
 
30
- example = klass.new("Foo", :bar => "Bar", :baz => "Baz")
30
+ example = klass.new("Foo", bar: "Bar", baz: "Baz")
31
31
  example.instance_variable_get("@foo").must_equal "Foo"
32
32
  example.instance_variable_get("@bar").must_equal "Bar"
33
33
  example.instance_variable_get("@baz").must_equal "Baz"
34
34
  end
35
35
 
36
+ it "can set default values for keyword arguments" do
37
+ klass = Class.new do
38
+ attr_initialize :foo, [:bar, baz: "default baz"]
39
+ end
40
+
41
+ example = klass.new("Foo", bar: "Bar")
42
+ example.instance_variable_get("@foo").must_equal "Foo"
43
+ example.instance_variable_get("@bar").must_equal "Bar"
44
+ example.instance_variable_get("@baz").must_equal "default baz"
45
+
46
+ example = klass.new("Foo", bar: "Bar", baz: "Baz")
47
+ example.instance_variable_get("@baz").must_equal "Baz"
48
+ end
49
+
36
50
  it "treats hash values as optional" do
37
51
  klass = Class.new do
38
52
  attr_initialize :foo, [:bar, :baz]
39
53
  end
40
54
 
41
- example = klass.new("Foo", :bar => "Bar")
42
- example.instance_variable_get("@baz").must_equal nil
55
+ example = klass.new("Foo", bar: "Bar")
56
+ example.instance_variable_defined?("@baz").must_equal false
43
57
 
44
58
  example = klass.new("Foo")
45
- example.instance_variable_get("@bar").must_equal nil
59
+ example.instance_variable_defined?("@bar").must_equal false
46
60
  end
47
61
 
48
62
  it "can require hash values" do
@@ -50,10 +64,10 @@ describe Object, ".attr_initialize" do
50
64
  attr_initialize [:optional, :required!]
51
65
  end
52
66
 
53
- example = klass.new(:required => "X")
67
+ example = klass.new(required: "X")
54
68
  example.instance_variable_get("@required").must_equal "X"
55
69
 
56
- lambda { klass.new(:optional => "X") }.must_raise KeyError
70
+ lambda { klass.new(optional: "X") }.must_raise KeyError
57
71
  end
58
72
 
59
73
  it "complains about unknown hash values" do
@@ -62,12 +76,33 @@ describe Object, ".attr_initialize" do
62
76
  end
63
77
 
64
78
  # Should not raise.
65
- klass.new("Foo", :bar => "Bar", :baz => "Baz")
79
+ klass.new("Foo", bar: "Bar", baz: "Baz")
66
80
 
67
- exception = lambda { klass.new("Foo", :bar => "Bar", :baz => "Baz", :hello => "Hello") }.must_raise ArgumentError
81
+ exception = lambda { klass.new("Foo", bar: "Bar", baz: "Baz", hello: "Hello") }.must_raise ArgumentError
68
82
  exception.message.must_include "[:hello]"
69
83
  end
70
84
 
85
+ # Regression.
86
+ it "assigns hash values to positional arguments even when there's also hash arguments" do
87
+ klass = Class.new do
88
+ attr_initialize :foo, [:bar]
89
+ end
90
+
91
+ # Should not raise.
92
+ klass.new({ inside_foo: 123 }, bar: 456)
93
+ end
94
+
95
+ # Regression.
96
+ it "only looks at hash arguments when determining missing required keys" do
97
+ klass = Class.new do
98
+ attr_initialize :foo, [:bar!]
99
+ end
100
+
101
+ # Provides a hash to "foo" but does not provide "bar".
102
+ exception = lambda { klass.new({ bar: 123 }) }.must_raise KeyError
103
+ exception.message.must_include "[:bar]"
104
+ end
105
+
71
106
  it "accepts a block for initialization" do
72
107
  klass = Class.new do
73
108
  attr_initialize :value do
@@ -0,0 +1,53 @@
1
+ require "spec_helper"
2
+
3
+ describe AttrExtras::AttrInitialize::ParamsBuilder do
4
+ subject { AttrExtras::AttrInitialize::ParamsBuilder.new(names) }
5
+
6
+ describe "when positional and hash params are present" do
7
+ let(:names) { [ :foo, :bar, [ :baz, :qux!, quux: "Quux" ]] }
8
+
9
+ it "properly devides params by the type" do
10
+ subject.positional_args.must_equal [ :foo, :bar ]
11
+ subject.hash_args.must_equal [ :baz, :qux!, :quux ]
12
+ subject.hash_args_names.must_equal [ :baz, :qux, :quux ]
13
+ subject.hash_args_required.must_equal [ :qux ]
14
+ subject.default_values.must_equal({ quux: "Quux" })
15
+ end
16
+ end
17
+
18
+ describe "when only positional params are present" do
19
+ let(:names) { [ :foo, :bar] }
20
+
21
+ it "properly devides params by the type" do
22
+ subject.positional_args.must_equal [ :foo, :bar ]
23
+ subject.hash_args.must_be_empty
24
+ subject.hash_args_names.must_be_empty
25
+ subject.hash_args_required.must_be_empty
26
+ subject.default_values.must_be_empty
27
+ end
28
+ end
29
+
30
+ describe "when only hash params are present" do
31
+ let(:names) { [[ { baz: "Baz" }, :qux!, { quux: "Quux" } ]] }
32
+
33
+ it "properly devides params by the type" do
34
+ subject.positional_args.must_be_empty
35
+ subject.hash_args.must_equal [ :baz, :qux!, :quux ]
36
+ subject.hash_args_names.must_equal [ :baz, :qux, :quux ]
37
+ subject.hash_args_required.must_equal [ :qux ]
38
+ subject.default_values.must_equal({ quux: "Quux", baz: "Baz" })
39
+ end
40
+ end
41
+
42
+ describe "when params are empty" do
43
+ let(:names) { [] }
44
+
45
+ it "properly devides params by the type" do
46
+ subject.positional_args.must_be_empty
47
+ subject.hash_args.must_be_empty
48
+ subject.hash_args_names.must_be_empty
49
+ subject.hash_args_required.must_be_empty
50
+ subject.default_values.must_be_empty
51
+ end
52
+ end
53
+ end
@@ -15,7 +15,7 @@ describe Object, ".pattr_initialize" do
15
15
  pattr_initialize :foo, [:bar, :baz!]
16
16
  end
17
17
 
18
- example = klass.new("Foo", :bar => "Bar", :baz => "Baz")
18
+ example = klass.new("Foo", bar: "Bar", baz: "Baz")
19
19
  example.send(:baz).must_equal "Baz"
20
20
  end
21
21
 
@@ -15,7 +15,7 @@ describe Object, ".rattr_initialize" do
15
15
  rattr_initialize :foo, [:bar, :baz!]
16
16
  end
17
17
 
18
- example = klass.new("Foo", :bar => "Bar", :baz => "Baz")
18
+ example = klass.new("Foo", bar: "Bar", baz: "Baz")
19
19
  example.public_send(:baz).must_equal "Baz"
20
20
  end
21
21
 
@@ -18,8 +18,8 @@ describe Object, ".vattr_initialize" do
18
18
  vattr_initialize :foo, [:bar, :baz!]
19
19
  end
20
20
 
21
- example1 = klass.new("Foo", :bar => "Bar", :baz => "Baz")
22
- example2 = klass.new("Foo", :bar => "Bar", :baz => "Baz")
21
+ example1 = klass.new("Foo", bar: "Bar", baz: "Baz")
22
+ example2 = klass.new("Foo", bar: "Bar", baz: "Baz")
23
23
  example1.baz.must_equal "Baz"
24
24
  example1.must_equal example2
25
25
  end
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attr_extras
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.2.0
4
+ version: 6.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henrik Nyh
8
8
  - Joakim Kolsjö
9
9
  - Victor Arias
10
+ - Ola K
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2017-01-31 00:00:00.000000000 Z
14
+ date: 2019-01-31 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: minitest
@@ -32,14 +33,14 @@ dependencies:
32
33
  requirements:
33
34
  - - "~>"
34
35
  - !ruby/object:Gem::Version
35
- version: 1.3.1
36
+ version: 1.5.0
36
37
  type: :development
37
38
  prerelease: false
38
39
  version_requirements: !ruby/object:Gem::Requirement
39
40
  requirements:
40
41
  - - "~>"
41
42
  - !ruby/object:Gem::Version
42
- version: 1.3.1
43
+ version: 1.5.0
43
44
  - !ruby/object:Gem::Dependency
44
45
  name: rake
45
46
  requirement: !ruby/object:Gem::Requirement
@@ -63,6 +64,7 @@ extra_rdoc_files: []
63
64
  files:
64
65
  - ".gitignore"
65
66
  - ".travis.yml"
67
+ - CHANGELOG.md
66
68
  - Gemfile
67
69
  - LICENSE.txt
68
70
  - README.md
@@ -74,6 +76,7 @@ files:
74
76
  - lib/attr_extras/attr_query.rb
75
77
  - lib/attr_extras/attr_value.rb
76
78
  - lib/attr_extras/explicit.rb
79
+ - lib/attr_extras/params_builder.rb
77
80
  - lib/attr_extras/utils.rb
78
81
  - lib/attr_extras/version.rb
79
82
  - script/test
@@ -86,6 +89,7 @@ files:
86
89
  - spec/attr_extras/attr_value_spec.rb
87
90
  - spec/attr_extras/explicit_spec.rb
88
91
  - spec/attr_extras/method_object_spec.rb
92
+ - spec/attr_extras/params_builder_spec.rb
89
93
  - spec/attr_extras/pattr_initialize_spec.rb
90
94
  - spec/attr_extras/rattr_initialize_spec.rb
91
95
  - spec/attr_extras/static_facade_spec.rb
@@ -113,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
113
117
  version: '0'
114
118
  requirements: []
115
119
  rubyforge_project:
116
- rubygems_version: 2.5.2
120
+ rubygems_version: 2.6.11
117
121
  signing_key:
118
122
  specification_version: 4
119
123
  summary: Takes some boilerplate out of Ruby with methods like attr_initialize.
@@ -127,6 +131,7 @@ test_files:
127
131
  - spec/attr_extras/attr_value_spec.rb
128
132
  - spec/attr_extras/explicit_spec.rb
129
133
  - spec/attr_extras/method_object_spec.rb
134
+ - spec/attr_extras/params_builder_spec.rb
130
135
  - spec/attr_extras/pattr_initialize_spec.rb
131
136
  - spec/attr_extras/rattr_initialize_spec.rb
132
137
  - spec/attr_extras/static_facade_spec.rb