dry-configurable 0.8.2 → 0.8.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: d887f103c0ed0fd736431078b05c29ce450fa8ab88ed96889b2d05cb8670c6ce
4
- data.tar.gz: 84fb60565b1c59c61073c55a99ce3b5024c5512d03b6d1b0ac0d59669a445540
3
+ metadata.gz: e2952b22a9581b91b77a416925a150088ea715be486638e293beae10d5b493a8
4
+ data.tar.gz: 6cf8073234d53e391e25d03eb0b3548694ebbaa30742169895b8f1d519f258d7
5
5
  SHA512:
6
- metadata.gz: 5db9fe27dc5b96dfc2a376d07c538e437b2b155aa623b8a393a974a8798aea3174780cc5f4eaeee9e094c74cbc22a39152eca7165ac7d8e12c632cc4367d6fa4
7
- data.tar.gz: 74d8b6c381e846179a4eb7c65ff3baac6a05e5eb520c188a005867e1124a2f456b47d983c4684824f8533c92787ace4df20aedb35470bfec4676b5a44b9fdbbc
6
+ metadata.gz: 441ba5b074dd577bd0e0d37b5a99e76dc1ab85068885832e791eba4cd7a61e5691683f96c93e930a29d59e838b294d82248074433c670466ad31f773e1994dab
7
+ data.tar.gz: 02f13c05320aca5bb6900dd831966c3edc760fd66b9bfe40f94d079da0f3af30ecbdd07cdd024807d305296caf55f1b1613c285cdec86db97fb57659c42c11a0
@@ -6,11 +6,14 @@ bundler_args: --without console
6
6
  after_success:
7
7
  - '[ -d coverage ] && bundle exec codeclimate-test-reporter'
8
8
  rvm:
9
- - 2.3.8
10
- - 2.4.5
11
- - 2.5.3
12
- - 2.6.1
13
- - jruby-9.2.6.0
9
+ - 2.4.6
10
+ - 2.5.5
11
+ - 2.6.3
12
+ - jruby-9.2.7.0
13
+ - truffleruby
14
+ matrix:
15
+ allow_failures:
16
+ - rvm: truffleruby
14
17
  env:
15
18
  global:
16
19
  - JRUBY_OPTS='--dev -J-Xmx1024M'
@@ -1,3 +1,11 @@
1
+ ## 0.8.3 - 2019-05-29
2
+
3
+ ## Fixed
4
+
5
+ * `Configurable#dup` and `Configurable#clone` make a copy of instance-level config so that it doesn't get mutated/shared across instances (flash-gordon)
6
+
7
+ [Compare v0.8.2...v0.8.3](https://github.com/dry-rb/dry-configurable/compare/v0.8.2...v0.8.3)
8
+
1
9
  ## 0.8.2 - 2019-02-25
2
10
 
3
11
  ## Fixed
data/README.md CHANGED
@@ -2,8 +2,9 @@
2
2
  [gem]: https://rubygems.org/gems/dry-configurable
3
3
  [travis]: https://travis-ci.org/dry-rb/dry-configurable
4
4
  [inch]: http://inch-ci.org/github/dry-rb/dry-configurable
5
+ [chat]: https://dry-rb.zulipchat.com
5
6
 
6
- # dry-configurable [![Join the Gitter chat](https://badges.gitter.im/Join%20Chat.svg)][gitter]
7
+ # dry-configurable [![Join the chat at https://dry-rb.zulipchat.com](https://img.shields.io/badge/dry--rb-join%20chat-%23346b7a.svg)][chat]
7
8
 
8
9
  [![Gem Version](https://img.shields.io/gem/v/dry-configurable.svg)][gem]
9
10
  [![Build Status](https://img.shields.io/travis/dry-rb/dry-configurable.svg)][travis]
@@ -170,5 +170,23 @@ module Dry
170
170
  freeze
171
171
  config.finalize!
172
172
  end
173
+
174
+ # @api public
175
+ def dup
176
+ super.tap do |copy|
177
+ copy.instance_variable_set(:@config, config.dup)
178
+ end
179
+ end
180
+
181
+ # @api public
182
+ def clone
183
+ if frozen?
184
+ super
185
+ else
186
+ super.tap do |copy|
187
+ copy.instance_variable_set(:@config, config.dup)
188
+ end
189
+ end
190
+ end
173
191
  end
174
192
  end
@@ -133,6 +133,14 @@ module Dry
133
133
  self
134
134
  end
135
135
 
136
+ def dup
137
+ if self.defined?
138
+ self.class.new.define!(to_h)
139
+ else
140
+ self.class.new
141
+ end
142
+ end
143
+
136
144
  private
137
145
 
138
146
  # @private
@@ -1,6 +1,6 @@
1
1
  module Dry
2
2
  module Configurable
3
3
  # @api public
4
- VERSION = '0.8.2'.freeze
4
+ VERSION = '0.8.3'.freeze
5
5
  end
6
6
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dry-configurable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.2
4
+ version: 0.8.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andy Holland
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-25 00:00:00.000000000 Z
11
+ date: 2019-05-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: concurrent-ruby
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  - !ruby/object:Gem::Version
136
136
  version: '0'
137
137
  requirements: []
138
- rubygems_version: 3.0.1
138
+ rubygems_version: 3.0.3
139
139
  signing_key:
140
140
  specification_version: 4
141
141
  summary: A mixin to add configuration functionality to your classes