erb-processor 1.0.17 → 1.0.19
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 +31 -13
- 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: 4117f512adf4fe4e2f546dcbfdcf47199f9948c9e3ade48a534e6252cf0d0f30
|
|
4
|
+
data.tar.gz: d452ae1827f45b5960d82bad0b283ee4a7c440d6abc58c1084e28e457cb79e13
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 814bcc1a4da84c74dfc8158735916c0838b9e44ff1b2654d0082ef01f85c3da93afd1e957ef5ae5d5cc0c144481fffecbec4dab4e57066e763697bec8a63db57
|
|
7
|
+
data.tar.gz: 95b181cfc9f8fbb4227b0d5a24eee98e8a113548b17118b945405fd96a2066b66f9b53eec9d7a8e9c89cdae72e8934e3a203ca3700d96da259c52f5a60bc26e1
|
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.19)
|
|
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,43 +59,42 @@ 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)
|
|
74
|
-
|
|
76
|
+
erb (6.0.1-java)
|
|
77
|
+
faraday (1.8.0)
|
|
75
78
|
faraday-em_http (~> 1.0)
|
|
76
79
|
faraday-em_synchrony (~> 1.0)
|
|
77
80
|
faraday-excon (~> 1.1)
|
|
78
|
-
faraday-httpclient (~> 1.0)
|
|
79
|
-
faraday-multipart (~> 1.0)
|
|
81
|
+
faraday-httpclient (~> 1.0.1)
|
|
80
82
|
faraday-net_http (~> 1.0)
|
|
81
|
-
faraday-net_http_persistent (~> 1.
|
|
83
|
+
faraday-net_http_persistent (~> 1.1)
|
|
82
84
|
faraday-patron (~> 1.0)
|
|
83
85
|
faraday-rack (~> 1.0)
|
|
84
|
-
|
|
86
|
+
multipart-post (>= 1.2, < 3)
|
|
85
87
|
ruby2_keywords (>= 0.0.4)
|
|
86
88
|
faraday-em_http (1.0.0)
|
|
87
89
|
faraday-em_synchrony (1.0.1)
|
|
88
90
|
faraday-excon (1.1.0)
|
|
89
91
|
faraday-httpclient (1.0.1)
|
|
90
|
-
faraday-multipart (1.2.0)
|
|
91
|
-
multipart-post (~> 2.0)
|
|
92
92
|
faraday-net_http (1.0.2)
|
|
93
93
|
faraday-net_http_persistent (1.2.0)
|
|
94
94
|
faraday-patron (1.0.0)
|
|
95
95
|
faraday-rack (1.0.0)
|
|
96
|
-
faraday-retry (1.0.3)
|
|
97
96
|
ffi (1.17.3)
|
|
97
|
+
ffi (1.17.3-java)
|
|
98
98
|
ffi (1.17.3-x86_64-linux-gnu)
|
|
99
99
|
formatador (1.2.3)
|
|
100
100
|
reline
|
|
@@ -146,7 +146,10 @@ GEM
|
|
|
146
146
|
i18n (1.14.8)
|
|
147
147
|
concurrent-ruby (~> 1.0)
|
|
148
148
|
io-console (0.8.2)
|
|
149
|
+
io-console (0.8.2-java)
|
|
150
|
+
jar-dependencies (0.5.5)
|
|
149
151
|
json (2.18.0)
|
|
152
|
+
json (2.18.0-java)
|
|
150
153
|
juwelier (2.4.9)
|
|
151
154
|
builder
|
|
152
155
|
bundler
|
|
@@ -190,6 +193,8 @@ GEM
|
|
|
190
193
|
nokogiri (1.19.0)
|
|
191
194
|
mini_portile2 (~> 2.8.2)
|
|
192
195
|
racc (~> 1.4)
|
|
196
|
+
nokogiri (1.19.0-java)
|
|
197
|
+
racc (~> 1.4)
|
|
193
198
|
nokogiri (1.19.0-x86_64-linux-gnu)
|
|
194
199
|
racc (~> 1.4)
|
|
195
200
|
notiffany (0.1.3)
|
|
@@ -212,11 +217,20 @@ GEM
|
|
|
212
217
|
coderay (~> 1.1)
|
|
213
218
|
method_source (~> 1.0)
|
|
214
219
|
reline (>= 0.6.0)
|
|
220
|
+
pry (0.16.0-java)
|
|
221
|
+
coderay (~> 1.1)
|
|
222
|
+
method_source (~> 1.0)
|
|
223
|
+
reline (>= 0.6.0)
|
|
224
|
+
spoon (~> 0.0)
|
|
215
225
|
psych (5.3.1)
|
|
216
226
|
date
|
|
217
227
|
stringio
|
|
228
|
+
psych (5.3.1-java)
|
|
229
|
+
date
|
|
230
|
+
jar-dependencies (>= 0.1.7)
|
|
218
231
|
public_suffix (7.0.2)
|
|
219
232
|
racc (1.8.1)
|
|
233
|
+
racc (1.8.1-java)
|
|
220
234
|
rack (3.2.4)
|
|
221
235
|
rainbow (3.1.1)
|
|
222
236
|
rake (13.3.1)
|
|
@@ -302,6 +316,8 @@ GEM
|
|
|
302
316
|
simplecov-html (0.13.2)
|
|
303
317
|
simplecov_json_formatter (0.1.4)
|
|
304
318
|
sorcerer (2.0.1)
|
|
319
|
+
spoon (0.0.6)
|
|
320
|
+
ffi
|
|
305
321
|
stringio (3.2.0)
|
|
306
322
|
sys-uname (1.4.1)
|
|
307
323
|
ffi (~> 1.1)
|
|
@@ -310,6 +326,7 @@ GEM
|
|
|
310
326
|
logger
|
|
311
327
|
thor (1.5.0)
|
|
312
328
|
thread_safe (0.3.6)
|
|
329
|
+
thread_safe (0.3.6-java)
|
|
313
330
|
track_open_instances (0.1.15)
|
|
314
331
|
tsort (0.2.0)
|
|
315
332
|
tzinfo (2.0.6)
|
|
@@ -321,6 +338,7 @@ GEM
|
|
|
321
338
|
yard (0.9.38)
|
|
322
339
|
|
|
323
340
|
PLATFORMS
|
|
341
|
+
universal-java-21
|
|
324
342
|
x64-unknown
|
|
325
343
|
x86_64-linux
|
|
326
344
|
|
|
@@ -357,4 +375,4 @@ DEPENDENCIES
|
|
|
357
375
|
syslog
|
|
358
376
|
|
|
359
377
|
BUNDLED WITH
|
|
360
|
-
4.0.
|
|
378
|
+
4.0.4
|
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.19
|
|
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
|