rblade 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80db67de9379396f85ba9450898e55f81b563cb1ca1ace73080719ad555455da
4
- data.tar.gz: 9cc81c55f3893fbe1628dbe29c0d1dae16bdd65a789451e7f79ca6221e857488
3
+ metadata.gz: 17ad9a35983e35fb1f6e34e57372546913afa14ec6c5d1e4fefee0860dc384ab
4
+ data.tar.gz: 5d58650e854920e85ea6d6d4df78337495afd842388e194f163c8383144b248d
5
5
  SHA512:
6
- metadata.gz: 50092cc06cf7104210d23a47044f9ce7de728812e2c561120d59434480f6fb7cc5ca4e1ef299d3a7bf7368af45ffe8b113299c744eb14679e9a2572d4923610c
7
- data.tar.gz: fa8797d09d7621f8122b8460c634e94e6db39ae6940a909e516ee20ef7d2ef1ab9963c2f549aff2a0a002a76899fc79fd5ff8e9b2bceb862364417c3a01af05f
6
+ metadata.gz: 5b7c6a166b2d049859f77f2c396b85e874bdd14d68cb587128cae5131f718637034855cadeb7bf6bef191546982b2a565f80b0745d1266c0fbd5abac7b9fa054
7
+ data.tar.gz: 0c88c2750047aae8885e88e740f40b16c4797f1590fdf96514d63ed2a9f60291d8868376a9ee8a2894ecfc55edb7c1506a7a7e403c5f4a87f2673aa4e9f9f0b7
@@ -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,7 @@
1
+ ## 1.0.3 [2024-08-10]
2
+ - Add GitHub CI
3
+ - Add support for the Rails `raw` method for outputting unescaped HTML
4
+
1
5
  ## 1.0.2 [2024-08-09]
2
6
  - Fix non-string `@props` defaults being converted to slots
3
7
 
data/Rakefile CHANGED
@@ -3,4 +3,4 @@ require "standard/rake"
3
3
 
4
4
  Minitest::TestTask.create
5
5
 
6
- task default: "test"
6
+ task default: ["standard", "test"]
@@ -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? HtmlString
25
+ if string.is_a?(HtmlString) || string.is_a?(ActiveSupport::SafeBuffer)
25
26
  string
26
27
  else
27
28
  h(string)
@@ -1,5 +1,3 @@
1
- require "rblade/compiler"
2
-
3
1
  module RBlade
4
2
  FILE_EXTENSIONS = [".rblade", ".html.rblade"]
5
3
 
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.2"
3
+ s.version = "1.0.3"
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 = { "source_code_uri" => "https://github.com/mwnciau/rblade" }
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.2
4
+ version: 1.0.3
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-09 00:00:00.000000000 Z
11
+ date: 2024-08-10 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