rux-rails 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/rux-rails.rb +0 -20
- data/lib/rux-rails/railtie.rb +19 -0
- data/lib/rux-rails/version.rb +1 -1
- data/spec/dummy/app/components/home_component.rb +3 -0
- data/spec/dummy/log/test.log +147 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51fa772fea7bce41b30a22aa190760f24c9bab67a28014c1fa3de6239ecb384f
|
4
|
+
data.tar.gz: 6a939775af5fbf70b50fa48edd585ecb3d97843f28a89e24279bf0890808a7ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c17266130151a337eb71bf026ae284180faccc4b896393b6f22d1383fb52c2bf09746ef9350582e6a8aceef6491dd8c5c51dcaf0d5ab8a4b56b858362429c18d
|
7
|
+
data.tar.gz: 5fb976f13344dfd17e8944dbbc9d3cc2de8de530254a53ee1cee44d1cee2818bf80dc76352b5f0b0f900482d437c783bafbc29e8304d03439649d1385831fab0
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
## 1.2.0
|
2
|
+
* Require ext patches in railtie to take advantage of Rails' `config.autoloader` setting.
|
3
|
+
- This should fix Rails setups in which Zeitwerk is part of the Gemfile but `config.autoloader` is set to `:classic` (previously rux-rails relied on attempting to `require` zeitwerk and `rescue`ing the possible `LoadError`).
|
4
|
+
|
1
5
|
## 1.1.0
|
2
6
|
* Add `ActiveSupport::SafeBuffer` subclass to handle arrays (#1, @jaredcwhite)
|
3
7
|
|
data/lib/rux-rails.rb
CHANGED
@@ -25,26 +25,6 @@ module RuxRails
|
|
25
25
|
self.transpile_on_load = -> () { true }
|
26
26
|
end
|
27
27
|
|
28
|
-
begin
|
29
|
-
require 'zeitwerk'
|
30
|
-
rescue LoadError
|
31
|
-
require 'rux-rails/core_ext/kernel'
|
32
|
-
require 'rux-rails/ext/activesupport/dependencies'
|
33
|
-
|
34
|
-
RuxRails.zeitwerk_mode = false
|
35
|
-
else
|
36
|
-
require 'rux-rails/core_ext/kernel_zeitwerk'
|
37
|
-
require 'rux-rails/ext/zeitwerk/loader'
|
38
|
-
|
39
|
-
RuxRails.zeitwerk_mode = true
|
40
|
-
end
|
41
|
-
|
42
|
-
begin
|
43
|
-
require 'bootsnap'
|
44
|
-
rescue LoadError
|
45
|
-
else
|
46
|
-
require 'rux-rails/ext/bootsnap/autoload'
|
47
|
-
end
|
48
28
|
|
49
29
|
require 'rux'
|
50
30
|
require 'rux-rails/railtie'
|
data/lib/rux-rails/railtie.rb
CHANGED
@@ -5,6 +5,25 @@ module RuxRails
|
|
5
5
|
config.rux = ActiveSupport::OrderedOptions.new
|
6
6
|
|
7
7
|
initializer 'rux-rails.initialize', before: :set_autoload_paths do |app|
|
8
|
+
if !app.config.respond_to?(:autoloader) || app.config.autoloader == :classic
|
9
|
+
require 'rux-rails/core_ext/kernel'
|
10
|
+
require 'rux-rails/ext/activesupport/dependencies'
|
11
|
+
|
12
|
+
RuxRails.zeitwerk_mode = false
|
13
|
+
else
|
14
|
+
require 'rux-rails/core_ext/kernel_zeitwerk'
|
15
|
+
require 'rux-rails/ext/zeitwerk/loader'
|
16
|
+
|
17
|
+
RuxRails.zeitwerk_mode = true
|
18
|
+
end
|
19
|
+
|
20
|
+
begin
|
21
|
+
require 'bootsnap'
|
22
|
+
rescue LoadError
|
23
|
+
else
|
24
|
+
require 'rux-rails/ext/bootsnap/autoload'
|
25
|
+
end
|
26
|
+
|
8
27
|
ActionView::Template.register_template_handler(
|
9
28
|
:ruxt, RuxRails::TemplateHandler
|
10
29
|
)
|
data/lib/rux-rails/version.rb
CHANGED
@@ -2,10 +2,13 @@ class HomeComponent < ViewComponent::Base
|
|
2
2
|
def call
|
3
3
|
Rux.tag("div", class: "container") {
|
4
4
|
Rux.create_buffer.tap { |_rux_buf_,|
|
5
|
+
_rux_buf_ << " "
|
5
6
|
_rux_buf_ << render(Image.new(src: "cat.png", size: "40"))
|
7
|
+
_rux_buf_ << " "
|
6
8
|
_rux_buf_ << render(Button.new(outline: true, disabled: "true", size: :large)) {
|
7
9
|
" Click Me! "
|
8
10
|
}
|
11
|
+
_rux_buf_ << " "
|
9
12
|
}.to_s
|
10
13
|
}
|
11
14
|
end
|
data/spec/dummy/log/test.log
CHANGED
@@ -2143,3 +2143,150 @@ Processing by HomeController#index as HTML
|
|
2143
2143
|
Rendered home/index.html.ruxt within layouts/application (Duration: 71.3ms | Allocations: 46024)
|
2144
2144
|
Rendered layout layouts/application.html.erb (Duration: 71.7ms | Allocations: 46168)
|
2145
2145
|
Completed 200 OK in 84ms (Views: 78.3ms | Allocations: 52164)
|
2146
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:14:24 -0700
|
2147
|
+
Processing by HomeController#index as HTML
|
2148
|
+
Rendering layout layouts/application.html.erb
|
2149
|
+
Rendering home/index.html.ruxt within layouts/application
|
2150
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 119.5ms | Allocations: 44358)
|
2151
|
+
Rendered layout layouts/application.html.erb (Duration: 119.7ms | Allocations: 44412)
|
2152
|
+
Completed 500 Internal Server Error in 134ms (Allocations: 50112)
|
2153
|
+
|
2154
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2155
|
+
1: <HomeComponent />
|
2156
|
+
|
2157
|
+
app/components/home_component.rb:6:in `new'
|
2158
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2159
|
+
app/components/home_component.rb:4:in `block in call'
|
2160
|
+
app/components/home_component.rb:3:in `call'
|
2161
|
+
app/views/home/index.html.ruxt:1
|
2162
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:15:04 -0700
|
2163
|
+
Processing by HomeController#index as HTML
|
2164
|
+
Rendering layout layouts/application.html.erb
|
2165
|
+
Rendering home/index.html.ruxt within layouts/application
|
2166
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 104.4ms | Allocations: 44357)
|
2167
|
+
Rendered layout layouts/application.html.erb (Duration: 104.6ms | Allocations: 44411)
|
2168
|
+
Completed 500 Internal Server Error in 115ms (Allocations: 50112)
|
2169
|
+
|
2170
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2171
|
+
1: <HomeComponent />
|
2172
|
+
|
2173
|
+
app/components/home_component.rb:6:in `new'
|
2174
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2175
|
+
app/components/home_component.rb:4:in `block in call'
|
2176
|
+
app/components/home_component.rb:3:in `call'
|
2177
|
+
app/views/home/index.html.ruxt:1
|
2178
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:18:57 -0700
|
2179
|
+
Processing by HomeController#index as HTML
|
2180
|
+
Rendering layout layouts/application.html.erb
|
2181
|
+
Rendering home/index.html.ruxt within layouts/application
|
2182
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 84.9ms | Allocations: 44652)
|
2183
|
+
Rendered layout layouts/application.html.erb (Duration: 85.0ms | Allocations: 44706)
|
2184
|
+
Completed 500 Internal Server Error in 97ms (Allocations: 50407)
|
2185
|
+
|
2186
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2187
|
+
1: <HomeComponent />
|
2188
|
+
|
2189
|
+
app/components/home_component.rb:6:in `new'
|
2190
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2191
|
+
app/components/home_component.rb:4:in `block in call'
|
2192
|
+
app/components/home_component.rb:3:in `call'
|
2193
|
+
app/views/home/index.html.ruxt:1
|
2194
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:21:12 -0700
|
2195
|
+
Processing by HomeController#index as HTML
|
2196
|
+
Rendering layout layouts/application.html.erb
|
2197
|
+
Rendering home/index.html.ruxt within layouts/application
|
2198
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 84.6ms | Allocations: 44330)
|
2199
|
+
Rendered layout layouts/application.html.erb (Duration: 84.8ms | Allocations: 44384)
|
2200
|
+
Completed 500 Internal Server Error in 96ms (Allocations: 50085)
|
2201
|
+
|
2202
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2203
|
+
1: <HomeComponent />
|
2204
|
+
|
2205
|
+
app/components/home_component.rb:6:in `new'
|
2206
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2207
|
+
app/components/home_component.rb:4:in `block in call'
|
2208
|
+
app/components/home_component.rb:3:in `call'
|
2209
|
+
app/views/home/index.html.ruxt:1
|
2210
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:22:02 -0700
|
2211
|
+
Processing by HomeController#index as HTML
|
2212
|
+
Rendering layout layouts/application.html.erb
|
2213
|
+
Rendering home/index.html.ruxt within layouts/application
|
2214
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 83.2ms | Allocations: 44332)
|
2215
|
+
Rendered layout layouts/application.html.erb (Duration: 83.4ms | Allocations: 44386)
|
2216
|
+
Completed 500 Internal Server Error in 95ms (Allocations: 50087)
|
2217
|
+
|
2218
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2219
|
+
1: <HomeComponent />
|
2220
|
+
|
2221
|
+
app/components/home_component.rb:6:in `new'
|
2222
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2223
|
+
app/components/home_component.rb:4:in `block in call'
|
2224
|
+
app/components/home_component.rb:3:in `call'
|
2225
|
+
app/views/home/index.html.ruxt:1
|
2226
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:22:41 -0700
|
2227
|
+
Processing by HomeController#index as HTML
|
2228
|
+
Rendering layout layouts/application.html.erb
|
2229
|
+
Rendering home/index.html.ruxt within layouts/application
|
2230
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 59.1ms | Allocations: 44851)
|
2231
|
+
Rendered layout layouts/application.html.erb (Duration: 59.2ms | Allocations: 44905)
|
2232
|
+
Completed 500 Internal Server Error in 68ms (Allocations: 50606)
|
2233
|
+
|
2234
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2235
|
+
1: <HomeComponent />
|
2236
|
+
|
2237
|
+
app/components/home_component.rb:6:in `new'
|
2238
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2239
|
+
app/components/home_component.rb:4:in `block in call'
|
2240
|
+
app/components/home_component.rb:3:in `call'
|
2241
|
+
app/views/home/index.html.ruxt:1
|
2242
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:25:14 -0700
|
2243
|
+
Processing by HomeController#index as HTML
|
2244
|
+
Rendering layout layouts/application.html.erb
|
2245
|
+
Rendering home/index.html.ruxt within layouts/application
|
2246
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 80.1ms | Allocations: 44330)
|
2247
|
+
Rendered layout layouts/application.html.erb (Duration: 80.3ms | Allocations: 44384)
|
2248
|
+
Completed 500 Internal Server Error in 92ms (Allocations: 50085)
|
2249
|
+
|
2250
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2251
|
+
1: <HomeComponent />
|
2252
|
+
|
2253
|
+
app/components/home_component.rb:6:in `new'
|
2254
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2255
|
+
app/components/home_component.rb:4:in `block in call'
|
2256
|
+
app/components/home_component.rb:3:in `call'
|
2257
|
+
app/views/home/index.html.ruxt:1
|
2258
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:34:56 -0700
|
2259
|
+
Processing by HomeController#index as HTML
|
2260
|
+
Rendering layout layouts/application.html.erb
|
2261
|
+
Rendering home/index.html.ruxt within layouts/application
|
2262
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 89.8ms | Allocations: 47457)
|
2263
|
+
Rendered layout layouts/application.html.erb (Duration: 90.2ms | Allocations: 47511)
|
2264
|
+
Completed 500 Internal Server Error in 103ms (Allocations: 53692)
|
2265
|
+
|
2266
|
+
ActionView::Template::Error (wrong number of arguments (given 1, expected 0; required keyword: src)):
|
2267
|
+
1: <HomeComponent />
|
2268
|
+
|
2269
|
+
app/components/home_component.rb:6:in `new'
|
2270
|
+
app/components/home_component.rb:6:in `block (2 levels) in call'
|
2271
|
+
app/components/home_component.rb:4:in `block in call'
|
2272
|
+
app/components/home_component.rb:3:in `call'
|
2273
|
+
app/views/home/index.html.ruxt:1
|
2274
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 13:38:13 -0700
|
2275
|
+
Processing by HomeController#index as HTML
|
2276
|
+
Rendering layout layouts/application.html.erb
|
2277
|
+
Rendering home/index.html.ruxt within layouts/application
|
2278
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 98.4ms | Allocations: 50134)
|
2279
|
+
Rendered layout layouts/application.html.erb (Duration: 99.4ms | Allocations: 50324)
|
2280
|
+
Completed 200 OK in 113ms (Views: 106.6ms | Allocations: 56562)
|
2281
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 14:43:25 -0700
|
2282
|
+
Processing by HomeController#index as HTML
|
2283
|
+
Rendering layout layouts/application.html.erb
|
2284
|
+
Rendering home/index.html.ruxt within layouts/application
|
2285
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 121.4ms | Allocations: 50136)
|
2286
|
+
Rendered layout layouts/application.html.erb (Duration: 122.4ms | Allocations: 50327)
|
2287
|
+
Completed 200 OK in 135ms (Views: 129.1ms | Allocations: 56566)
|
2288
|
+
Started GET "/" for 127.0.0.1 at 2021-06-12 14:47:37 -0700
|
2289
|
+
Processing by HomeController#index as HTML
|
2290
|
+
Rendering home/index.html.ruxt within layouts/application
|
2291
|
+
Rendered home/index.html.ruxt within layouts/application (Duration: 88.8ms | Allocations: 50816)
|
2292
|
+
Completed 200 OK in 102ms (Views: 96.8ms | Allocations: 57730)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rux-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cameron Dutro
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-06-
|
11
|
+
date: 2021-06-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rux
|
@@ -166,7 +166,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
166
166
|
- !ruby/object:Gem::Version
|
167
167
|
version: '0'
|
168
168
|
requirements: []
|
169
|
-
rubygems_version: 3.
|
169
|
+
rubygems_version: 3.2.3
|
170
170
|
signing_key:
|
171
171
|
specification_version: 4
|
172
172
|
summary: Rux view components on Rails.
|