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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 0231005def8767c0efd2cb24b0efcb03b83b469f4760c5e3fcbaf262344c296e
4
- data.tar.gz: c086ac14ba16300c36f7f0d39f02c426ca4ff568ef61cde48dfa91df3b433391
3
+ metadata.gz: 23c24b347e9567c5486af79f8e618ce7f73346df80292cfe40df8c7c29bc22dc
4
+ data.tar.gz: 8a642e363fcb8346384f4de01aa265bc0edee90525d7ae3a73e49e5b9e3eb9b3
5
5
  SHA512:
6
- metadata.gz: 168996b1d44310ecffbf9ecb8e24b1a550b45b13b8110e80060b164d7175b2ecf623aa2e7d4b9da550378f7fb39f0862b85593844c9e8dff5936344dc376b9eb
7
- data.tar.gz: 826c5078e0941e8874f1c70527b0ee967c900be19d1e520d4768601f5086b1d107b7655ec9d534868aa4e11abb488b5cfce7a2f9cc7b1506561849bca53ab19f
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 both specs and linting
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 - Run the test suite"
44
- @echo " lint - Run RuboCop linting"
45
- @echo " help - Show this help message"
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_:][-a-zA-Z0-9_:.]*/
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}]+/
@@ -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
@@ -20,7 +20,7 @@ module ORB
20
20
  meta.has_key?(method.to_sym)
21
21
  end
22
22
 
23
- def method_missing(method, *args, &block)
23
+ def method_missing(method, *args, &)
24
24
  if meta.has_key?(method.to_sym)
25
25
  meta[method.to_sym]
26
26
  else
data/lib/orb/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ORB
4
- VERSION = "0.2.2"
4
+ VERSION = "0.2.3"
5
5
  end
data/lib/orb_template.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative './orb'
3
+ require_relative 'orb'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: orb_template
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - KUY.io Inc.