Skip to content

Commit 4a2c462

Browse files
authored
Merge pull request #231 from hlascelles/switch-to-figjam-debug
Change debug lines to opt in with FIGJAM_DEBUG=true
2 parents ab6b037 + 223f0f4 commit 4a2c462

File tree

12 files changed

+701
-683
lines changed

12 files changed

+701
-683
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
## 3.0.0 (2025-09-01)
2+
3+
⚠️ Breaking (debug) change
4+
- Change debug lines to opt in with FIGJAM_DEBUG=true [#231](https://github.com/hlascelles/figjam/pull/231)
5+
16
## 2.2.1 (2025-07-17)
27

38
- Add require in engine helper [#225](https://github.com/hlascelles/figjam/pull/225)

Gemfile.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
figjam (2.2.1)
4+
figjam (3.0.0)
55
thor (>= 0.14.0, < 2)
66

77
GEM
@@ -94,6 +94,7 @@ GEM
9494
bigdecimal (3.2.2)
9595
builder (3.3.0)
9696
byebug (12.0.0)
97+
climate_control (1.2.0)
9798
coderay (1.1.3)
9899
combustion (1.5.0)
99100
activesupport (>= 3.0.0)
@@ -357,6 +358,7 @@ DEPENDENCIES
357358
aruba
358359
base64
359360
bundler
361+
climate_control
360362
combustion
361363
fasterer
362364
figjam!

README.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ Note, secrets are not to be provided by figjam, so do not add them to your `appl
131131

132132
Deeply nested configuration structures are not possible.
133133

134-
## Silencing type conversion warnings
134+
## Debugging Figjam
135135

136136
Remember that `ENV` in ruby is a simple key/value store. All values will always be strings.
137137
This means that the following code will produce string values:
@@ -142,21 +142,18 @@ SOME_BOOLEAN: true
142142
```
143143

144144
```ruby
145-
# WARNING: Use strings for Figjam configuration. 3 was converted to "3"
146-
# WARNING: Use strings for Figjam configuration. true was converted to "true"
147-
148145
ENV["SOME_NUMBER"] == 3 # => false
149146
ENV["SOME_NUMBER"] == "3" # => true
150147
ENV["SOME_BOOLEAN"] == true # => false
151148
ENV["SOME_BOOLEAN"] == "true" # => true
152149
```
153150

154-
Because this is a possible cause of sleeper bugs, Figjam emits a warning when it does this
155-
conversion to a string. If you are confident in your abilities, you can silence it by adding this
156-
to the top of your `application.yml`:
151+
If you are unsure about how figjam is loading your configuration, you can enable warnings
152+
about type conversion and pre-existing ENV by setting the `FIGJAM_DEBUG` environment variable
153+
to `true`.
157154

158155
```yaml
159-
FIGJAM_SILENCE_STRING_WARNINGS: true
156+
FIGJAM_DEBUG: true
160157
```
161158

162159
### Using `Figjam.env`

figjam.gemspec

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ Gem::Specification.new do |spec|
2929
# Ruby 3.4 needs this gem for specs, otherwise we see "cannot load such file -- base64"
3030
spec.add_development_dependency "base64"
3131
spec.add_development_dependency "bundler"
32+
spec.add_development_dependency "climate_control"
3233
spec.add_development_dependency "combustion"
3334
spec.add_development_dependency "fasterer"
3435
# Ruby 3.4 needs this gem for specs, otherwise we see "cannot load such file -- mutex_m"

0 commit comments

Comments
 (0)