rux-rails 1.0.0 → 1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: eeccc1d46691172273909d2ac405d00ea46b40a0392b1e68eec1bbdc08b4f288
4
- data.tar.gz: c5ede37123f7a3ea9aa0b46924a97f83704377110b5fef70b70b57074135e482
3
+ metadata.gz: 698758e997b3a5940f124dc08e0b2846ba6615c2e8596ed05262b87974a1aa66
4
+ data.tar.gz: e9418ca9e2d146f99f16f803bb83cb4e11bb5595338368946e404db1a24c0ba0
5
5
  SHA512:
6
- metadata.gz: cb8a54563f48615528db9d08aa3275d72dd932a91f4f62df80d5b7a70f4c00eac0b2f488f41497be90e6c7e3c06c1ce69d3e6be5e15c41d4519b846c7c7f20b5
7
- data.tar.gz: f16f0a4456ee9d6d503e248da29f2cee8f476dde3acb339ab93ae6ddf31e44ebbf9ea56964c46edad685e616c9333561b126eb38fbcf9f42ab0d313bd25b1e76
6
+ metadata.gz: a3ebfa53191c9abb957db5ca1696171a290d6bfb3f5ae382158422ca49d2720cc2d6f77c728b584f67b56905908d9e7047f5a5727d0e0a7f27696788594c75ac
7
+ data.tar.gz: 964d4722675dc47d496cc62542b5972ab28bc93f301da41a0ce160f63d41b43eac8486cb2d34b815ec7eceabaf6a24e82813dec3ec8c983e55415a24c49169a2
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## 1.1.0
2
+ * Add `ActiveSupport::SafeBuffer` subclass to handle arrays (#1, @jaredcwhite)
3
+
4
+ ## 1.0.0
5
+ * Birthday!
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- ## rux-rails [![Build Status](https://travis-ci.com/camertron/rux-rails.svg?branch=master)](https://travis-ci.com/camertron/rux-rails)
1
+ ## rux-rails
2
+
3
+ ![Unit Tests](https://github.com/camertron/rux-rails/actions/workflows/unit_tests.yml/badge.svg?branch=master)
2
4
 
3
5
  Easily write [rux](https://github.com/camertron/rux) view components in Rails.
4
6
 
data/lib/rux-rails.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module RuxRails
2
2
  autoload :Components, 'rux-rails/components'
3
+ autoload :SafeBuffer, 'rux-rails/safe_buffer'
3
4
  autoload :TagBuilder, 'rux-rails/tag_builder'
4
5
  autoload :TemplateHandler, 'rux-rails/template_handler'
5
6
  autoload :Visitor, 'rux-rails/visitor'
@@ -48,8 +49,7 @@ end
48
49
  require 'rux'
49
50
  require 'rux-rails/railtie'
50
51
  require 'view_component/engine'
51
- require 'active_support'
52
52
 
53
53
  ViewComponent::Base.send(:include, RuxRails::Components)
54
54
  Rux.tag_builder = RuxRails.tag_builder
55
- Rux.buffer = ActiveSupport::SafeBuffer
55
+ Rux.buffer = RuxRails::SafeBuffer
@@ -0,0 +1,13 @@
1
+ require 'active_support'
2
+
3
+ module RuxRails
4
+ class SafeBuffer < ActiveSupport::SafeBuffer
5
+ def <<(value)
6
+ if value.is_a?(Array)
7
+ super(value.map { |v| html_escape_interpolated_argument(v) }.join.html_safe)
8
+ else
9
+ super
10
+ end
11
+ end
12
+ end
13
+ end
@@ -1,3 +1,3 @@
1
1
  module RuxRails
2
- VERSION = '1.0.0'
2
+ VERSION = '1.1.0'
3
3
  end
@@ -2116,3 +2116,30 @@ Processing by HomeController#index as HTML
2116
2116
  Rendered home/index.html.ruxt within layouts/application (Duration: 74.7ms | Allocations: 46030)
2117
2117
  Rendered layout layouts/application.html.erb (Duration: 75.1ms | Allocations: 46175)
2118
2118
  Completed 200 OK in 85ms (Views: 80.5ms | Allocations: 52169)
2119
+ Started GET "/" for 127.0.0.1 at 2021-06-11 11:29:47 -0700
2120
+ Processing by HomeController#index as HTML
2121
+ Rendering home/index.html.ruxt within layouts/application
2122
+ Rendered home/index.html.ruxt within layouts/application (128.8ms)
2123
+ Completed 200 OK in 141ms (Views: 139.6ms)
2124
+ Started GET "/" for 127.0.0.1 at 2021-06-11 11:29:51 -0700
2125
+ Processing by HomeController#index as HTML
2126
+ Rendering home/index.html.ruxt within layouts/application
2127
+ Rendered home/index.html.ruxt within layouts/application (93.7ms)
2128
+ Completed 200 OK in 101ms (Views: 101.0ms)
2129
+ Started GET "/" for 127.0.0.1 at 2021-06-11 11:29:55 -0700
2130
+ Processing by HomeController#index as HTML
2131
+ Rendering home/index.html.ruxt within layouts/application
2132
+ Rendered home/index.html.ruxt within layouts/application (95.6ms)
2133
+ Completed 200 OK in 105ms (Views: 104.0ms)
2134
+ Started GET "/" for 127.0.0.1 at 2021-06-11 11:29:59 -0700
2135
+ Processing by HomeController#index as HTML
2136
+ Rendering home/index.html.ruxt within layouts/application
2137
+ Rendered home/index.html.ruxt within layouts/application (Duration: 69.9ms | Allocations: 46408)
2138
+ Completed 200 OK in 90ms (Views: 77.5ms | Allocations: 53004)
2139
+ Started GET "/" for 127.0.0.1 at 2021-06-11 11:30:02 -0700
2140
+ Processing by HomeController#index as HTML
2141
+ Rendering layout layouts/application.html.erb
2142
+ Rendering home/index.html.ruxt within layouts/application
2143
+ Rendered home/index.html.ruxt within layouts/application (Duration: 71.3ms | Allocations: 46024)
2144
+ Rendered layout layouts/application.html.erb (Duration: 71.7ms | Allocations: 46168)
2145
+ Completed 200 OK in 84ms (Views: 78.3ms | Allocations: 52164)
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.0.0
4
+ version: 1.1.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-04-06 00:00:00.000000000 Z
11
+ date: 2021-06-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rux
@@ -59,6 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
+ - CHANGELOG.md
62
63
  - Gemfile
63
64
  - LICENSE
64
65
  - README.md
@@ -74,6 +75,7 @@ files:
74
75
  - lib/rux-rails/ext/bootsnap/autoload.rb
75
76
  - lib/rux-rails/ext/zeitwerk/loader.rb
76
77
  - lib/rux-rails/railtie.rb
78
+ - lib/rux-rails/safe_buffer.rb
77
79
  - lib/rux-rails/tag_builder.rb
78
80
  - lib/rux-rails/tasks/transpile.rake
79
81
  - lib/rux-rails/template_handler.rb