phlex 0.5.0 → 0.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6db4c22ebfaa77371b1d2bc5faaa48bc93056c3c57e2233fc19a9191850f52f9
4
- data.tar.gz: b6fc151034426d7ccede55fdd2c73a1244fdf47c440cdb9c59850853cc2cec30
3
+ metadata.gz: 46be4f70dd0d46a2cb9302ded83313b24530b33cd6c89346ffb5e7400a442285
4
+ data.tar.gz: 5d271c2096a6951e40f30a3725bdf82adeb5c2320f004d958cbe85383b1174dd
5
5
  SHA512:
6
- metadata.gz: 888e31c18af9de0230970228e1ab20aab4d08d6b2236187ec06fbe2690813032c3af1e9a675bc737016c3c51f3c522be9a4e87bf868882778ff02482ca4c742f
7
- data.tar.gz: 6a999b53c9e54a1159ee0ce34e135d3e5f4c3e73a6207f3d5dbec4f208387c165a83e66cc39f26d582d8ff5fe1d32bb7667b3cfae33a3b16d8a69179dcab4131
6
+ metadata.gz: 6aaad7ca0699dc4e8db3d2f29c902c172c3b0e44d8c7f07d54887dc0661fc6d44323313ec80eddfe1f3129e7ab544f40bc030356319fad9157c95172d4cf5a47
7
+ data.tar.gz: 7beb52b1b9c243e368a6094a5b16cadeadde32f3ed9277ed610a5c6d31d965038a1056739c185441402be96b4647a7943fc0492d0aad36240688a0d2b6683c23
data/Gemfile CHANGED
@@ -29,7 +29,7 @@ group :docs do
29
29
  gem "filewatcher"
30
30
  gem "htmlbeautifier"
31
31
  gem "redcarpet"
32
- gem "commonmarker", "~> 0.23"
32
+ gem "markly"
33
33
  gem "webrick"
34
34
  gem "rouge"
35
35
  gem "kramdown"
@@ -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. The easiest way to do this is to run `bundle add phlex`.
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
- Once that's finished, you'll want to run the setup script: `bin/rails phlex:install`.
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
 
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "commonmarker"
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
- CommonMarker.render_doc(@content)
18
+ Markly.parse(@content)
19
19
  end
20
20
 
21
21
  def visit(node)
@@ -5,13 +5,13 @@ module Phlex
5
5
  class Stream < Phlex::HTML
6
6
  register_element :turbo_stream
7
7
 
8
- def initialize(action:, target:)
8
+ def initialize(action:, **attributes)
9
9
  @action = action
10
- @target = target
10
+ @attributes = attributes
11
11
  end
12
12
 
13
13
  def template(&content)
14
- turbo_stream(action: @action, target: @target, &content)
14
+ turbo_stream(action: @action, **@attributes, &content)
15
15
  end
16
16
  end
17
17
  end
data/lib/phlex/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Phlex
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
data/lib/phlex.rb CHANGED
@@ -10,6 +10,7 @@ module Phlex
10
10
  loader.ignore("#{__dir__}/install")
11
11
 
12
12
  loader.ignore("#{__dir__}/phlex/testing")
13
+ loader.ignore("#{__dir__}/phlex/markdown")
13
14
 
14
15
  loader.ignore("#{__dir__}/phlex/rails.rb")
15
16
  loader.ignore("#{__dir__}/phlex/rails")
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.0
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-15 00:00:00.000000000 Z
11
+ date: 2022-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hescape