phlex-rails 1.2.1 → 2.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/generators/phlex/component/USAGE +2 -2
- data/lib/generators/phlex/component/component_generator.rb +1 -1
- data/lib/generators/phlex/component/templates/component.rb.erb +2 -3
- data/lib/generators/phlex/install/USAGE +3 -1
- data/lib/generators/phlex/install/install_generator.rb +28 -38
- data/lib/generators/phlex/install/templates/base_component.rb.erb +15 -0
- data/lib/generators/phlex/install/templates/base_view.rb.erb +9 -0
- data/lib/generators/phlex/install/templates/phlex.rb.erb +16 -0
- data/lib/generators/phlex/view/USAGE +1 -1
- data/lib/generators/phlex/view/templates/view.rb.erb +2 -3
- data/lib/generators/phlex/view/view_generator.rb +1 -1
- data/lib/phlex/rails/buffered.rb +6 -7
- data/lib/phlex/rails/csv.rb +3 -3
- data/lib/phlex/rails/engine.rb +0 -1
- data/lib/phlex/rails/{html/method_missing.rb → helper_finder.rb} +2 -2
- data/lib/phlex/rails/helper_macros.rb +2 -12
- data/lib/phlex/rails/helpers/notice.rb +8 -0
- data/lib/phlex/rails/helpers/routes.rb +1 -0
- data/lib/phlex/rails/helpers/tag.rb +2 -2
- data/lib/phlex/rails/helpers/translate.rb +2 -2
- data/lib/phlex/rails/helpers/turbo_stream.rb +1 -1
- data/lib/phlex/rails/helpers.rb +11 -56
- data/lib/phlex/rails/html.rb +0 -2
- data/lib/phlex/rails/layout.rb +7 -7
- data/lib/phlex/rails/sgml.rb +35 -53
- data/lib/phlex/rails/streaming.rb +11 -9
- data/lib/phlex/rails/testing.rb +18 -0
- data/lib/phlex/rails/unbuffered.rb +50 -0
- data/lib/phlex/rails/version.rb +1 -1
- data/lib/phlex/rails.rb +6 -7
- metadata +16 -26
- data/.editorconfig +0 -13
- data/.rubocop.yml +0 -15
- data/.ruby-version +0 -1
- data/.yardopts +0 -1
- data/Appraisals +0 -11
- data/CHANGELOG.md +0 -38
- data/CODE_OF_CONDUCT.md +0 -84
- data/Gemfile +0 -17
- data/SECURITY.md +0 -5
- data/config.ru +0 -9
- data/lib/generators/phlex/install/templates/application_component.rb +0 -12
- data/lib/generators/phlex/install/templates/application_layout.rb +0 -24
- data/lib/generators/phlex/install/templates/application_view.rb +0 -9
- data/lib/phlex/rails/unbuffered_overrides.rb +0 -30
- data/lib/phlex/testing/rails/view_helper.rb +0 -19
- data/phlex_logo.png +0 -0
@@ -1,30 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
# @api private
|
4
|
-
module Phlex::Rails::UnbufferedOverrides
|
5
|
-
def method_missing(name, *args, **kwargs, &block)
|
6
|
-
if @object.respond_to?(name)
|
7
|
-
|
8
|
-
__class__.define_method(name) do |*a, **k, &b|
|
9
|
-
@object.capture do
|
10
|
-
if b
|
11
|
-
@object.public_send(name, *a, **k) do |*aa|
|
12
|
-
if aa.length == 1 && aa[0].is_a?(Phlex::SGML)
|
13
|
-
@object.helpers.capture(aa[0].unbuffered, &b)
|
14
|
-
else
|
15
|
-
@object.helpers.capture(*aa, &b)
|
16
|
-
end
|
17
|
-
end
|
18
|
-
else
|
19
|
-
@object.public_send(name, *a, **k)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
# Now we've defined this missing method, we can call it.
|
25
|
-
__public_send__(name, *args, **kwargs, &block)
|
26
|
-
else
|
27
|
-
super
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require "phlex/testing/view_helper"
|
4
|
-
|
5
|
-
module Phlex::Testing
|
6
|
-
module Rails
|
7
|
-
module ViewHelper
|
8
|
-
include ::Phlex::Testing::ViewHelper
|
9
|
-
|
10
|
-
def view_context
|
11
|
-
controller.view_context
|
12
|
-
end
|
13
|
-
|
14
|
-
def controller
|
15
|
-
@controller ||= ActionView::TestCase::TestController.new
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|
data/phlex_logo.png
DELETED
Binary file
|