dotenv-merge 1.0.3 → 7.1.3
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
- checksums.yaml.gz.sig +0 -0
- data/LICENSE.md +13 -0
- data/README.md +94 -490
- data/lib/dotenv/merge/backend.rb +70 -0
- data/lib/dotenv/merge/comment_tracker.rb +112 -0
- data/lib/dotenv/merge/debug_logger.rb +2 -2
- data/lib/dotenv/merge/env_line.rb +10 -14
- data/lib/dotenv/merge/file_analysis.rb +150 -21
- data/lib/dotenv/merge/freeze_node.rb +1 -1
- data/lib/dotenv/merge/merge_result.rb +6 -6
- data/lib/dotenv/merge/provider.rb +690 -0
- data/lib/dotenv/merge/smart_merger.rb +360 -137
- data/lib/dotenv/merge/version.rb +5 -4
- data/lib/dotenv/merge.rb +34 -18
- data/lib/dotenv-merge.rb +9 -1
- data/sig/dotenv/merge.rbs +15 -200
- data.tar.gz.sig +0 -0
- metadata +113 -80
- metadata.gz.sig +0 -0
- data/CHANGELOG.md +0 -120
- data/CITATION.cff +0 -20
- data/CODE_OF_CONDUCT.md +0 -134
- data/CONTRIBUTING.md +0 -227
- data/FUNDING.md +0 -74
- data/LICENSE.txt +0 -21
- data/REEK +0 -0
- data/RUBOCOP.md +0 -71
- data/SECURITY.md +0 -21
- data/sig/dotenv/merge/env_line.rbs +0 -90
data/SECURITY.md
DELETED
|
@@ -1,21 +0,0 @@
|
|
|
1
|
-
# Security Policy
|
|
2
|
-
|
|
3
|
-
## Supported Versions
|
|
4
|
-
|
|
5
|
-
| Version | Supported |
|
|
6
|
-
|----------|-----------|
|
|
7
|
-
| 1.latest | ✅ |
|
|
8
|
-
|
|
9
|
-
## Security contact information
|
|
10
|
-
|
|
11
|
-
To report a security vulnerability, please use the
|
|
12
|
-
[Tidelift security contact](https://tidelift.com/security).
|
|
13
|
-
Tidelift will coordinate the fix and disclosure.
|
|
14
|
-
|
|
15
|
-
## Additional Support
|
|
16
|
-
|
|
17
|
-
If you are interested in support for versions older than the latest release,
|
|
18
|
-
please consider sponsoring the project / maintainer @ https://liberapay.com/pboling/donate,
|
|
19
|
-
or find other sponsorship links in the [README].
|
|
20
|
-
|
|
21
|
-
[README]: README.md
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
module Dotenv
|
|
2
|
-
module Merge
|
|
3
|
-
# Represents a single line in a dotenv file.
|
|
4
|
-
# Parses and categorizes lines as assignments, comments, blank lines, or invalid.
|
|
5
|
-
class EnvLine
|
|
6
|
-
# Prefix for exported environment variables
|
|
7
|
-
EXPORT_PREFIX: String
|
|
8
|
-
|
|
9
|
-
# Location struct for compatibility with AST nodes
|
|
10
|
-
class Location < Struct[Integer]
|
|
11
|
-
attr_accessor start_line: Integer
|
|
12
|
-
attr_accessor end_line: Integer
|
|
13
|
-
|
|
14
|
-
# Check if a line number falls within this location
|
|
15
|
-
def cover?: (Integer line_number) -> bool
|
|
16
|
-
end
|
|
17
|
-
|
|
18
|
-
# The original raw line content
|
|
19
|
-
attr_reader raw: String
|
|
20
|
-
|
|
21
|
-
# The 1-indexed line number in the source file
|
|
22
|
-
attr_reader line_number: Integer
|
|
23
|
-
|
|
24
|
-
# The line type (:assignment, :comment, :blank, :invalid)
|
|
25
|
-
attr_reader type: Symbol?
|
|
26
|
-
|
|
27
|
-
# The environment variable key (for assignments)
|
|
28
|
-
attr_reader key: String?
|
|
29
|
-
|
|
30
|
-
# The environment variable value (for assignments)
|
|
31
|
-
attr_reader value: String?
|
|
32
|
-
|
|
33
|
-
# Whether the line has an export prefix
|
|
34
|
-
attr_reader export: bool
|
|
35
|
-
|
|
36
|
-
# Initialize a new EnvLine by parsing the raw content
|
|
37
|
-
def initialize: (String raw, Integer line_number) -> void
|
|
38
|
-
|
|
39
|
-
# Generate a unique signature for this line (used for merge matching)
|
|
40
|
-
def signature: () -> Array[Symbol | String]?
|
|
41
|
-
|
|
42
|
-
# Get a location object for this line
|
|
43
|
-
def location: () -> Location
|
|
44
|
-
|
|
45
|
-
# Check if this line is an environment variable assignment
|
|
46
|
-
def assignment?: () -> bool
|
|
47
|
-
|
|
48
|
-
# Check if this line is a comment
|
|
49
|
-
def comment?: () -> bool
|
|
50
|
-
|
|
51
|
-
# Check if this line is blank (empty or whitespace only)
|
|
52
|
-
def blank?: () -> bool
|
|
53
|
-
|
|
54
|
-
# Check if this line is invalid (unparseable)
|
|
55
|
-
def invalid?: () -> bool
|
|
56
|
-
|
|
57
|
-
# Check if this line has the export prefix
|
|
58
|
-
def export?: () -> bool
|
|
59
|
-
|
|
60
|
-
# Get the raw comment text (for comment lines only)
|
|
61
|
-
def comment: () -> String?
|
|
62
|
-
|
|
63
|
-
# Convert to string representation (returns raw content)
|
|
64
|
-
def to_s: () -> String
|
|
65
|
-
|
|
66
|
-
# Inspect for debugging
|
|
67
|
-
def inspect: () -> String
|
|
68
|
-
|
|
69
|
-
private
|
|
70
|
-
|
|
71
|
-
# Parse the raw line content and set type, key, value, and export
|
|
72
|
-
def parse!: () -> void
|
|
73
|
-
|
|
74
|
-
# Parse a potential assignment line
|
|
75
|
-
def parse_assignment!: (String stripped) -> void
|
|
76
|
-
|
|
77
|
-
# Validate an environment variable key
|
|
78
|
-
def valid_key?: (String? key) -> bool
|
|
79
|
-
|
|
80
|
-
# Remove quotes from a value and process escape sequences
|
|
81
|
-
def unquote: (String value) -> String
|
|
82
|
-
|
|
83
|
-
# Process escape sequences in double-quoted strings
|
|
84
|
-
def process_escape_sequences: (String value) -> String
|
|
85
|
-
|
|
86
|
-
# Strip inline comments from unquoted values
|
|
87
|
-
def strip_inline_comment: (String value) -> String
|
|
88
|
-
end
|
|
89
|
-
end
|
|
90
|
-
end
|