reactionview 0.0.1 → 0.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 +4 -4
- data/LICENSE.txt +21 -0
- data/README.md +39 -9
- data/Rakefile +7 -1
- data/app/assets/javascripts/reactionview-dev-tools.esm.js +1786 -0
- data/app/assets/javascripts/reactionview-dev-tools.esm.js.map +1 -0
- data/app/assets/javascripts/reactionview-dev-tools.umd.js +1796 -0
- data/app/assets/javascripts/reactionview-dev-tools.umd.js.map +1 -0
- data/lib/generators/reactionview/install_generator.rb +44 -0
- data/lib/reaction_view.rb +3 -0
- data/lib/reactionview/config.rb +39 -0
- data/lib/reactionview/railtie.rb +27 -0
- data/lib/reactionview/template/handlers/erb.rb +19 -0
- data/lib/reactionview/template/handlers/herb/herb.rb +92 -0
- data/lib/reactionview/template/handlers/herb.rb +44 -0
- data/lib/reactionview/version.rb +1 -1
- data/lib/reactionview.rb +21 -0
- data/reactionview.gemspec +39 -0
- metadata +56 -10
- data/.rubocop.yml +0 -13
- data/CODE_OF_CONDUCT.md +0 -132
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52984f3f284100d4b253bb060dd9cb87e86a43787a24dbac2a2641e3179c11ff
|
4
|
+
data.tar.gz: ab65023e55f476db753414fb77fb9b7a371c3fac6efe1b853602bb1d352f0545
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0c1956ec57530be50b225422ee7c738c6dd9afbe01ee684efba60f8527cc8d6ec0c009835d32fe8b39d83634e49d74dec18fc0c05899574f2fa9d43402af2217
|
7
|
+
data.tar.gz: 0f0aedfda8745ba7500df6b7ecfc6cd793ce89673c259a6d5e7d2b009e1b254dac1dd6ba5693077fa2daa7a5196984dd184c2ad38340c2a2682696a2c11a3cc6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2025 Marco Roth
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
CHANGED
@@ -1,25 +1,51 @@
|
|
1
|
-
|
1
|
+
<div align="center">
|
2
|
+
<img alt="ReActionView - Enhanced Rails templates" style="height: 256px" height="256px" src="https://github.com/marcoroth/reactionview/blob/main/assets/reactionview.png?raw=true">
|
3
|
+
</div>
|
2
4
|
|
3
|
-
|
5
|
+
<h2 align="center">ReActionView</h2>
|
6
|
+
|
7
|
+
<h4 align="center">A new ActionView-compatible ERB engine with modern DX - re-imagined with <a href="https://github.com/marcoroth/herb"><code>Herb::Engine</code></a>.</h4>
|
8
|
+
|
9
|
+
<div align="center">Seamless integration of Herb's HTML-aware ERB rendering engine into Rails applications. <br>Compatible with <code>.html.erb</code>, but with modern enhancements:
|
10
|
+
HTML validation, better error feedback, a developer-friendly debug mode, and more!</div><br/>
|
11
|
+
|
12
|
+
<p align="center">
|
13
|
+
<a href="https://rubygems.org/gems/reactionview"><img alt="Gem Version" src="https://img.shields.io/gem/v/reactionview"></a>
|
14
|
+
<a href="https://reactionview.dev"><img alt="Documentation" src="https://img.shields.io/badge/documentation-available-green"></a>
|
15
|
+
<a href="https://github.com/marcoroth/reactionview/blob/main/LICENSE.txt"><img alt="License" src="https://img.shields.io/github/license/marcoroth/reactionview"></a>
|
16
|
+
<a href="https://github.com/marcoroth/reactionview/issues"><img alt="Issues" src="https://img.shields.io/github/issues/marcoroth/reactionview"></a>
|
17
|
+
</p>
|
18
|
+
|
19
|
+
<br/><br/><br/>
|
4
20
|
|
5
21
|
## Installation
|
6
22
|
|
7
|
-
|
23
|
+
Add to your Rails application:
|
8
24
|
|
9
25
|
```bash
|
10
26
|
bundle add reactionview
|
27
|
+
rails generate reactionview:install
|
11
28
|
```
|
12
29
|
|
13
|
-
|
30
|
+
## Usage
|
14
31
|
|
15
|
-
|
16
|
-
gem install reactionview
|
17
|
-
```
|
32
|
+
ReActionView provides two ways to use enhanced template processing:
|
18
33
|
|
19
|
-
|
34
|
+
1. **Native `.html.herb` templates** - Automatically processed with `Herb::Engine`.
|
35
|
+
2. **Intercept `.html.erb` templates** - Enable in config to process all HTML+ERB templates with Herb.
|
36
|
+
|
37
|
+
### Configuration
|
20
38
|
|
21
39
|
```ruby
|
22
|
-
#
|
40
|
+
# config/initializers/reactionview.rb
|
41
|
+
|
42
|
+
ReActionView.configure do |config|
|
43
|
+
# Intercept .html.erb templates to use Herb::Engine
|
44
|
+
# config.intercept_erb = true
|
45
|
+
|
46
|
+
# Enable debug mode
|
47
|
+
config.debug_mode = Rails.env.development?
|
48
|
+
end
|
23
49
|
```
|
24
50
|
|
25
51
|
## Development
|
@@ -35,3 +61,7 @@ Bug reports and pull requests are welcome on GitHub at https://github.com/marcor
|
|
35
61
|
## Code of Conduct
|
36
62
|
|
37
63
|
Everyone interacting in the ReActionView project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/marcoroth/reactionview/blob/main/CODE_OF_CONDUCT.md).
|
64
|
+
|
65
|
+
## License
|
66
|
+
|
67
|
+
This project is available as open source under the terms of the [MIT License](https://github.com/marcoroth/reactionview/blob/main/LICENSE.txt).
|
data/Rakefile
CHANGED
@@ -3,8 +3,14 @@
|
|
3
3
|
require "bundler/gem_tasks"
|
4
4
|
require "minitest/test_task"
|
5
5
|
require "rubocop/rake_task"
|
6
|
+
require "rake/testtask"
|
6
7
|
|
7
|
-
Minitest::TestTask.create
|
8
8
|
RuboCop::RakeTask.new
|
9
9
|
|
10
|
+
Rake::TestTask.new(:test) do |t|
|
11
|
+
t.libs << "test"
|
12
|
+
t.libs << "lib"
|
13
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
14
|
+
end
|
15
|
+
|
10
16
|
task default: %i[test rubocop]
|