streamlined 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +2 -2
- data/lib/roda/plugins/streamlined.rb +27 -0
- data/lib/streamlined/version.rb +1 -1
- data/lib/streamlined.rb +5 -1
- data/streamlined.gemspec +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05f5b1f3f4076db6a1199096cd1da0c78594161b4fadb12bbd5e8777a7d5993f
|
4
|
+
data.tar.gz: 1db72d9247ae8d7d5f1b2c49de47c30c8b7341cc50bac7f434386d9ac8eb5555
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6539b91a92c00001129658a57d139f19672ea07be9ea54a38d1fa04dc2579e7d98d40d439d49a9d24d9a9207228733f03fb8756651fcfefa0e34acc2054d5e42
|
7
|
+
data.tar.gz: 045c5edea6a3f743461ae9fa0a5918867daeb8b59e7ac643576bb3c624a16ed3a1d5e360e1280c8514514c66eff91e01664757b464298912ba7abbf465a43322
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Streamlined
|
2
2
|
|
3
|
-
|
3
|
+
HTML fragment and component rendering for Ruby using streamlined procs & heredocs with safety checks via RuboCop. Bridgetown, Roda, and Rails all supported.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -10,7 +10,7 @@ Add Streamlined to your application's Gemfile by running:
|
|
10
10
|
bundle add streamlined
|
11
11
|
```
|
12
12
|
|
13
|
-
(If you're using Bridgetown, it's bundled in for Bridgetown
|
13
|
+
(If you're using Bridgetown, it's bundled in for Bridgetown 2.0…coming soon)
|
14
14
|
|
15
15
|
## Usage
|
16
16
|
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class Roda
|
4
|
+
module RodaPlugins
|
5
|
+
module Streamlined
|
6
|
+
module CheckForStreamlined
|
7
|
+
def self.===(other)
|
8
|
+
other.is_a?(Proc) && other.respond_to?(:touched) && other.touched
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
module InstanceMethods
|
13
|
+
include ::Streamlined::Helpers
|
14
|
+
end
|
15
|
+
|
16
|
+
def self.load_dependencies(app, _opts = OPTS)
|
17
|
+
app.plugin :custom_block_results
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.configure(app, _opts = OPTS)
|
21
|
+
app.handle_block_result CheckForStreamlined, &:to_s
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
register_plugin :streamlined, Streamlined
|
26
|
+
end
|
27
|
+
end
|
data/lib/streamlined/version.rb
CHANGED
data/lib/streamlined.rb
CHANGED
@@ -4,6 +4,7 @@ require "serbea/helpers" # primarily just for HTML safety polyfill
|
|
4
4
|
require "serbea/pipeline"
|
5
5
|
require "zeitwerk"
|
6
6
|
loader = Zeitwerk::Loader.for_gem
|
7
|
+
loader.ignore("#{__dir__}/roda")
|
7
8
|
loader.setup
|
8
9
|
|
9
10
|
module Streamlined
|
@@ -11,6 +12,9 @@ module Streamlined
|
|
11
12
|
end
|
12
13
|
|
13
14
|
if defined?(Bridgetown)
|
14
|
-
Bridgetown.initializer :streamlined do
|
15
|
+
Bridgetown.initializer :streamlined do |config|
|
16
|
+
config.roda do |app|
|
17
|
+
app.plugin :streamlined
|
18
|
+
end
|
15
19
|
end
|
16
20
|
end
|
data/streamlined.gemspec
CHANGED
@@ -8,10 +8,10 @@ Gem::Specification.new do |spec|
|
|
8
8
|
spec.author = "Bridgetown Team"
|
9
9
|
spec.email = "maintainers@bridgetownrb.com"
|
10
10
|
|
11
|
-
spec.summary = "
|
11
|
+
spec.summary = "HTML fragment & component rendering for Ruby using streamlined procs & heredocs."
|
12
12
|
spec.homepage = "https://github.com/bridgetownrb/streamlined"
|
13
13
|
spec.license = "MIT"
|
14
|
-
spec.required_ruby_version = ">= 3.
|
14
|
+
spec.required_ruby_version = ">= 3.1"
|
15
15
|
spec.metadata["rubygems_mfa_required"] = "true"
|
16
16
|
|
17
17
|
# Specify which files should be added to the gem when it is released.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: streamlined
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bridgetown Team
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2024-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: serbea
|
@@ -57,6 +57,7 @@ files:
|
|
57
57
|
- bin/rake
|
58
58
|
- bin/rubocop
|
59
59
|
- bin/setup
|
60
|
+
- lib/roda/plugins/streamlined.rb
|
60
61
|
- lib/streamlined.rb
|
61
62
|
- lib/streamlined/helpers.rb
|
62
63
|
- lib/streamlined/renderable.rb
|
@@ -75,7 +76,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
75
76
|
requirements:
|
76
77
|
- - ">="
|
77
78
|
- !ruby/object:Gem::Version
|
78
|
-
version: '3.
|
79
|
+
version: '3.1'
|
79
80
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
81
|
requirements:
|
81
82
|
- - ">="
|
@@ -85,5 +86,5 @@ requirements: []
|
|
85
86
|
rubygems_version: 3.3.3
|
86
87
|
signing_key:
|
87
88
|
specification_version: 4
|
88
|
-
summary:
|
89
|
+
summary: HTML fragment & component rendering for Ruby using streamlined procs & heredocs.
|
89
90
|
test_files: []
|