phlex-rails 0.3.0 → 0.3.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a3e59108c4a90e8c202407fd7a154b9548060da6f3f561360ea8ed6b43b3f66b
4
- data.tar.gz: 18b8485b72c7a435045033d8fa630c29a5fb79bb668432e45ecccf44372e807a
3
+ metadata.gz: 20f58024a0e5af353aacd2343075de6fbde5b7dd1209ba825c29e752e958987d
4
+ data.tar.gz: 5d800097df0cf47570297c6292119b6d38fa6e0d47b48844742b3292a794374d
5
5
  SHA512:
6
- metadata.gz: 2a23afd4cc366ad642d2eb8c3aaefcb9cdc4913a886439aefbfb729ff3afc547096fbd455a34b9f7f569edbf7e7708c36880b8ca1bd0a6965161e424a4ab9adf
7
- data.tar.gz: de2e90c2da14ca3aa70dc0e265b8a3449a2cb6f25eb58e6fcadc37c2b88420ebcc61269553482bf487b2ccc3c946cfc1409c78ad5ed82dd6f7f5f0cc8a69ca93
6
+ metadata.gz: ce4d38e74e324e60e499e911687d3766e4b45f2cad06936e863ede7e7cbad09d8fa6436f513108cb1b2b44a75356c29260c543c9d76ce7d7d8b0340ec467c157
7
+ data.tar.gz: 3c1d9be8acc7ed0627c44efd1bbbf18a7f2e087f63b9b499b9194359a00fa4c88ab4e5e730ae71cfe5b5d3a38e48a159a580affe0d78dc1c5c6b1abc2d2caa6c
data/Gemfile CHANGED
@@ -5,7 +5,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
5
5
 
6
6
  gemspec
7
7
 
8
- gem "phlex", github: "joeldrapper/phlex"
8
+ gem "phlex", github: "joeldrapper/phlex", branch: "main"
9
9
  gem "sus"
10
10
  gem "combustion"
11
11
  gem "rubocop"
data/config/sus.rb ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "phlex/rails"
4
+
5
+ Zeitwerk::Loader.eager_load_all
@@ -92,6 +92,30 @@ module Phlex
92
92
  end
93
93
  end
94
94
 
95
+ module ImageTag
96
+ def image_tag(*args)
97
+ if (output = @_view_context.image_tag(*args))
98
+ @_target << output
99
+ end
100
+ end
101
+ end
102
+
103
+ module AudioTag
104
+ def audio_tag(*args)
105
+ if (output = @_view_context.audio_tag(*args))
106
+ @_target << output
107
+ end
108
+ end
109
+ end
110
+
111
+ module VideoTag
112
+ def video_tag(*args)
113
+ if (output = @_view_context.video_tag(*args))
114
+ @_target << output
115
+ end
116
+ end
117
+ end
118
+
95
119
  module PreloadLinkTag
96
120
  def preload_link_tag(*args)
97
121
  if (output = @_view_context.preload_link_tag(*args))
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Phlex
4
4
  module Rails
5
- VERSION = "0.3.0"
5
+ VERSION = "0.3.2"
6
6
  end
7
7
  end
data/lib/phlex/rails.rb CHANGED
@@ -4,10 +4,11 @@ require "phlex"
4
4
  require "phlex/rails/engine"
5
5
 
6
6
  module Phlex::Rails
7
- Loader = Zeitwerk::Loader.for_gem(warn_on_extra_files: false).tap do |loader|
7
+ Loader = Zeitwerk::Loader.new.tap do |loader|
8
8
  loader.push_dir("#{__dir__}/rails", namespace: Phlex::Rails)
9
+ loader.inflector = Zeitwerk::GemInflector.new(__FILE__)
9
10
  loader.setup
10
11
  end
11
12
 
12
- Phlex::HTML.include(Phlex::Rails::Renderable)
13
+ Phlex::HTML.prepend(Phlex::Rails::Renderable)
13
14
  end
@@ -5,7 +5,7 @@ require "phlex/testing/view_helper"
5
5
  module Phlex::Testing
6
6
  module Rails
7
7
  module ViewHelper
8
- include Phlex::Testing::ViewHelper
8
+ include ::Phlex::Testing::ViewHelper
9
9
 
10
10
  def view_context
11
11
  controller.view_context
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phlex-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.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-25 00:00:00.000000000 Z
11
+ date: 2022-12-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: phlex
@@ -80,6 +80,7 @@ files:
80
80
  - LICENSE.txt
81
81
  - README.md
82
82
  - SECURITY.md
83
+ - config/sus.rb
83
84
  - fixtures/dummy/app/assets/config/manifest.js
84
85
  - fixtures/dummy/app/components/comment_component.html.erb
85
86
  - fixtures/dummy/app/components/comment_component.rb
@@ -138,7 +139,7 @@ files:
138
139
  - lib/phlex/rails/output_buffer.rb
139
140
  - lib/phlex/rails/renderable.rb
140
141
  - lib/phlex/rails/version.rb
141
- - lib/phlex/testing/rails.rb
142
+ - lib/phlex/testing/rails/view_helper.rb
142
143
  - lib/tasks/phlex_tasks.rake
143
144
  - phlex_logo.png
144
145
  homepage: https://www.phlex.fun