phlexible 2.2.0 → 3.1.0

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.
Files changed (44) hide show
  1. checksums.yaml +4 -4
  2. data/.rubocop.yml +44 -12
  3. data/.ruby-version +1 -0
  4. data/Appraisals +25 -0
  5. data/README.md +85 -2
  6. data/Rakefile +4 -4
  7. data/gemfiles/.bundle/config +2 -0
  8. data/gemfiles/phlex1_rails7.gemfile +24 -0
  9. data/gemfiles/phlex1_rails7.gemfile.lock +464 -0
  10. data/gemfiles/phlex1_rails8.gemfile +24 -0
  11. data/gemfiles/phlex1_rails8.gemfile.lock +463 -0
  12. data/gemfiles/phlex2_rails7.gemfile +24 -0
  13. data/gemfiles/phlex2_rails7.gemfile.lock +471 -0
  14. data/gemfiles/phlex2_rails8.gemfile +24 -0
  15. data/gemfiles/phlex2_rails8.gemfile.lock +470 -0
  16. data/lib/phlexible/page_title.rb +13 -13
  17. data/lib/phlexible/process_attributes.rb +56 -0
  18. data/lib/phlexible/rails/a_element.rb +7 -1
  19. data/lib/phlexible/rails/action_controller/implicit_render.rb +15 -7
  20. data/lib/phlexible/rails/button_to.rb +0 -113
  21. data/lib/phlexible/rails/button_to_concerns.rb +141 -0
  22. data/lib/phlexible/rails/controller_variables.rb +52 -46
  23. data/lib/phlexible/rails/meta_tags_component.rb +3 -1
  24. data/lib/phlexible/rails/view_assigns.rb +17 -0
  25. data/lib/phlexible/version.rb +1 -1
  26. data/lib/phlexible.rb +6 -5
  27. metadata +58 -27
  28. data/Gemfile +0 -13
  29. data/Gemfile.lock +0 -169
  30. data/config/sus.rb +0 -8
  31. data/config/view_helper.rb +0 -16
  32. data/fixtures/dummy/app/controllers/articles_controller.rb +0 -4
  33. data/fixtures/dummy/app/views/articles/index.html.erb +0 -1
  34. data/fixtures/dummy/app/views/articles/link.rb +0 -9
  35. data/fixtures/dummy/app/views/articles/show.rb +0 -7
  36. data/fixtures/dummy/config/database.yml +0 -3
  37. data/fixtures/dummy/config/routes.rb +0 -5
  38. data/fixtures/dummy/config/storage.yml +0 -3
  39. data/fixtures/dummy/db/schema.rb +0 -6
  40. data/fixtures/dummy/log/.gitignore +0 -1
  41. data/fixtures/dummy/public/favicon.ico +0 -0
  42. data/fixtures/rails_helper.rb +0 -10
  43. data/lib/phlexible/rails.rb +0 -20
  44. data/phlexible.gemspec +0 -35
