phlex-rails 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d79356655cf4e2bc12cd4cdfcca54c1c5e5a22b1ec9990216bb0a447b0049f4e
4
- data.tar.gz: f3649f01f6cb2184a0171fbda687e4bc84293a5bfacfbea6177d187603dece4a
3
+ metadata.gz: 20f58024a0e5af353aacd2343075de6fbde5b7dd1209ba825c29e752e958987d
4
+ data.tar.gz: 5d800097df0cf47570297c6292119b6d38fa6e0d47b48844742b3292a794374d
5
5
  SHA512:
6
- metadata.gz: 3839e661932161404c5442f6a26d8395e8caeef8148b7ae77f4b302fac017271c18836e9bbe2624e7443714793a0669871997fd69b46adf8c0be48b969338ef3
7
- data.tar.gz: 3ca6bc3e0b688591d4fb40e7918fbfd5d6d887ac076bdee1af58c0f4d3343e22f84a61d4d0e5b2390ce23eaedbb7f4dda51394e4b12c23e1536a12e5a822dcb7
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.1"
5
+ VERSION = "0.3.2"
6
6
  end
7
7
  end
data/lib/phlex/rails.rb CHANGED
@@ -4,8 +4,9 @@ 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
 
@@ -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.1
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