ruby2html 1.3.3 → 1.4.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: bb194a11e2015f7caf7e2994f5db0c67fa9b8967c2e44906b3a036aba9eb1be6
4
- data.tar.gz: e60ff3a75bc735e3b084d0f3b91503f151564f3c9d82c9721e8dbc281d6c2283
3
+ metadata.gz: e39b469662602b3df3e2444c58474a8c412a90d3556de30c5d404e41f4358eb8
4
+ data.tar.gz: dbd03a556e2deebf9d795065de00768259c21dc76d9d248a1a6799c80faa5434
5
5
  SHA512:
6
- metadata.gz: bea7e7d8965f80fdf3aed3f92ecbc49f14630da3e832dae868836cfdcf1f60f8a439e3a82c850586462fa68adb3a39dcc58d35821a7b9554e3df8e8115083a33
7
- data.tar.gz: ba619ce95c33e4d96579bc4f423b2554a75160d11102d9f55dee7632ad7eb63d3e20bd21c3aaee4402a861e9f2e5b8a20aa08c03e3086654dec71072d42ff0f7
6
+ metadata.gz: edc9f77f24cdcc0cedd73f42750989abf6edf4df55ff40114d2543b2e895fa338caadbe9cea0e99f46a4b2f8c32ef42997e543a7e309ed8781181240e12d05e9
7
+ data.tar.gz: dbc116c78d40ce02a5ce228993e8803ad3afd64d43aabc543a1aa4ec407c4fa93b5d1192d9268f832b6a86bbe313e5df2faa878f0e1ec951a1741c0d3dd8f792
data/README.md CHANGED
@@ -49,6 +49,13 @@ plain '<div>Inline html</div>'.html_safe
49
49
  render partial: 'shared/navbar'
50
50
  ```
51
51
 
52
+ ### (Optional) Nicely Format the HTML
53
+
54
+ File: `config/environments/development.rb` or `config/environments/test.rb`
55
+ ```ruby
56
+ config.middleware.use Ruby2html::HtmlBeautifierMiddleware
57
+ ```
58
+
52
59
  #### Or use your current .erb views
53
60
 
54
61
  ### In your ApplicationController
@@ -2,7 +2,7 @@
2
2
 
3
3
  h1 'RbFiles'
4
4
  h1 'ok'
5
- h1 'ok'
5
+ h1 'okddwadwa'
6
6
 
7
7
  div @value
8
8
 
@@ -80,4 +80,6 @@ Rails.application.configure do
80
80
 
81
81
  # Apply autocorrection by RuboCop to files generated by `bin/rails generate`.
82
82
  # config.generators.apply_rubocop_autocorrect_after_generate!
83
+
84
+ config.middleware.use Ruby2html::HtmlBeautifierMiddleware
83
85
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ruby2html
4
- VERSION = '1.3.3'
4
+ VERSION = '1.4.0'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.3
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - sebi
@@ -9,7 +9,21 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
  date: 2024-08-10 00:00:00.000000000 Z
12
- dependencies: []
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: htmlbeautifier
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '1.4'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '1.4'
13
27
  description: Ruby2HTML empowers developers to write view logic in pure Ruby, seamlessly
14
28
  converting it into clean, well-formatted HTML. Enhance your templating workflow,
15
29
  improve readability, and leverage the full power of Ruby in your views. Features