config_default 0.5.4 → 0.5.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 64815caf5e319e0a0450d51ffcec8e2e90358cad44ea56b96810f05ff7376a4f
4
- data.tar.gz: 37412fc1357aa64d689bc94310b2208a1b2f120f91a303fb9b2700398fb65110
3
+ metadata.gz: c22d1fe51fdc892b4a0feb1c94e78ce747eb5cb0cf1136589c52d69e90f955d4
4
+ data.tar.gz: febe3c5867d0e8774c6d97f3293555a53b4d921e9da392c9cda4d8f459962a77
5
5
  SHA512:
6
- metadata.gz: e867d8bed4ce7d7fcbd9b0ff5101cb9049954cb69b3212cdba2f891db5c36ab3799fe25997e7a81a0d94b9bcdfe0e6bb5988086537eb37e7ba68fcad05cbb157
7
- data.tar.gz: 6d1b4e3b838952deb21db1cbddea070703d2737e922db0b2c27c86c795f74c67e075c02cfbc532b8520c1d6279720bc598618d87443c45d02ca7d4fc6e6a8be3
6
+ metadata.gz: c5ece46456a2c44db43c394738ab32079eadc17f28cc9b27959db35b51506f090013dcb5f062bb01c8aec4a4f833e48c581f81736c72f9329bcd85176b344207
7
+ data.tar.gz: dec3f5392874e4c7530c84534895140b725916a2295f126faa7e302c601613c51d827bdf7b42c5e9d3c38237c589f7fd7a21ce8e0e8cf5863f4422eaae1e81c4
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.5.5
2
+ - Ability to pass block context in #struct
3
+
1
4
  ## 0.5.4
2
5
  - Upgrade gems.
3
6
  - Rename #load to #hash
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- config_default (0.5.4)
4
+ config_default (0.5.5)
5
5
  activesupport (>= 6)
6
6
 
7
7
  GEM
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConfigDefault
4
- VERSION = "0.5.4"
4
+ VERSION = "0.5.5"
5
5
  end
@@ -42,9 +42,11 @@ module ConfigDefault
42
42
  end
43
43
  end
44
44
 
45
- def struct(name, key: Rails.env, recursive: false, allow_nil: false)
45
+ def struct(name, key: Rails.env, recursive: false, allow_nil: false, &block)
46
46
  attributes = hash(name, key: key)
47
- ConfigDefault::Struct.new(attributes, recursive: recursive, allow_nil: allow_nil)
47
+ struct = ConfigDefault::Struct.new(attributes, recursive: recursive, allow_nil: allow_nil)
48
+ struct.class_eval(&block) if block
49
+ struct
48
50
  end
49
51
 
50
52
  private
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: config_default
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.4
4
+ version: 0.5.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stepan Kirushkin