configx 0.1.0 → 0.2.0

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: 51b3ba99940f73078c374d7fb7804e231e58657903d6592ad9b594f42925d3b2
4
- data.tar.gz: f51ed4cd4c47db8f05eb512d83d2d38bc0277e6acaed4aef54bd964e1bf87812
3
+ metadata.gz: 510a5be8bc3e9bb1988b2f2afa84f3f54402ad7391ca5cadcd9e6535b297d43a
4
+ data.tar.gz: d9c76e98f133c0d7e5af8bcfc9196668af1a3420e57c3222da0e877f73e36597
5
5
  SHA512:
6
- metadata.gz: 0d07f1c7ab54071b42411736e107635a6c75a2a867dc22e32c685e7964eaa9ab1c4204a988c797a6280b0dc71a8470d760b16fb8092e04142a138c9d3c8bc9fd
7
- data.tar.gz: 5bf94989849a17a47c833a6599ca029123fdf1b96cb704baab1d028fcfd9ce6efb09b1ed7b50285bc41fce5c05a78e70ceeab36367f53e14631a77c892162559
6
+ metadata.gz: f48fe08717ac98a5dd05dadfa484e0ef06fe32ea2d860d17963d1e290a2fddd12a9c501f72b916e4885794c3c00191f7713c04a69d610b2e22dd2a24c746e08f
7
+ data.tar.gz: d17073c4a672bea2a2704b9596f650fdd7d8299970930a70a69a53e76a7a7668203214931f91dbded55f7286fc7be50c3c0f5a7910581bc9abd3490b07e0d637
data/README.md CHANGED
@@ -161,6 +161,13 @@ config = ConfigX.builder
161
161
  .load
162
162
  ```
163
163
 
164
+ Sometimes you may want to just load configuration from a single source, for example, from for testing purposes:
165
+
166
+ ```ruby
167
+ config = ConfigX.from({api: {enabled: true}})
168
+ config.api.enabled # => true
169
+ ```
170
+
164
171
  ## Development
165
172
 
166
173
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ConfigX
4
- VERSION = "0.1.0"
4
+ VERSION = "0.2.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: configx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tëma Bolshakov
@@ -74,9 +74,6 @@ files:
74
74
  - sig/config_x/hash_source.rbs
75
75
  - sig/config_x/source.rbs
76
76
  - sig/config_x/yaml_source.rbs
77
- - sig/shims/deep_merge.rbs
78
- - sig/shims/env.rbs
79
- - sig/shims/zeitwerk/loader.rbs
80
77
  homepage: https://github.com/bolshakov/configx
81
78
  licenses:
82
79
  - MIT
@@ -1,7 +0,0 @@
1
- module DeepMerge
2
- def self.deep_merge!: [K1, V1, K2, V2] (
3
- Hash[K1, V1] source,
4
- Hash[K2, V2] destination,
5
- ?overwrite_arrays: bool
6
- ) -> Hash[K1 | K2, V1 | V2]
7
- end
data/sig/shims/env.rbs DELETED
@@ -1,17 +0,0 @@
1
- # module ENV
2
- # extend Enumerable[[String, String]]
3
- #
4
- # # def self.[]: (::String) -> (::String | nil)
5
- # # def self.[]=: (::String, ::String) -> ::String
6
- # # def self.fetch: [A] (key: ::String, default: A) -> (A | ::String)
7
- # # def self.fetch: (key: ::String) ?{ ::String -> A } -> (::String | A)
8
- # # def self.delete: (::String) -> (::String | nil)
9
- # # def self.key?: (::String) -> bool
10
- # # def self.clear: () -> void
11
- # # def self.to_h: () -> Hash[::String, ::String]
12
- # # def self.each: () { (::String, ::String) -> void } -> void
13
- # # def self.each_key: () { (::String) -> void } -> void
14
- # # def self.each_value: () { (::String) -> void } -> void
15
- # # def self.keys: () -> Array[::String]
16
- # # def self.values: () -> Array[::String]
17
- # end
@@ -1,8 +0,0 @@
1
- module Zeitwerk
2
- class Loader
3
- def self.for_gem: -> instance
4
-
5
- def ignore: (String) -> void
6
- def setup: -> void
7
- end
8
- end