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.
Files changed (48) hide show
  1. checksums.yaml +4 -4
  2. data/lib/generators/phlex/component/USAGE +2 -2
  3. data/lib/generators/phlex/component/component_generator.rb +1 -1
  4. data/lib/generators/phlex/component/templates/component.rb.erb +2 -3
  5. data/lib/generators/phlex/install/USAGE +3 -1
  6. data/lib/generators/phlex/install/install_generator.rb +28 -38
  7. data/lib/generators/phlex/install/templates/base_component.rb.erb +15 -0
  8. data/lib/generators/phlex/install/templates/base_view.rb.erb +9 -0
  9. data/lib/generators/phlex/install/templates/phlex.rb.erb +16 -0
  10. data/lib/generators/phlex/view/USAGE +1 -1
  11. data/lib/generators/phlex/view/templates/view.rb.erb +2 -3
  12. data/lib/generators/phlex/view/view_generator.rb +1 -1
  13. data/lib/phlex/rails/buffered.rb +6 -7
  14. data/lib/phlex/rails/csv.rb +3 -3
  15. data/lib/phlex/rails/engine.rb +0 -1
  16. data/lib/phlex/rails/{html/method_missing.rb → helper_finder.rb} +2 -2
  17. data/lib/phlex/rails/helper_macros.rb +2 -12
  18. data/lib/phlex/rails/helpers/notice.rb +8 -0
  19. data/lib/phlex/rails/helpers/routes.rb +1 -0
  20. data/lib/phlex/rails/helpers/tag.rb +2 -2
  21. data/lib/phlex/rails/helpers/translate.rb +2 -2
  22. data/lib/phlex/rails/helpers/turbo_stream.rb +1 -1
  23. data/lib/phlex/rails/helpers.rb +11 -56
  24. data/lib/phlex/rails/html.rb +0 -2
  25. data/lib/phlex/rails/layout.rb +7 -7
  26. data/lib/phlex/rails/sgml.rb +35 -53
  27. data/lib/phlex/rails/streaming.rb +11 -9
  28. data/lib/phlex/rails/testing.rb +18 -0
  29. data/lib/phlex/rails/unbuffered.rb +50 -0
  30. data/lib/phlex/rails/version.rb +1 -1
  31. data/lib/phlex/rails.rb +6 -7
  32. metadata +16 -26
  33. data/.editorconfig +0 -13
  34. data/.rubocop.yml +0 -15
  35. data/.ruby-version +0 -1
  36. data/.yardopts +0 -1
  37. data/Appraisals +0 -11
  38. data/CHANGELOG.md +0 -38
  39. data/CODE_OF_CONDUCT.md +0 -84
  40. data/Gemfile +0 -17
  41. data/SECURITY.md +0 -5
  42. data/config.ru +0 -9
  43. data/lib/generators/phlex/install/templates/application_component.rb +0 -12
  44. data/lib/generators/phlex/install/templates/application_layout.rb +0 -24
  45. data/lib/generators/phlex/install/templates/application_view.rb +0 -9
  46. data/lib/phlex/rails/unbuffered_overrides.rb +0 -30
  47. data/lib/phlex/testing/rails/view_helper.rb +0 -19
  48. 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