unifig 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/README.md +2 -2
- data/lib/unifig/init.rb +1 -1
- data/lib/unifig/var.rb +3 -1
- data/lib/unifig/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/unifig/init_spec.rb +1 -1
- data/spec/unifig/var_spec.rb +7 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3dd53898f75a8cecfe556024e2136c141586f0d772e493a7125b6391b975d41a
|
4
|
+
data.tar.gz: 7402d78ae39a6491381c56d595e9f107447285f8392a9667a43b0e8a09cbcc84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 742c85475b18944582d8143704a898d1494d5844273e25b7bd2ba0dd49b08a55d6eeffaebd769ff210bdb537a64fe3785dd98e2d24524355d29ea86a95625a99
|
7
|
+
data.tar.gz: d9ad1ed5b1838d9761195346cb71ab1e68b02bafe8259d4146cf6a3a70dd7bf0e1dfe9ea0d1cc5fbdb2d47312b976af7f0863c3a50c4caac35532f6338fa39c8
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,9 @@
|
|
1
|
+
# [0.3.1][] (2022-07-31)
|
2
|
+
|
3
|
+
## Fixed
|
4
|
+
|
5
|
+
- Frozen strings returned from providers caused an error.
|
6
|
+
|
1
7
|
# [0.3.0][] (2022-07-31)
|
2
8
|
|
3
9
|
## Changed
|
@@ -21,6 +27,7 @@
|
|
21
27
|
|
22
28
|
Initial release.
|
23
29
|
|
30
|
+
[0.3.1]: https://github.com/AaronLasseigne/unifig/compare/v0.3.0...v0.3.1
|
24
31
|
[0.3.0]: https://github.com/AaronLasseigne/unifig/compare/v0.2.0...v0.3.0
|
25
32
|
[0.2.0]: https://github.com/AaronLasseigne/unifig/compare/v0.1.0...v0.2.0
|
26
33
|
[0.1.0]: https://github.com/AaronLasseigne/unifig/compare/v0.0.0...v0.1.0
|
data/README.md
CHANGED
@@ -18,13 +18,13 @@ If you want to use Unifig outside of a framework listed above you can manually a
|
|
18
18
|
Add it to your Gemfile:
|
19
19
|
|
20
20
|
``` rb
|
21
|
-
gem 'unifig', '~> 0.3.
|
21
|
+
gem 'unifig', '~> 0.3.1'
|
22
22
|
```
|
23
23
|
|
24
24
|
Or install it manually:
|
25
25
|
|
26
26
|
``` sh
|
27
|
-
$ gem install unifig --version '~> 0.3.
|
27
|
+
$ gem install unifig --version '~> 0.3.1'
|
28
28
|
```
|
29
29
|
|
30
30
|
This project uses [Semantic Versioning][].
|
data/lib/unifig/init.rb
CHANGED
data/lib/unifig/var.rb
CHANGED
@@ -32,7 +32,9 @@ module Unifig
|
|
32
32
|
|
33
33
|
# @private
|
34
34
|
def value=(obj)
|
35
|
-
|
35
|
+
value = blank?(obj) ? nil : obj
|
36
|
+
value = value.dup.freeze unless value.frozen?
|
37
|
+
@value = value
|
36
38
|
end
|
37
39
|
|
38
40
|
# The name of the method this variable can be found using.
|
data/lib/unifig/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
data/spec/unifig/init_spec.rb
CHANGED
data/spec/unifig/var_spec.rb
CHANGED
@@ -25,6 +25,13 @@ RSpec.describe Unifig::Var do
|
|
25
25
|
|
26
26
|
expect(var.value).to be_nil
|
27
27
|
end
|
28
|
+
|
29
|
+
it 'freezes the value if no frozen' do
|
30
|
+
var.value = 'a'
|
31
|
+
|
32
|
+
expect(var.value).to eql 'a'
|
33
|
+
expect(var.value).to be_frozen
|
34
|
+
end
|
28
35
|
end
|
29
36
|
|
30
37
|
describe '#local_value' do
|