phlex 0.5.0 → 0.5.1
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.
Potentially problematic release.
This version of phlex might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/docs/pages/rails/getting_started.rb +6 -2
- data/lib/phlex/markdown.rb +2 -2
- data/lib/phlex/turbo/stream.rb +3 -3
- data/lib/phlex/version.rb +1 -1
- data/lib/phlex.rb +1 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46be4f70dd0d46a2cb9302ded83313b24530b33cd6c89346ffb5e7400a442285
|
4
|
+
data.tar.gz: 5d271c2096a6951e40f30a3725bdf82adeb5c2320f004d958cbe85383b1174dd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6aaad7ca0699dc4e8db3d2f29c902c172c3b0e44d8c7f07d54887dc0661fc6d44323313ec80eddfe1f3129e7ab544f40bc030356319fad9157c95172d4cf5a47
|
7
|
+
data.tar.gz: 7beb52b1b9c243e368a6094a5b16cadeadde32f3ed9277ed610a5c6d31d965038a1056739c185441402be96b4647a7943fc0492d0aad36240688a0d2b6683c23
|
data/Gemfile
CHANGED
@@ -16,9 +16,13 @@ module Pages
|
|
16
16
|
|
17
17
|
## Setup
|
18
18
|
|
19
|
-
If you haven't installed Phlex already, you'll need to add it to your Gemfile.
|
19
|
+
If you haven't installed Phlex already, you'll need to add it to your Gemfile. This is a good place to require `phlex/rails`.
|
20
20
|
|
21
|
-
|
21
|
+
```ruby
|
22
|
+
gem "phlex", require: "phlex/rails"
|
23
|
+
```
|
24
|
+
|
25
|
+
Now run `bundle install`. Once that's finished, you'll want to run the setup script: `bin/rails phlex:install`.
|
22
26
|
|
23
27
|
This script will:
|
24
28
|
|
data/lib/phlex/markdown.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require "
|
3
|
+
require "markly"
|
4
4
|
|
5
5
|
module Phlex
|
6
6
|
class Markdown < Phlex::HTML
|
@@ -15,7 +15,7 @@ module Phlex
|
|
15
15
|
private
|
16
16
|
|
17
17
|
def doc
|
18
|
-
|
18
|
+
Markly.parse(@content)
|
19
19
|
end
|
20
20
|
|
21
21
|
def visit(node)
|
data/lib/phlex/turbo/stream.rb
CHANGED
@@ -5,13 +5,13 @@ module Phlex
|
|
5
5
|
class Stream < Phlex::HTML
|
6
6
|
register_element :turbo_stream
|
7
7
|
|
8
|
-
def initialize(action:,
|
8
|
+
def initialize(action:, **attributes)
|
9
9
|
@action = action
|
10
|
-
@
|
10
|
+
@attributes = attributes
|
11
11
|
end
|
12
12
|
|
13
13
|
def template(&content)
|
14
|
-
turbo_stream(action: @action,
|
14
|
+
turbo_stream(action: @action, **@attributes, &content)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
end
|
data/lib/phlex/version.rb
CHANGED
data/lib/phlex.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: phlex
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Drapper
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hescape
|