opera 0.2.3 → 0.2.4

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: c87b8365cd3d9a0da8fce865abe9babe04df29df31253697ec01bf45ee81d897
4
- data.tar.gz: 313ba34f1abc8e4845b71a4b1f209362ad14c08d79dd30a51b120c52e364ee2f
3
+ metadata.gz: b63b9dffc54255a4cc0e1e1c7f243258d36eb6e2812702a259073d705b1d680e
4
+ data.tar.gz: 3dba8a4459b1215f61af896ee712de74cf870103e70681ba30301904632e6225
5
5
  SHA512:
6
- metadata.gz: 42bdbac9178ca00ea91d998c5d1ee20a125993bc5ac830d5e5f523092527a40d1948a5504b5120d88b72200272994c71839cb2ea6d4361cd1a7402d8e9e76c16
7
- data.tar.gz: 1ba960d0d599d5cfc9c0d0c5e788420043fb8bbc4c1608f806bc751b9e4b0dd00744fd3a10a200957ff9fcce7c300c508ca27c5b2d6da3b022601dfb9587dbee
6
+ metadata.gz: ef95fe48da334013d5c873e8b7a1f24dad951ce81b40b0d389c7b348d4a7f376b4bf1ff0b5e1fa861f22dd9fb22a74ad670a7b0ab536b671f85d889c55187651
7
+ data.tar.gz: 6539b51d037350cab91486f43f837fb194b9dcf298e36266cde0759552ed277866538959307d5a107284fdbc983d36b4695f539957748a2947c490534cec7ba9
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Opera Changelog
2
2
 
3
+ ### 0.2.4 - July 26, 2021
4
+
5
+ - prevent default from overwrite falsy values
6
+ - allow params and dependencies to get defaults
7
+
3
8
  ### 0.2.3 - July 26, 2021
4
9
 
5
10
  - Support context, params and dependencies accessors
@@ -60,7 +60,13 @@ module Opera
60
60
  check_method_availability!(attribute)
61
61
 
62
62
  define_method(attribute) do
63
- send(method)[attribute] ||= options[:default]
63
+ value = send(method).key?(attribute) ? send(method)[attribute] : options[:default]
64
+
65
+ if send(method).frozen?
66
+ send(method)[attribute] || value
67
+ else
68
+ send(method)[attribute] ||= value
69
+ end
64
70
  end
65
71
  end
66
72
  end
data/lib/opera/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Opera
2
- VERSION = '0.2.3'
2
+ VERSION = '0.2.4'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: opera
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - ProFinda Development Team