anyway_config 2.5.1 → 2.5.2

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: 2b7d08d5b962854362876ef57a33cb5a7db900a2b116cfc55e6a111fe67a6908
4
- data.tar.gz: 8330ecf2804805dc40fd4966e5f0da06a8e46d87a9f01d1d377f5687b61cbdff
3
+ metadata.gz: 3c4d3be4fe0dc48b125dc8eb14be21611e1c9a356953f2a2bdad1444aa21eabe
4
+ data.tar.gz: 4796c3d47f70459e0732913997c9fa80ce5a0a604cb86d8d3098a9144a692326
5
5
  SHA512:
6
- metadata.gz: 5af5f14653ba282b7c4e89d88c85dc3908d693fa7dc93c0436dba5044c1a8d98cae12284b97bfae9c3b9415dea5b745ac3bb9ee3639fc7880c61b3c3f6bf7465
7
- data.tar.gz: b6d44f0500203371beaa12cdc47a24a9e9a66d66305491649e0961a9285d5280692cf5828736fa79afbd8fdd1459e26bf0a2715415c44188604c90616b880242
6
+ metadata.gz: 7892284a2c1f50287dada83b90be86b11c557a0ec5e5d457a672d9d1db6ba6603299cf5060ca2134dc391f2aa02e3f17f8bcd221b0e8473a55dc99e0bea06ec8
7
+ data.tar.gz: f4f276d19c6a8a25ebcf46c1e55f176070691fa7af76b15bebafdf9b36a5716e7c3e1fb5ddcba2d07e741792eff0ed46d373d2b5651ac77c58d0b4527a097e75
data/CHANGELOG.md CHANGED
@@ -2,6 +2,10 @@
2
2
 
3
3
  ## master
4
4
 
5
+ ## 2.5.2 (2023-08-23)
6
+
7
+ - Disable Rails post-load detection in TruffleRuby. ([@palkan][])
8
+
5
9
  ## 2.5.1 (2023-08-04)
6
10
 
7
11
  - Fix Rails detection. ([@palkan][])
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
- - `"True"`, `"t"` and `"yes"` to `true`;
620
- - `"False"`, `"f"` and `"no"` to `false`;
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
- \* See below for coercion customization.
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
 
@@ -70,7 +70,7 @@ module Anyway
70
70
  alias_method :load_local_yml, :parse_yml
71
71
 
72
72
  def local_config_path(path)
73
- path.sub(/\.yml/, ".local.yml")
73
+ path.sub(".yml", ".local.yml")
74
74
  end
75
75
 
76
76
  def relative_config_path(path)
@@ -70,7 +70,7 @@ module Anyway
70
70
  alias_method :load_local_yml, :parse_yml
71
71
 
72
72
  def local_config_path(path)
73
- path.sub(/\.yml/, ".local.yml")
73
+ path.sub(".yml", ".local.yml")
74
74
  end
75
75
 
76
76
  def relative_config_path(path)
@@ -31,9 +31,12 @@ module Anyway
31
31
  end
32
32
  end
33
33
 
34
- @tracer = TracePoint.new(:end, &method(:tracepoint_class_callback))
35
- @tracer.enable
36
- # Use `Module#name` instead of `self.name` to handle overwritten `name` method
37
- @name_method = Module.instance_method(:name)
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Anyway # :nodoc:
4
- VERSION = "2.5.1"
4
+ VERSION = "2.5.2"
5
5
  end
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.1
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-04 00:00:00.000000000 Z
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