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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6db4c22ebfaa77371b1d2bc5faaa48bc93056c3c57e2233fc19a9191850f52f9
4
- data.tar.gz: b6fc151034426d7ccede55fdd2c73a1244fdf47c440cdb9c59850853cc2cec30
3
+ metadata.gz: d1963e4672b4434ef044665281037002385c31fbb8ac685d1726142f1639058f
4
+ data.tar.gz: 0ee1545f37c63e1fee9c52ba8a0bbbb9d36bc115f531ca1fcb7ca453c8ebe80d
5
5
  SHA512:
6
- metadata.gz: 888e31c18af9de0230970228e1ab20aab4d08d6b2236187ec06fbe2690813032c3af1e9a675bc737016c3c51f3c522be9a4e87bf868882778ff02482ca4c742f
7
- data.tar.gz: 6a999b53c9e54a1159ee0ce34e135d3e5f4c3e73a6207f3d5dbec4f208387c165a83e66cc39f26d582d8ff5fe1d32bb7667b3cfae33a3b16d8a69179dcab4131
6
+ metadata.gz: c43e0ea3c3cbeebf1f8db41ecb108c217265d7dad4fa2feca4b735e09885606c4e0653467a237c4c3a1dc758af55e31cc11a0443af9b5bf319b01a30ae0728a9
7
+ data.tar.gz: f735047df1f5b0a95bc648f2d78d32b8cc0d254b25f7cac4f966eb5ac28d78befacff005aa5297a5251e781718a7c5859bc8816d4ed5f799d715f0e59bba9e85
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
 
@@ -14,7 +14,7 @@ module Phlex
14
14
  private
15
15
 
16
16
  def layout
17
- Rails.root.join("app/views/layout.rb").exist?
17
+ ::Rails.root.join("app/views/layout.rb").exist?
18
18
  end
19
19
  end
20
20
  end
@@ -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.2"
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.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-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