Skip to content

Commit 257e7ea

Browse files
committedJan 7, 2023
No need to depend on both phlex and phlex-rails
1 parent d800dd8 commit 257e7ea

File tree

5 files changed

+7
-144
lines changed

5 files changed

+7
-144
lines changed
 

‎.rubocop.yml

+3
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,6 @@ Metrics/CyclomaticComplexity:
2828

2929
Layout/LineLength:
3030
Max: 120
31+
32+
Lint/MissingSuper:
33+
Enabled: false

‎Gemfile.lock

-141
Original file line numberDiff line numberDiff line change
@@ -3,152 +3,18 @@ PATH
33
specs:
44
turbo-ruby (0.1.0)
55
phlex (~> 1.0)
6-
phlex-rails (~> 0.4)
76

87
GEM
98
remote: https://rubygems.org/
109
specs:
11-
actioncable (7.0.4)
12-
actionpack (= 7.0.4)
13-
activesupport (= 7.0.4)
14-
nio4r (~> 2.0)
15-
websocket-driver (>= 0.6.1)
16-
actionmailbox (7.0.4)
17-
actionpack (= 7.0.4)
18-
activejob (= 7.0.4)
19-
activerecord (= 7.0.4)
20-
activestorage (= 7.0.4)
21-
activesupport (= 7.0.4)
22-
mail (>= 2.7.1)
23-
net-imap
24-
net-pop
25-
net-smtp
26-
actionmailer (7.0.4)
27-
actionpack (= 7.0.4)
28-
actionview (= 7.0.4)
29-
activejob (= 7.0.4)
30-
activesupport (= 7.0.4)
31-
mail (~> 2.5, >= 2.5.4)
32-
net-imap
33-
net-pop
34-
net-smtp
35-
rails-dom-testing (~> 2.0)
36-
actionpack (7.0.4)
37-
actionview (= 7.0.4)
38-
activesupport (= 7.0.4)
39-
rack (~> 2.0, >= 2.2.0)
40-
rack-test (>= 0.6.3)
41-
rails-dom-testing (~> 2.0)
42-
rails-html-sanitizer (~> 1.0, >= 1.2.0)
43-
actiontext (7.0.4)
44-
actionpack (= 7.0.4)
45-
activerecord (= 7.0.4)
46-
activestorage (= 7.0.4)
47-
activesupport (= 7.0.4)
48-
globalid (>= 0.6.0)
49-
nokogiri (>= 1.8.5)
50-
actionview (7.0.4)
51-
activesupport (= 7.0.4)
52-
builder (~> 3.1)
53-
erubi (~> 1.4)
54-
rails-dom-testing (~> 2.0)
55-
rails-html-sanitizer (~> 1.1, >= 1.2.0)
56-
activejob (7.0.4)
57-
activesupport (= 7.0.4)
58-
globalid (>= 0.3.6)
59-
activemodel (7.0.4)
60-
activesupport (= 7.0.4)
61-
activerecord (7.0.4)
62-
activemodel (= 7.0.4)
63-
activesupport (= 7.0.4)
64-
activestorage (7.0.4)
65-
actionpack (= 7.0.4)
66-
activejob (= 7.0.4)
67-
activerecord (= 7.0.4)
68-
activesupport (= 7.0.4)
69-
marcel (~> 1.0)
70-
mini_mime (>= 1.1.0)
71-
activesupport (7.0.4)
72-
concurrent-ruby (~> 1.0, >= 1.0.2)
73-
i18n (>= 1.6, < 2)
74-
minitest (>= 5.1)
75-
tzinfo (~> 2.0)
7610
ast (2.4.2)
77-
builder (3.2.4)
78-
concurrent-ruby (1.1.10)
79-
crass (1.0.6)
80-
date (3.3.3)
81-
erubi (1.12.0)
82-
globalid (1.0.0)
83-
activesupport (>= 5.0)
84-
i18n (1.12.0)
85-
concurrent-ruby (~> 1.0)
8611
json (2.6.3)
87-
loofah (2.19.1)
88-
crass (~> 1.0.2)
89-
nokogiri (>= 1.5.9)
90-
mail (2.8.0)
91-
mini_mime (>= 0.1.1)
92-
net-imap
93-
net-pop
94-
net-smtp
95-
marcel (1.0.2)
96-
method_source (1.0.0)
97-
mini_mime (1.1.2)
98-
mini_portile2 (2.8.1)
9912
minitest (5.17.0)
100-
net-imap (0.3.4)
101-
date
102-
net-protocol
103-
net-pop (0.1.2)
104-
net-protocol
105-
net-protocol (0.2.1)
106-
timeout
107-
net-smtp (0.3.3)
108-
net-protocol
109-
nio4r (2.5.8)
110-
nokogiri (1.13.10)
111-
mini_portile2 (~> 2.8.0)
112-
racc (~> 1.4)
11313
parallel (1.22.1)
11414
parser (3.2.0.0)
11515
ast (~> 2.4.1)
11616
phlex (1.0.0)
11717
zeitwerk (~> 2.6)
118-
phlex-rails (0.4.2)
119-
phlex (>= 1, < 2)
120-
rails (>= 6.1, < 8)
121-
zeitwerk (~> 2)
122-
racc (1.6.2)
123-
rack (2.2.5)
124-
rack-test (2.0.2)
125-
rack (>= 1.3)
126-
rails (7.0.4)
127-
actioncable (= 7.0.4)
128-
actionmailbox (= 7.0.4)
129-
actionmailer (= 7.0.4)
130-
actionpack (= 7.0.4)
131-
actiontext (= 7.0.4)
132-
actionview (= 7.0.4)
133-
activejob (= 7.0.4)
134-
activemodel (= 7.0.4)
135-
activerecord (= 7.0.4)
136-
activestorage (= 7.0.4)
137-
activesupport (= 7.0.4)
138-
bundler (>= 1.15.0)
139-
railties (= 7.0.4)
140-
rails-dom-testing (2.0.3)
141-
activesupport (>= 4.2.0)
142-
nokogiri (>= 1.6)
143-
rails-html-sanitizer (1.4.4)
144-
loofah (~> 2.19, >= 2.19.1)
145-
railties (7.0.4)
146-
actionpack (= 7.0.4)
147-
activesupport (= 7.0.4)
148-
method_source
149-
rake (>= 12.2)
150-
thor (~> 1.0)
151-
zeitwerk (~> 2.5)
15218
rainbow (3.1.1)
15319
rake (13.0.6)
15420
regexp_parser (2.6.1)
@@ -166,14 +32,7 @@ GEM
16632
rubocop-ast (1.24.1)
16733
parser (>= 3.1.1.0)
16834
ruby-progressbar (1.11.0)
169-
thor (1.2.1)
170-
timeout (0.3.1)
171-
tzinfo (2.0.5)
172-
concurrent-ruby (~> 1.0)
17335
unicode-display_width (2.4.2)
174-
websocket-driver (0.7.5)
175-
websocket-extensions (>= 0.1.0)
176-
websocket-extensions (0.1.5)
17736
zeitwerk (2.6.6)
17837

17938
PLATFORMS

‎lib/turbo/elements/turbo_stream.rb

+4-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ class TurboStream < Phlex::HTML
77

88
def initialize(view_context: nil, action: nil, target: nil, content: nil, allow_inferred_rendering: true,
99
attributes: {}, **rendering, &block)
10-
super
1110
@view_context = view_context
1211
@action = action
1312
@target = target
@@ -52,6 +51,10 @@ def render_record(possible_record)
5251
record = possible_record
5352
@view_context.render(partial: record, formats: :html)
5453
end
54+
55+
def to_html
56+
call
57+
end
5558
end
5659
end
5760
end

‎lib/turbo/ruby.rb

-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
# frozen_string_literal: true
22

33
require "phlex"
4-
require "phlex-rails"
54

65
require_relative "ruby/version"
76
require_relative "ruby/helpers"

‎turbo-ruby.gemspec

-1
Original file line numberDiff line numberDiff line change
@@ -25,5 +25,4 @@ Gem::Specification.new do |spec|
2525
spec.require_paths = ["lib"]
2626

2727
spec.add_dependency "phlex", "~> 1.0"
28-
spec.add_dependency "phlex-rails", "~> 0.4"
2928
end

0 commit comments

Comments
 (0)
Please sign in to comment.