data/Gemfile.lock DELETED
@@ -1,169 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- phlexible (2.2.0)
5
- phlex (>= 1.10.0, < 2.0.0)
6
- phlex-rails (>= 1.2.1, < 2.0.0)
7
-
8
- GEM
9
- remote: https://rubygems.org/
10
- specs:
11
- actionpack (8.0.1)
12
- actionview (= 8.0.1)
13
- activesupport (= 8.0.1)
14
- nokogiri (>= 1.8.5)
15
- rack (>= 2.2.4)
16
- rack-session (>= 1.0.1)
17
- rack-test (>= 0.6.3)
18
- rails-dom-testing (~> 2.2)
19
- rails-html-sanitizer (~> 1.6)
20
- useragent (~> 0.16)
21
- actionview (8.0.1)
22
- activesupport (= 8.0.1)
23
- builder (~> 3.1)
24
- erubi (~> 1.11)
25
- rails-dom-testing (~> 2.2)
26
- rails-html-sanitizer (~> 1.6)
27
- activesupport (8.0.1)
28
- base64
29
- benchmark (>= 0.3)
30
- bigdecimal
31
- concurrent-ruby (~> 1.0, >= 1.3.1)
32
- connection_pool (>= 2.2.5)
33
- drb
34
- i18n (>= 1.6, < 2)
35
- logger (>= 1.4.2)
36
- minitest (>= 5.1)
37
- securerandom (>= 0.3)
38
- tzinfo (~> 2.0, >= 2.0.5)
39
- uri (>= 0.13.1)
40
- ast (2.4.2)
41
- base64 (0.2.0)
42
- benchmark (0.4.0)
43
- bigdecimal (3.1.9)
44
- builder (3.3.0)
45
- combustion (1.5.0)
46
- activesupport (>= 3.0.0)
47
- railties (>= 3.0.0)
48
- thor (>= 0.14.6)
49
- concurrent-ruby (1.3.5)
50
- connection_pool (2.5.0)
51
- crass (1.0.6)
52
- date (3.4.1)
53
- debug (1.10.0)
54
- irb (~> 1.10)
55
- reline (>= 0.3.8)
56
- drb (2.2.1)
57
- erubi (1.13.1)
58
- i18n (1.14.7)
59
- concurrent-ruby (~> 1.0)
60
- io-console (0.8.0)
61
- irb (1.15.1)
62
- pp (>= 0.6.0)
63
- rdoc (>= 4.0.0)
64
- reline (>= 0.4.2)
65
- json (2.9.1)
66
- language_server-protocol (3.17.0.4)
67
- logger (1.6.5)
68
- loofah (2.24.0)
69
- crass (~> 1.0.2)
70
- nokogiri (>= 1.12.0)
71
- minitest (5.25.4)
72
- nokogiri (1.18.2-arm64-darwin)
73
- racc (~> 1.4)
74
- nokogiri (1.18.2-x86_64-darwin)
75
- racc (~> 1.4)
76
- nokogiri (1.18.2-x86_64-linux-gnu)
77
- racc (~> 1.4)
78
- parallel (1.26.3)
79
- parser (3.3.7.1)
80
- ast (~> 2.4.1)
81
- racc
82
- phlex (1.11.0)
83
- phlex-rails (1.2.2)
84
- phlex (>= 1.10, < 2)
85
- railties (>= 6.1, < 9)
86
- phlex-testing-nokogiri (0.1.0)
87
- nokogiri (~> 1.13)
88
- phlex (>= 0.5)
89
- pp (0.6.2)
90
- prettyprint
91
- prettyprint (0.2.0)
92
- psych (5.2.3)
93
- date
94
- stringio
95
- racc (1.8.1)
96
- rack (3.1.9)
97
- rack-session (2.1.0)
98
- base64 (>= 0.1.0)
99
- rack (>= 3.0.0)
100
- rack-test (2.2.0)
101
- rack (>= 1.3)
102
- rackup (2.2.1)
103
- rack (>= 3)
104
- rails-dom-testing (2.2.0)
105
- activesupport (>= 5.0.0)
106
- minitest
107
- nokogiri (>= 1.6)
108
- rails-html-sanitizer (1.6.2)
109
- loofah (~> 2.21)
110
- nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
111
- railties (8.0.1)
112
- actionpack (= 8.0.1)
113
- activesupport (= 8.0.1)
114
- irb (~> 1.13)
115
- rackup (>= 1.0.0)
116
- rake (>= 12.2)
117
- thor (~> 1.0, >= 1.2.2)
118
- zeitwerk (~> 2.6)
119
- rainbow (3.1.1)
120
- rake (13.2.1)
121
- rdoc (6.11.0)
122
- psych (>= 4.0.0)
123
- regexp_parser (2.10.0)
124
- reline (0.6.0)
125
- io-console (~> 0.5)
126
- rubocop (1.71.2)
127
- json (~> 2.3)
128
- language_server-protocol (>= 3.17.0)
129
- parallel (~> 1.10)
130
- parser (>= 3.3.0.2)
131
- rainbow (>= 2.2.2, < 4.0)
132
- regexp_parser (>= 2.9.3, < 3.0)
133
- rubocop-ast (>= 1.38.0, < 2.0)
134
- ruby-progressbar (~> 1.7)
135
- unicode-display_width (>= 2.4.0, < 4.0)
136
- rubocop-ast (1.38.0)
137
- parser (>= 3.3.1.0)
138
- ruby-progressbar (1.13.0)
139
- securerandom (0.4.1)
140
- stringio (3.1.2)
141
- sus (0.32.0)
142
- thor (1.3.2)
143
- tzinfo (2.0.6)
144
- concurrent-ruby (~> 1.0)
145
- unicode-display_width (3.1.4)
146
- unicode-emoji (~> 4.0, >= 4.0.4)
147
- unicode-emoji (4.0.4)
148
- uri (1.0.2)
149
- useragent (0.16.11)
150
- zeitwerk (2.7.1)
151
-
152
- PLATFORMS
153
- arm64-darwin-22
154
- arm64-darwin-23
155
- arm64-darwin-24
156
- x86_64-darwin-19
157
- x86_64-linux
158
-
159
- DEPENDENCIES
160
- combustion
161
- debug
162
- phlex-testing-nokogiri
163
- phlexible!
164
- rake (~> 13.0)
165
- rubocop (~> 1.55)
166
- sus
167
-
168
- BUNDLED WITH
169
- 2.4.1
data/config/sus.rb DELETED
@@ -1,8 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'phlexible'
4
- require 'bundler'
5
-
6
- Bundler.require :test
7
-
8
- require_relative 'view_helper'
@@ -1,16 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module ViewHelper
4
- def self.extended(parent)
5
- parent.class_exec do
6
- let(:output) { example.call }
7
- let(:example) { view.new }
8
- end
9
- end
10
-
11
- def view(&block)
12
- let :view do
13
- Class.new(Phlex::HTML, &block)
14
- end
15
- end
16
- end
@@ -1,4 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class ArticlesController < ActionController::Base
4
- end
@@ -1 +0,0 @@
1
- <%= render Views::Articles::Link.new %>
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Views::Articles::Link < Phlex::HTML
4
- include Phlexible::Rails::AElement
5
-
6
- def view_template
7
- a(href: :root, class: :foo) { 'A link to root' }
8
- end
9
- end
@@ -1,7 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- class Views::Articles::Show < Phlex::HTML
4
- include Phlexible::Rails::ControllerVariables
5
-
6
- def view_template; end
7
- end
@@ -1,3 +0,0 @@
1
- test:
2
- adapter: sqlite3
3
- database: db/combustion_test.sqlite
@@ -1,5 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Rails.application.routes.draw do
4
- root to: 'articles#index'
5
- end
@@ -1,3 +0,0 @@
1
- test:
2
- service: Disk
3
- root: /Users/joelmoss/dev/phlexible/tmp/storage
@@ -1,6 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- ActiveRecord::Schema.define do
4
- # Set up any tables you need to exist for your test suite that don't belong
5
- # in migrations.
6
- end
@@ -1 +0,0 @@
1
- *.log
File without changes
@@ -1,10 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- Bundler.require :default
4
-
5
- Combustion.path = 'fixtures/dummy'
6
-
7
- Combustion.initialize! :action_controller do
8
- config.load_defaults 7.0
9
- config.autoload_paths << "#{root}/app"
10
- end
@@ -1,20 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'phlex-rails'
4
-
5
- module Phlexible
6
- module Rails
7
- autoload :ControllerVariables, 'phlexible/rails/controller_variables'
8
- autoload :Responder, 'phlexible/rails/responder'
9
- autoload :AElement, 'phlexible/rails/a_element'
10
-
11
- autoload :MetaTagsComponent, 'phlexible/rails/meta_tags_component'
12
- autoload :ButtonTo, 'phlexible/rails/button_to'
13
- autoload :ButtonToConcerns, 'phlexible/rails/button_to'
14
-
15
- module ActionController
16
- autoload :ImplicitRender, 'phlexible/rails/action_controller/implicit_render'
17
- autoload :MetaTags, 'phlexible/rails/action_controller/meta_tags'
18
- end
19
- end
20
- end
data/phlexible.gemspec DELETED
@@ -1,35 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require_relative 'lib/phlexible/version'
4
-
5
- Gem::Specification.new do |spec|
6
- spec.name = 'phlexible'
7
- spec.version = Phlexible::VERSION
8
- spec.authors = ['Joel Moss']
9
- spec.email = ['joel@developwithstyle.com']
10
-
11
- spec.summary = 'A bunch of helpers and goodies intended to make life with Phlex even easier!'
12
- spec.description = 'A bunch of helpers and goodies intended to make life with Phlex even easier!'
13
- spec.homepage = 'https://github.com/joelmoss/phlexible'
14
- spec.license = 'MIT'
15
- spec.required_ruby_version = '>= 3.3.0'
16
-
17
- spec.metadata['homepage_uri'] = spec.homepage
18
- spec.metadata['source_code_uri'] = 'https://github.com/joelmoss/phlexible'
19
- spec.metadata['changelog_uri'] = 'https://github.com/joelmoss/phlexible/releases'
20
- spec.metadata['rubygems_mfa_required'] = 'true'
21
-
22
- # Specify which files should be added to the gem when it is released.
23
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
24
- spec.files = Dir.chdir(__dir__) do
25
- `git ls-files -z`.split("\x0").reject do |f|
26
- (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|circleci)|appveyor)})
27
- end
28
- end
29
- spec.bindir = 'exe'
30
- spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
31
- spec.require_paths = ['lib']
32
-
33
- spec.add_dependency 'phlex', '>= 1.10.0', '< 2.0.0'
34
- spec.add_dependency 'phlex-rails', '>= 1.2.1', '< 2.0.0'
35
- end