dry-configurable 0.8.2 → 0.8.3
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 +4 -4
- data/.travis.yml +8 -5
- data/CHANGELOG.md +8 -0
- data/README.md +2 -1
- data/lib/dry/configurable.rb +18 -0
- data/lib/dry/configurable/config.rb +8 -0
- data/lib/dry/configurable/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e2952b22a9581b91b77a416925a150088ea715be486638e293beae10d5b493a8
|
4
|
+
data.tar.gz: 6cf8073234d53e391e25d03eb0b3548694ebbaa30742169895b8f1d519f258d7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 441ba5b074dd577bd0e0d37b5a99e76dc1ab85068885832e791eba4cd7a61e5691683f96c93e930a29d59e838b294d82248074433c670466ad31f773e1994dab
|
7
|
+
data.tar.gz: 02f13c05320aca5bb6900dd831966c3edc760fd66b9bfe40f94d079da0f3af30ecbdd07cdd024807d305296caf55f1b1613c285cdec86db97fb57659c42c11a0
|
data/.travis.yml
CHANGED
@@ -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.
|
10
|
-
- 2.
|
11
|
-
- 2.
|
12
|
-
- 2.
|
13
|
-
-
|
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'
|
data/CHANGELOG.md
CHANGED
@@ -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 [][chat]
|
7
8
|
|
8
9
|
[][gem]
|
9
10
|
[][travis]
|
data/lib/dry/configurable.rb
CHANGED
@@ -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
|
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.
|
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-
|
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.
|
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
|