dotenvx 5.1.0-x86_64-linux → 5.1.3-x86_64-linux
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 +4 -4
- data/lib/dotenvx/dotenvx_native.so +0 -0
- data/lib/dotenvx/output.rb +43 -0
- data/lib/dotenvx/version.rb +1 -1
- data/lib/dotenvx.rb +4 -2
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: '0380ef3e8005988e5e23b06d2087267e15c7f992ca9d815ae5913fa43bebdb26'
|
|
4
|
+
data.tar.gz: 74eb0a2f4a52f7b85566b6a7967a2593c08802f7d2987b0b7b1c3674c328e8a7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 9b32af0982dabcde38a0242ab16c21861e496a1b56b0da391c32b2c4aed8a44516ef91ebbd14643a77a2df0c48724959b1954ccf824b7826b3e8258e79d8d19c
|
|
7
|
+
data.tar.gz: 6c706a690dbdaddfe633b477b36ac9bafbf9e2458e79e02d2cb212652af3aaf1fd95bd4f7dc8d7bf4d03e3beff41076d89f363a5e5c98c027ebcd34cc606b955
|
|
Binary file
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
module Dotenvx
|
|
2
|
+
module Output
|
|
3
|
+
def self.install(secrets)
|
|
4
|
+
return if secrets.all?(&:empty?)
|
|
5
|
+
|
|
6
|
+
stream = $stdout
|
|
7
|
+
stream.singleton_class.prepend(self) unless stream.is_a?(self)
|
|
8
|
+
stream.dotenvx_redact(secrets)
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def dotenvx_redact(secrets)
|
|
12
|
+
unless @dotenvx_output_filter
|
|
13
|
+
@dotenvx_output_lock = Mutex.new
|
|
14
|
+
@dotenvx_output_filter = Native::OutputRedactor.new
|
|
15
|
+
at_exit { dotenvx_finish_output unless closed? }
|
|
16
|
+
end
|
|
17
|
+
@dotenvx_output_lock.synchronize { @dotenvx_output_filter.add(secrets) }
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def write(*strings)
|
|
21
|
+
return super unless @dotenvx_output_filter
|
|
22
|
+
|
|
23
|
+
texts = strings.map(&:to_s)
|
|
24
|
+
@dotenvx_output_lock.synchronize do
|
|
25
|
+
texts.sum do |text|
|
|
26
|
+
output = @dotenvx_output_filter.write(text)
|
|
27
|
+
super(output.force_encoding(text.encoding)) unless output.empty?
|
|
28
|
+
text.bytesize
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
private
|
|
34
|
+
|
|
35
|
+
def dotenvx_finish_output
|
|
36
|
+
@dotenvx_output_lock.synchronize do
|
|
37
|
+
output = @dotenvx_output_filter.finish
|
|
38
|
+
method(:write).super_method.call(output) unless output.empty?
|
|
39
|
+
flush
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
end
|
data/lib/dotenvx/version.rb
CHANGED
data/lib/dotenvx.rb
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
require "dotenvx/version"
|
|
2
2
|
require "dotenvx/dotenvx_native"
|
|
3
3
|
require "json"
|
|
4
|
+
require "dotenvx/output"
|
|
4
5
|
|
|
5
6
|
module Dotenvx
|
|
6
7
|
class ParseError < RuntimeError
|
|
@@ -16,7 +17,7 @@ module Dotenvx
|
|
|
16
17
|
attr_accessor :instrumenter
|
|
17
18
|
|
|
18
19
|
def load(*filenames, overwrite: false, ignore: [], strict: false, convention: nil, environment: nil, key_files: nil, resolve_references: false)
|
|
19
|
-
env, summary = parse_files(
|
|
20
|
+
env, summary, secrets = parse_files(
|
|
20
21
|
*filenames,
|
|
21
22
|
overwrite: overwrite,
|
|
22
23
|
ignore: ignore,
|
|
@@ -27,6 +28,7 @@ module Dotenvx
|
|
|
27
28
|
resolve_references: resolve_references
|
|
28
29
|
)
|
|
29
30
|
changed = update(env, overwrite: overwrite)
|
|
31
|
+
Output.install(secrets)
|
|
30
32
|
warn summary if summary
|
|
31
33
|
changed
|
|
32
34
|
end
|
|
@@ -106,7 +108,7 @@ module Dotenvx
|
|
|
106
108
|
end
|
|
107
109
|
warn "☠ #{error.fetch("message")}"
|
|
108
110
|
end
|
|
109
|
-
[result.fetch("values"), result.fetch("inject_summary")]
|
|
111
|
+
[result.fetch("values"), result.fetch("inject_summary"), result.fetch("secrets")]
|
|
110
112
|
end
|
|
111
113
|
end
|
|
112
114
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: dotenvx
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 5.1.
|
|
4
|
+
version: 5.1.3
|
|
5
5
|
platform: x86_64-linux
|
|
6
6
|
authors:
|
|
7
7
|
- motdotla
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2026-11-
|
|
11
|
+
date: 2026-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rake
|
|
@@ -79,6 +79,7 @@ files:
|
|
|
79
79
|
- lib/dotenvx.rb
|
|
80
80
|
- lib/dotenvx/dotenvx_native.so
|
|
81
81
|
- lib/dotenvx/load.rb
|
|
82
|
+
- lib/dotenvx/output.rb
|
|
82
83
|
- lib/dotenvx/rails.rb
|
|
83
84
|
- lib/dotenvx/version.rb
|
|
84
85
|
homepage: https://dotenvx.com
|