phlex 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
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/generators/phlex/view/view_generator.rb +1 -1
- 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: d1963e4672b4434ef044665281037002385c31fbb8ac685d1726142f1639058f
|
4
|
+
data.tar.gz: 0ee1545f37c63e1fee9c52ba8a0bbbb9d36bc115f531ca1fcb7ca453c8ebe80d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c43e0ea3c3cbeebf1f8db41ecb108c217265d7dad4fa2feca4b735e09885606c4e0653467a237c4c3a1dc758af55e31cc11a0443af9b5bf319b01a30ae0728a9
|
7
|
+
data.tar.gz: f735047df1f5b0a95bc648f2d78d32b8cc0d254b25f7cac4f966eb5ac28d78befacff005aa5297a5251e781718a7c5859bc8816d4ed5f799d715f0e59bba9e85
|
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.2
|
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
|