serbea 2.1.0 → 2.3.0
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/ci.yml +1 -1
- data/.ruby-version +1 -1
- data/CHANGELOG.md +9 -0
- data/README.md +1 -1
- data/bin/rake +27 -0
- data/lib/serbea/pipeline.rb +20 -0
- data/lib/version.rb +1 -1
- data/serbea.gemspec +4 -4
- metadata +16 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8aebfee6e539271599cc9d84ec8c5220a13cd7746c82b687d257fc431b60fb5c
|
4
|
+
data.tar.gz: c61b07f0c4402f067e354fa652cd32eaec060768bcfdf0228ca2d208d7402c77
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7a3372bddc2a463c1d3dd631ff3777ae60671bb2a20463a7fea9db3da8fb5a2b28cd5338fb251c454358ff33ddf58f7fe6e40ce5c4e320e6df2c042000463ae9
|
7
|
+
data.tar.gz: 8cf230f8b0aa7fafb00c73ca80ff4805952ce6b3aa3cb3a7a781d8a1621bb7b1299ced2d30aa03dda2604e350fba7a6109861be90267f3c579a9d9bd8a3bd5c7
|
data/.github/workflows/ci.yml
CHANGED
@@ -13,7 +13,7 @@ jobs:
|
|
13
13
|
runs-on: ubuntu-latest
|
14
14
|
strategy:
|
15
15
|
matrix:
|
16
|
-
ruby_version: [
|
16
|
+
ruby_version: [3.1.0, 3.2.0, 3.3.0]
|
17
17
|
continue-on-error: ${{ endsWith(matrix.ruby, 'head') || matrix.ruby == 'debug' }}
|
18
18
|
# Has to be top level to cache properly
|
19
19
|
env:
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
ruby-3.1.4
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 2.3.0
|
4
|
+
|
5
|
+
- Migrate repo to Codeberg
|
6
|
+
|
7
|
+
## 2.2.0
|
8
|
+
|
9
|
+
- Add functionality to purge certain `Object`-based method pollution which interferes with the workings of Serbea's `Pipeline` in pure Ruby.
|
10
|
+
- Ruby 3.1 is now the minimum required version.
|
11
|
+
|
3
12
|
## 2.1.0
|
4
13
|
|
5
14
|
- Remove Active Support as a dependency
|
data/README.md
CHANGED
@@ -13,7 +13,7 @@ Serbea combines the best ideas from “brace-style” template languages such as
|
|
13
13
|
|
14
14
|
## Contributing
|
15
15
|
|
16
|
-
1. Fork it (https://
|
16
|
+
1. Fork it (https://codeberg.org/jaredwhite/serbea/fork)
|
17
17
|
2. Create your feature branch (`git checkout -b my-new-feature`)
|
18
18
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
19
19
|
4. Push to the branch (`git push origin my-new-feature`)
|
data/bin/rake
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
3
|
+
|
4
|
+
#
|
5
|
+
# This file was generated by Bundler.
|
6
|
+
#
|
7
|
+
# The application 'rake' is installed as part of a gem, and
|
8
|
+
# this file is here to facilitate running it.
|
9
|
+
#
|
10
|
+
|
11
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../Gemfile", __dir__)
|
12
|
+
|
13
|
+
bundle_binstub = File.expand_path("bundle", __dir__)
|
14
|
+
|
15
|
+
if File.file?(bundle_binstub)
|
16
|
+
if File.read(bundle_binstub, 300).include?("This file was generated by Bundler")
|
17
|
+
load(bundle_binstub)
|
18
|
+
else
|
19
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
20
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
require "rubygems"
|
25
|
+
require "bundler/setup"
|
26
|
+
|
27
|
+
load Gem.bin_path("rake", "rake")
|
data/lib/serbea/pipeline.rb
CHANGED
@@ -72,7 +72,27 @@ module Serbea
|
|
72
72
|
@value_methods_denylist ||= Set.new
|
73
73
|
end
|
74
74
|
|
75
|
+
def self.purge_class_pollution
|
76
|
+
@pollution_purged ||= begin
|
77
|
+
polluted_methods_list.each do |name|
|
78
|
+
define_method name do |*args, **kwargs|
|
79
|
+
filter(name, *args, **kwargs)
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
true
|
84
|
+
end
|
85
|
+
end
|
86
|
+
|
87
|
+
def self.polluted_method(name)
|
88
|
+
polluted_methods_list.merge Array(name)
|
89
|
+
end
|
90
|
+
def self.polluted_methods_list
|
91
|
+
@polluted_methods_list ||= Set.new(%i(select to_json))
|
92
|
+
end
|
93
|
+
|
75
94
|
def initialize(binding, value)
|
95
|
+
self.class.purge_class_pollution
|
76
96
|
@binding = binding
|
77
97
|
@context = binding.receiver
|
78
98
|
@value = value
|
data/lib/version.rb
CHANGED
data/serbea.gemspec
CHANGED
@@ -8,16 +8,16 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.author = "Bridgetown Team"
|
9
9
|
spec.email = "maintainers@bridgetownrb.com"
|
10
10
|
spec.summary = "Similar to ERB, Except Awesomer"
|
11
|
-
spec.homepage = "https://
|
11
|
+
spec.homepage = "https://codeberg.org/jaredwhite/serbea"
|
12
12
|
spec.license = "MIT"
|
13
13
|
|
14
|
-
spec.required_ruby_version = ">=
|
14
|
+
spec.required_ruby_version = ">= 3.1"
|
15
15
|
|
16
16
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|docs|serbea-rails)/!) }
|
17
17
|
spec.require_paths = ["lib"]
|
18
18
|
|
19
|
-
spec.add_runtime_dependency("erubi", ">= 1.
|
20
|
-
spec.add_runtime_dependency("tilt", "
|
19
|
+
spec.add_runtime_dependency("erubi", ">= 1.11")
|
20
|
+
spec.add_runtime_dependency("tilt", ">= 2.1")
|
21
21
|
|
22
22
|
spec.add_development_dependency("rake", "~> 13.0")
|
23
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serbea
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: erubi
|
@@ -16,28 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
19
|
+
version: '1.11'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1.
|
26
|
+
version: '1.11'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: tilt
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '2.
|
33
|
+
version: '2.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '2.
|
40
|
+
version: '2.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,7 +52,7 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '13.0'
|
55
|
-
description:
|
55
|
+
description:
|
56
56
|
email: maintainers@bridgetownrb.com
|
57
57
|
executables: []
|
58
58
|
extensions: []
|
@@ -66,6 +66,7 @@ files:
|
|
66
66
|
- LICENSE.txt
|
67
67
|
- README.md
|
68
68
|
- Rakefile
|
69
|
+
- bin/rake
|
69
70
|
- lib/rouge/lexers/serbea.rb
|
70
71
|
- lib/serbea.rb
|
71
72
|
- lib/serbea/helpers.rb
|
@@ -73,11 +74,11 @@ files:
|
|
73
74
|
- lib/serbea/template_engine.rb
|
74
75
|
- lib/version.rb
|
75
76
|
- serbea.gemspec
|
76
|
-
homepage: https://
|
77
|
+
homepage: https://codeberg.org/jaredwhite/serbea
|
77
78
|
licenses:
|
78
79
|
- MIT
|
79
80
|
metadata: {}
|
80
|
-
post_install_message:
|
81
|
+
post_install_message:
|
81
82
|
rdoc_options: []
|
82
83
|
require_paths:
|
83
84
|
- lib
|
@@ -85,15 +86,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
86
|
requirements:
|
86
87
|
- - ">="
|
87
88
|
- !ruby/object:Gem::Version
|
88
|
-
version: '
|
89
|
+
version: '3.1'
|
89
90
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
91
|
requirements:
|
91
92
|
- - ">="
|
92
93
|
- !ruby/object:Gem::Version
|
93
94
|
version: '0'
|
94
95
|
requirements: []
|
95
|
-
rubygems_version: 3.
|
96
|
-
signing_key:
|
96
|
+
rubygems_version: 3.3.26
|
97
|
+
signing_key:
|
97
98
|
specification_version: 4
|
98
99
|
summary: Similar to ERB, Except Awesomer
|
99
100
|
test_files: []
|