anyway_config 2.5.1 → 2.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/README.md +6 -5
- data/lib/.rbnext/2.7/anyway/loaders/yaml.rb +1 -1
- data/lib/anyway/loaders/yaml.rb +1 -1
- data/lib/anyway/rails/autoload.rb +7 -4
- data/lib/anyway/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3c4d3be4fe0dc48b125dc8eb14be21611e1c9a356953f2a2bdad1444aa21eabe
|
4
|
+
data.tar.gz: 4796c3d47f70459e0732913997c9fa80ce5a0a604cb86d8d3098a9144a692326
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7892284a2c1f50287dada83b90be86b11c557a0ec5e5d457a672d9d1db6ba6603299cf5060ca2134dc391f2aa02e3f17f8bcd221b0e8473a55dc99e0bea06ec8
|
7
|
+
data.tar.gz: f4f276d19c6a8a25ebcf46c1e55f176070691fa7af76b15bebafdf9b36a5716e7c3e1fb5ddcba2d07e741792eff0ed46d373d2b5651ac77c58d0b4527a097e75
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
[![Cult Of Martians](http://cultofmartians.com/assets/badges/badge.svg)](https://cultofmartians.com/tasks/anyway-config-options-parse.html#task)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/anyway_config.svg)](https://rubygems.org/gems/anyway_config) [![Build](https://github.com/palkan/anyway_config/workflows/Build/badge.svg)](https://github.com/palkan/anyway_config/actions)
|
3
3
|
[![JRuby Build](https://github.com/palkan/anyway_config/workflows/JRuby%20Build/badge.svg)](https://github.com/palkan/anyway_config/actions)
|
4
|
+
[![TruffleRuby Build](https://github.com/palkan/anyway_config/workflows/TruffleRuby%20Build/badge.svg)](https://github.com/palkan/anyway_config/actions)
|
4
5
|
|
5
6
|
# Anyway Config
|
6
7
|
|
@@ -614,14 +615,14 @@ Environmental variables for your config should start with your config name, uppe
|
|
614
615
|
|
615
616
|
For example, if your config name is "mycoolgem", then the env var "MYCOOLGEM_PASSWORD" is used as `config.password`.
|
616
617
|
|
617
|
-
By default, environment variables are automatically type cast
|
618
|
+
By default, environment variables are automatically type cast (rules are case-insensitive):
|
618
619
|
|
619
|
-
- `"
|
620
|
-
- `"
|
620
|
+
- `"true"`, `"t"`, `"yes"` and `"y"` to `true`;
|
621
|
+
- `"false"`, `"f"`, `"no"` and `"n"` to `false`;
|
621
622
|
- `"nil"` and `"null"` to `nil` (do you really need it?);
|
622
|
-
- `"123"` to 123 and `"3.14"` to 3.14
|
623
|
+
- `"123"` to `123` and `"3.14"` to `3.14`.
|
623
624
|
|
624
|
-
|
625
|
+
Type coercion can be [customized or disabled](#type-coercion).
|
625
626
|
|
626
627
|
*Anyway Config* supports nested (_hashed_) env variables—just separate keys with double-underscore.
|
627
628
|
|
data/lib/anyway/loaders/yaml.rb
CHANGED
@@ -31,9 +31,12 @@ module Anyway
|
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
34
|
+
# TruffleRuby doesn't support TracePoint's end event
|
35
|
+
unless defined?(::TruffleRuby)
|
36
|
+
@tracer = TracePoint.new(:end, &method(:tracepoint_class_callback))
|
37
|
+
@tracer.enable
|
38
|
+
# Use `Module#name` instead of `self.name` to handle overwritten `name` method
|
39
|
+
@name_method = Module.instance_method(:name)
|
40
|
+
end
|
38
41
|
end
|
39
42
|
end
|
data/lib/anyway/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anyway_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.5.
|
4
|
+
version: 2.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Vladimir Dementyev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-08-
|
11
|
+
date: 2023-08-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ruby-next-core
|