rblade 1.0.2 → 1.0.4
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/.github/workflows/ruby.yml +38 -0
- data/CHANGELOG.md +7 -0
- data/Rakefile +1 -1
- data/lib/rblade/compiler.rb +3 -2
- data/lib/rblade/component_store.rb +0 -2
- data/rblade.gemspec +2 -2
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 9124479cbf9e4fd7355470943bafcbd009c367abf8593d19bc3f8a967eb0e4cf
|
|
4
|
+
data.tar.gz: c0d9f34089ae943df7263298cb9e08951b23b2ebfcbc3a221c4e8a2940ee959c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 78e173dcbdb4e085fd46840597f828e08df016874d8cfecccd756155b254be37924d20c81682373c45146518754e3a079d4b35aa5443b57ce67de9ac10c162ce
|
|
7
|
+
data.tar.gz: e27154636512a2fc28c6f279c13bfcad0ca8639f1d404b73a91803435de93012d43aed89bcdd2aa02a76e59d3c485e7214a93dc710f8d20adabc285c5aae8208
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
|
2
|
+
# They are provided by a third-party and are governed by
|
|
3
|
+
# separate terms of service, privacy policy, and support
|
|
4
|
+
# documentation.
|
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
|
7
|
+
|
|
8
|
+
name: Ruby
|
|
9
|
+
|
|
10
|
+
on:
|
|
11
|
+
push:
|
|
12
|
+
branches: [ "main" ]
|
|
13
|
+
pull_request:
|
|
14
|
+
branches: [ "main" ]
|
|
15
|
+
|
|
16
|
+
permissions:
|
|
17
|
+
contents: read
|
|
18
|
+
|
|
19
|
+
jobs:
|
|
20
|
+
test:
|
|
21
|
+
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
strategy:
|
|
24
|
+
matrix:
|
|
25
|
+
ruby-version: ['3.2']
|
|
26
|
+
|
|
27
|
+
steps:
|
|
28
|
+
- uses: actions/checkout@v4
|
|
29
|
+
- name: Set up Ruby
|
|
30
|
+
# To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
|
|
31
|
+
# change this to (see https://github.com/ruby/setup-ruby#versioning):
|
|
32
|
+
# uses: ruby/setup-ruby@v1
|
|
33
|
+
uses: ruby/setup-ruby@55283cc23133118229fd3f97f9336ee23a179fcf # v1.146.0
|
|
34
|
+
with:
|
|
35
|
+
ruby-version: ${{ matrix.ruby-version }}
|
|
36
|
+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
37
|
+
- name: Run tests
|
|
38
|
+
run: bundle exec rake
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 1.0.4 [2024-08-14]
|
|
2
|
+
- Fix printing ruby member variables (#8)
|
|
3
|
+
|
|
4
|
+
## 1.0.3 [2024-08-10]
|
|
5
|
+
- Add GitHub CI
|
|
6
|
+
- Add support for the Rails `raw` method for outputting unescaped HTML
|
|
7
|
+
|
|
1
8
|
## 1.0.2 [2024-08-09]
|
|
2
9
|
- Fix non-string `@props` defaults being converted to slots
|
|
3
10
|
|
data/Rakefile
CHANGED
data/lib/rblade/compiler.rb
CHANGED
|
@@ -7,6 +7,7 @@ require "rblade/compiler/compiles_statements"
|
|
|
7
7
|
require "rblade/compiler/tokenizes_components"
|
|
8
8
|
require "rblade/compiler/tokenizes_statements"
|
|
9
9
|
require "rblade/helpers/html_string"
|
|
10
|
+
require "active_support/core_ext/string/output_safety"
|
|
10
11
|
|
|
11
12
|
Token = Struct.new(:type, :value)
|
|
12
13
|
|
|
@@ -21,7 +22,7 @@ module RBlade
|
|
|
21
22
|
end
|
|
22
23
|
|
|
23
24
|
def self.e string
|
|
24
|
-
if string.is_a?
|
|
25
|
+
if string.is_a?(HtmlString) || string.is_a?(ActiveSupport::SafeBuffer)
|
|
25
26
|
string
|
|
26
27
|
else
|
|
27
28
|
h(string)
|
|
@@ -36,8 +37,8 @@ module RBlade
|
|
|
36
37
|
CompilesComments.new.compile! tokens
|
|
37
38
|
CompilesRuby.new.compile! tokens
|
|
38
39
|
TokenizesComponents.new.tokenize! tokens
|
|
39
|
-
TokenizesStatements.new.tokenize! tokens
|
|
40
40
|
CompilesPrints.new.compile! tokens
|
|
41
|
+
TokenizesStatements.new.tokenize! tokens
|
|
41
42
|
CompilesStatements.new.compile! tokens
|
|
42
43
|
CompilesComponents.new.compile! tokens
|
|
43
44
|
|
data/rblade.gemspec
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = "rblade"
|
|
3
|
-
s.version = "1.0.
|
|
3
|
+
s.version = "1.0.4"
|
|
4
4
|
s.summary = "A component-first templating engine for Rails"
|
|
5
5
|
s.description = "RBlade is a simple, yet powerful templating engine for Ruby on Rails, inspired by Laravel Blade."
|
|
6
6
|
s.authors = ["Simon J"]
|
|
@@ -8,7 +8,7 @@ Gem::Specification.new do |s|
|
|
|
8
8
|
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|storage)/}) }
|
|
9
9
|
s.require_paths = ["lib"]
|
|
10
10
|
s.homepage = "https://rubygems.org/gems/rblade"
|
|
11
|
-
s.metadata = {
|
|
11
|
+
s.metadata = {"source_code_uri" => "https://github.com/mwnciau/rblade"}
|
|
12
12
|
s.license = "MIT"
|
|
13
13
|
s.required_ruby_version = ">= 3.0.0"
|
|
14
14
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rblade
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Simon J
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2024-08-
|
|
11
|
+
date: 2024-08-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: minitest
|
|
@@ -73,6 +73,7 @@ executables: []
|
|
|
73
73
|
extensions: []
|
|
74
74
|
extra_rdoc_files: []
|
|
75
75
|
files:
|
|
76
|
+
- ".github/workflows/ruby.yml"
|
|
76
77
|
- ".gitignore"
|
|
77
78
|
- ".standard.yml"
|
|
78
79
|
- CHANGELOG.md
|
|
@@ -139,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
139
140
|
- !ruby/object:Gem::Version
|
|
140
141
|
version: '0'
|
|
141
142
|
requirements: []
|
|
142
|
-
rubygems_version: 3.3.
|
|
143
|
+
rubygems_version: 3.0.3.1
|
|
143
144
|
signing_key:
|
|
144
145
|
specification_version: 4
|
|
145
146
|
summary: A component-first templating engine for Rails
|