erb-processor 1.0.17 → 1.0.18
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/CLAUDE.md +61 -0
- data/Gemfile.lock +26 -4
- data/erb-processor.gemspec +1 -1
- data/lib/erb/processor/version.rb +1 -1
- metadata +3 -3
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: a1642416842f93dd43b0f27883a669f5bffcfd3aa46f40ec7d967ec9ed3d6069
|
|
4
|
+
data.tar.gz: 6cf5160d74e44eb382f30d28c0fb74492482ddf3805d6c04b967fe5104000c12
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 170ac54fb4f4b279f6980f7ae8c49a99c0e44f75a8597872b1e19f5ce772720ac5107cc770e8a703e0bf0c6df0e00746d2e6e1c5938d5e306737106024ccd9fd
|
|
7
|
+
data.tar.gz: b1d708410ef32c643797ba818fdbb9e440d8c6b28b550132ee645fd13f9ca73781fa196c18104f00663f2bb9fb2d988d6ac99c3db8fa83114b52b9545cf76e5c
|
data/CLAUDE.md
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
# CLAUDE.md
|
|
2
|
+
|
|
3
|
+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
|
|
4
|
+
|
|
5
|
+
## Project Overview
|
|
6
|
+
|
|
7
|
+
ERB::Processor is a Ruby gem that processes all `.erb` files in a directory tree. It evaluates each ERB template and writes the output to a file with the `.erb` extension removed.
|
|
8
|
+
|
|
9
|
+
## Common Commands
|
|
10
|
+
|
|
11
|
+
```bash
|
|
12
|
+
# Install dependencies
|
|
13
|
+
bin/setup
|
|
14
|
+
|
|
15
|
+
# Run all verification (specs + cucumber + rubocop)
|
|
16
|
+
rake verify
|
|
17
|
+
|
|
18
|
+
# Run RSpec tests only
|
|
19
|
+
rake spec
|
|
20
|
+
|
|
21
|
+
# Run a single spec file
|
|
22
|
+
bundle exec rspec spec/erb/processor/for_single_file_spec.rb
|
|
23
|
+
|
|
24
|
+
# Run Cucumber acceptance tests
|
|
25
|
+
rake cucumber
|
|
26
|
+
|
|
27
|
+
# Run a single feature file
|
|
28
|
+
bundle exec cucumber features/process_all_erb_files.feature
|
|
29
|
+
|
|
30
|
+
# Run linter with auto-correct
|
|
31
|
+
rake rubocop
|
|
32
|
+
|
|
33
|
+
# Run the CLI tool
|
|
34
|
+
bin/erb-processor <directory>
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Architecture
|
|
38
|
+
|
|
39
|
+
### Core Classes (lib/erb/processor/)
|
|
40
|
+
|
|
41
|
+
- **ForDirectoryTree** - Entry point that walks a directory tree using `Find.find`, delegating each `.erb` file to `ForSingleFile`
|
|
42
|
+
- **ForSingleFile** - Processes a single ERB template: reads template, evaluates with ERB, writes output. Exposes `erb_processor` binding for templates to access helper methods like `commented_processed_header`
|
|
43
|
+
- **LanguageCommenter** - Generates language-appropriate comment syntax (C-style, Python, Ruby, HTML, etc.) for the auto-generated header based on output file extension
|
|
44
|
+
- **LoggingSetup** - Singleton that configures the `logging` gem with console output
|
|
45
|
+
|
|
46
|
+
### Template Binding
|
|
47
|
+
|
|
48
|
+
Templates can access `erb_processor` (the `ForSingleFile` instance) to call:
|
|
49
|
+
- `commented_processed_header` - Returns a "DO NOT EDIT" warning commented appropriately for the target language
|
|
50
|
+
|
|
51
|
+
### Test Structure
|
|
52
|
+
|
|
53
|
+
- **spec/** - RSpec unit tests for individual classes
|
|
54
|
+
- **features/** - Cucumber acceptance tests using Aruba for CLI testing (see `features/*.feature` for behavior documentation)
|
|
55
|
+
|
|
56
|
+
## Commit Conventions
|
|
57
|
+
|
|
58
|
+
- Use conventional commit format: `type(scope): subject`
|
|
59
|
+
- Keep subject line under 50 characters
|
|
60
|
+
- Use present tense ("add feature" not "added feature")
|
|
61
|
+
- Avoid overly verbose descriptions or unnecessary details.
|
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
erb-processor (1.0.
|
|
4
|
+
erb-processor (1.0.18)
|
|
5
5
|
logging
|
|
6
6
|
|
|
7
7
|
GEM
|
|
@@ -31,6 +31,7 @@ GEM
|
|
|
31
31
|
ast (2.4.3)
|
|
32
32
|
base64 (0.3.0)
|
|
33
33
|
bigdecimal (4.0.1)
|
|
34
|
+
bigdecimal (4.0.1-java)
|
|
34
35
|
builder (3.3.0)
|
|
35
36
|
bundler-audit (0.9.3)
|
|
36
37
|
bundler (>= 1.2.0)
|
|
@@ -58,19 +59,21 @@ GEM
|
|
|
58
59
|
cucumber-tag-expressions (> 6, < 9)
|
|
59
60
|
cucumber-cucumber-expressions (18.1.0)
|
|
60
61
|
bigdecimal
|
|
61
|
-
cucumber-gherkin (
|
|
62
|
-
cucumber-messages (>= 31, <
|
|
62
|
+
cucumber-gherkin (38.0.0)
|
|
63
|
+
cucumber-messages (>= 31, < 33)
|
|
63
64
|
cucumber-html-formatter (22.3.0)
|
|
64
65
|
cucumber-messages (> 23, < 33)
|
|
65
|
-
cucumber-messages (
|
|
66
|
+
cucumber-messages (32.0.0)
|
|
66
67
|
cucumber-tag-expressions (8.1.0)
|
|
67
68
|
date (3.5.1)
|
|
69
|
+
date (3.5.1-java)
|
|
68
70
|
descendants_tracker (0.0.4)
|
|
69
71
|
thread_safe (~> 0.3, >= 0.3.1)
|
|
70
72
|
diff-lcs (1.6.2)
|
|
71
73
|
docile (1.4.1)
|
|
72
74
|
drb (2.2.3)
|
|
73
75
|
erb (6.0.1)
|
|
76
|
+
erb (6.0.1-java)
|
|
74
77
|
faraday (1.10.4)
|
|
75
78
|
faraday-em_http (~> 1.0)
|
|
76
79
|
faraday-em_synchrony (~> 1.0)
|
|
@@ -95,6 +98,7 @@ GEM
|
|
|
95
98
|
faraday-rack (1.0.0)
|
|
96
99
|
faraday-retry (1.0.3)
|
|
97
100
|
ffi (1.17.3)
|
|
101
|
+
ffi (1.17.3-java)
|
|
98
102
|
ffi (1.17.3-x86_64-linux-gnu)
|
|
99
103
|
formatador (1.2.3)
|
|
100
104
|
reline
|
|
@@ -146,7 +150,10 @@ GEM
|
|
|
146
150
|
i18n (1.14.8)
|
|
147
151
|
concurrent-ruby (~> 1.0)
|
|
148
152
|
io-console (0.8.2)
|
|
153
|
+
io-console (0.8.2-java)
|
|
154
|
+
jar-dependencies (0.5.5)
|
|
149
155
|
json (2.18.0)
|
|
156
|
+
json (2.18.0-java)
|
|
150
157
|
juwelier (2.4.9)
|
|
151
158
|
builder
|
|
152
159
|
bundler
|
|
@@ -190,6 +197,8 @@ GEM
|
|
|
190
197
|
nokogiri (1.19.0)
|
|
191
198
|
mini_portile2 (~> 2.8.2)
|
|
192
199
|
racc (~> 1.4)
|
|
200
|
+
nokogiri (1.19.0-java)
|
|
201
|
+
racc (~> 1.4)
|
|
193
202
|
nokogiri (1.19.0-x86_64-linux-gnu)
|
|
194
203
|
racc (~> 1.4)
|
|
195
204
|
notiffany (0.1.3)
|
|
@@ -212,11 +221,20 @@ GEM
|
|
|
212
221
|
coderay (~> 1.1)
|
|
213
222
|
method_source (~> 1.0)
|
|
214
223
|
reline (>= 0.6.0)
|
|
224
|
+
pry (0.16.0-java)
|
|
225
|
+
coderay (~> 1.1)
|
|
226
|
+
method_source (~> 1.0)
|
|
227
|
+
reline (>= 0.6.0)
|
|
228
|
+
spoon (~> 0.0)
|
|
215
229
|
psych (5.3.1)
|
|
216
230
|
date
|
|
217
231
|
stringio
|
|
232
|
+
psych (5.3.1-java)
|
|
233
|
+
date
|
|
234
|
+
jar-dependencies (>= 0.1.7)
|
|
218
235
|
public_suffix (7.0.2)
|
|
219
236
|
racc (1.8.1)
|
|
237
|
+
racc (1.8.1-java)
|
|
220
238
|
rack (3.2.4)
|
|
221
239
|
rainbow (3.1.1)
|
|
222
240
|
rake (13.3.1)
|
|
@@ -302,6 +320,8 @@ GEM
|
|
|
302
320
|
simplecov-html (0.13.2)
|
|
303
321
|
simplecov_json_formatter (0.1.4)
|
|
304
322
|
sorcerer (2.0.1)
|
|
323
|
+
spoon (0.0.6)
|
|
324
|
+
ffi
|
|
305
325
|
stringio (3.2.0)
|
|
306
326
|
sys-uname (1.4.1)
|
|
307
327
|
ffi (~> 1.1)
|
|
@@ -310,6 +330,7 @@ GEM
|
|
|
310
330
|
logger
|
|
311
331
|
thor (1.5.0)
|
|
312
332
|
thread_safe (0.3.6)
|
|
333
|
+
thread_safe (0.3.6-java)
|
|
313
334
|
track_open_instances (0.1.15)
|
|
314
335
|
tsort (0.2.0)
|
|
315
336
|
tzinfo (2.0.6)
|
|
@@ -321,6 +342,7 @@ GEM
|
|
|
321
342
|
yard (0.9.38)
|
|
322
343
|
|
|
323
344
|
PLATFORMS
|
|
345
|
+
universal-java-21
|
|
324
346
|
x64-unknown
|
|
325
347
|
x86_64-linux
|
|
326
348
|
|
data/erb-processor.gemspec
CHANGED
|
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
|
|
|
16
16
|
END_OF_DESCRIPTION
|
|
17
17
|
spec.homepage = "https://github.com/cbroult/erb-processor"
|
|
18
18
|
spec.license = "MIT"
|
|
19
|
-
spec.required_ruby_version = ">=
|
|
19
|
+
spec.required_ruby_version = ">= 3.3.7"
|
|
20
20
|
|
|
21
21
|
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
22
22
|
spec.metadata["homepage_uri"] = spec.homepage
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: erb-processor
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.18
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Christophe Broult
|
|
@@ -36,8 +36,8 @@ extra_rdoc_files: []
|
|
|
36
36
|
files:
|
|
37
37
|
- ".rspec"
|
|
38
38
|
- ".rubocop.yml"
|
|
39
|
-
- ".ruby-version"
|
|
40
39
|
- CHANGELOG.md
|
|
40
|
+
- CLAUDE.md
|
|
41
41
|
- CODE_OF_CONDUCT.md
|
|
42
42
|
- Gemfile
|
|
43
43
|
- Gemfile.lock
|
|
@@ -73,7 +73,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
73
73
|
requirements:
|
|
74
74
|
- - ">="
|
|
75
75
|
- !ruby/object:Gem::Version
|
|
76
|
-
version: 3.
|
|
76
|
+
version: 3.3.7
|
|
77
77
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
78
78
|
requirements:
|
|
79
79
|
- - ">="
|
data/.ruby-version
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
3.4.8
|