orb_template 0.2.2 → 0.2.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
- data/CHANGELOG.md +10 -0
- data/Makefile +12 -7
- data/Rakefile +7 -1
- data/lib/orb/patterns.rb +1 -1
- data/lib/orb/rails_template.rb +8 -0
- data/lib/orb/token.rb +1 -1
- data/lib/orb/version.rb +1 -1
- data/lib/orb_template.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 23c24b347e9567c5486af79f8e618ce7f73346df80292cfe40df8c7c29bc22dc
|
|
4
|
+
data.tar.gz: 8a642e363fcb8346384f4de01aa265bc0edee90525d7ae3a73e49e5b9e3eb9b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7535ad115f4e7a58983d62be79f45d4250e8b872846765b1c14435c16bd0f1e1dc92d9bbeeec01b8cf2e7ae454a920c5868128773335a1c12da5299f2aa3b31a
|
|
7
|
+
data.tar.gz: f70d38d3a11826385665c6380d13727185557dd6769b556bb0707f642724fe61190c73c08d8a2ebc21a5987763d20f6f341159936642b9d892906438d8dd4cfb
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,15 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [0.2.3] - 2026-03-22
|
|
4
|
+
|
|
5
|
+
### Fixed
|
|
6
|
+
|
|
7
|
+
- Eliminated void-context warnings caused by Temple's `AttributeRemover` captures — added `CaptureBuffer` generator that returns `nil` from `return_buffer` instead of emitting a bare variable name
|
|
8
|
+
|
|
9
|
+
### Changed
|
|
10
|
+
|
|
11
|
+
- Benchmark tests are now excluded from the default `rake test` task and run separately via `rake benchmark`
|
|
12
|
+
|
|
3
13
|
## [0.2.2] - 2026-03-13
|
|
4
14
|
|
|
5
15
|
### Fixed
|
data/Makefile
CHANGED
|
@@ -1,14 +1,18 @@
|
|
|
1
1
|
# Makefile for ORB Ruby Gem
|
|
2
2
|
|
|
3
|
-
.PHONY: all test build clean install lint spec help
|
|
3
|
+
.PHONY: all test build clean install lint spec benchmark help
|
|
4
4
|
|
|
5
5
|
# Default target
|
|
6
6
|
all: test build
|
|
7
7
|
|
|
8
|
-
# Run test suite
|
|
8
|
+
# Run test suite (excludes benchmarks)
|
|
9
9
|
spec:
|
|
10
10
|
bundle exec rake test
|
|
11
11
|
|
|
12
|
+
# Run benchmark suite
|
|
13
|
+
benchmark:
|
|
14
|
+
bundle exec rake benchmark
|
|
15
|
+
|
|
12
16
|
# Build the gem
|
|
13
17
|
build:
|
|
14
18
|
gem build orb_template.gemspec
|
|
@@ -29,8 +33,8 @@ install: build
|
|
|
29
33
|
lint:
|
|
30
34
|
bundle exec rubocop
|
|
31
35
|
|
|
32
|
-
# Run
|
|
33
|
-
test: spec lint
|
|
36
|
+
# Run specs, linting, and benchmarks
|
|
37
|
+
test: spec lint benchmark
|
|
34
38
|
|
|
35
39
|
# Show help
|
|
36
40
|
help:
|
|
@@ -40,6 +44,7 @@ help:
|
|
|
40
44
|
@echo " build - Build the gem package"
|
|
41
45
|
@echo " install - Build and install the gem locally"
|
|
42
46
|
@echo " clean - Remove built gem files"
|
|
43
|
-
@echo " spec
|
|
44
|
-
@echo "
|
|
45
|
-
@echo "
|
|
47
|
+
@echo " spec - Run the test suite (excludes benchmarks)"
|
|
48
|
+
@echo " benchmark - Run the benchmark suite"
|
|
49
|
+
@echo " lint - Run RuboCop linting"
|
|
50
|
+
@echo " help - Show this help message"
|
data/Rakefile
CHANGED
|
@@ -9,7 +9,13 @@ RuboCop::RakeTask.new
|
|
|
9
9
|
Rake::TestTask.new(:test) do |t|
|
|
10
10
|
t.libs << "test"
|
|
11
11
|
t.libs << "lib"
|
|
12
|
-
t.test_files = FileList['test/**/*_test.rb']
|
|
12
|
+
t.test_files = FileList['test/**/*_test.rb'].exclude('test/benchmark_test.rb')
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
Rake::TestTask.new(:benchmark) do |t|
|
|
16
|
+
t.libs << "test"
|
|
17
|
+
t.libs << "lib"
|
|
18
|
+
t.test_files = FileList['test/benchmark_test.rb']
|
|
13
19
|
end
|
|
14
20
|
|
|
15
21
|
task default: %i[rubocop test]
|
data/lib/orb/patterns.rb
CHANGED
|
@@ -4,7 +4,7 @@ module ORB
|
|
|
4
4
|
module Patterns
|
|
5
5
|
SPACE_CHARS = /\s/
|
|
6
6
|
TAG_NAME = %r{[^\s>/=$]+}
|
|
7
|
-
ATTRIBUTE_NAME = /[a-zA-Z_
|
|
7
|
+
ATTRIBUTE_NAME = /[a-zA-Z_:@][-a-zA-Z0-9_:.]*/
|
|
8
8
|
UNQUOTED_VALUE_INVALID_CHARS = /["'=<`]/
|
|
9
9
|
UNQUOTED_VALUE = %r{[^\s/>]+}
|
|
10
10
|
BLOCK_NAME_CHARS = /[^\s}]+/
|
data/lib/orb/rails_template.rb
CHANGED
|
@@ -3,11 +3,19 @@
|
|
|
3
3
|
module ORB
|
|
4
4
|
class RailsTemplate
|
|
5
5
|
require 'orb/utils/orb'
|
|
6
|
+
|
|
7
|
+
class CaptureBuffer < ::Temple::Generators::RailsOutputBuffer
|
|
8
|
+
def return_buffer
|
|
9
|
+
nil
|
|
10
|
+
end
|
|
11
|
+
end
|
|
12
|
+
|
|
6
13
|
# Compatible with: https://github.com/judofyr/temple/blob/v0.7.7/lib/temple/mixins/options.rb#L15-L24
|
|
7
14
|
class << self
|
|
8
15
|
def options
|
|
9
16
|
@options ||= {
|
|
10
17
|
generator: ::Temple::Generators::RailsOutputBuffer,
|
|
18
|
+
capture_generator: CaptureBuffer,
|
|
11
19
|
use_html_safe: true,
|
|
12
20
|
streaming: true,
|
|
13
21
|
buffer_class: 'ActionView::OutputBuffer',
|
data/lib/orb/token.rb
CHANGED
data/lib/orb/version.rb
CHANGED
data/lib/orb_template.rb
CHANGED