ruby2html 1.5.5 → 1.5.7

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: 25986366d74cfc6ab633d56affe1237d3fe796af18942954ea76a3db524d4371
4
- data.tar.gz: 590ebdf14101a46c9421770c1de0427c8db0aaa36e21e6a77a4349eee99d3a18
3
+ metadata.gz: 4c498562007af49a60be8dd1d6940906d3d58f6eee36b9de93765da5ece5d1a0
4
+ data.tar.gz: b82ef6779e2f18d5330e0280e487461d6c6d8da18464627015675b4853e6a0cf
5
5
  SHA512:
6
- metadata.gz: 2ca7d36a57c334b40e4244f06de1e037ed16d7ae3c70dbd0e6754decf8ff16e1277351d1514993cda2095e8013ffeb7283b87954ec415b29977e6ea9cf2f78e0
7
- data.tar.gz: fde8daef7e52baf0bf51a7772121f1459287f7d1400b9f5984c1c8a331841cab5c74de90778dec5e0600f8a10df0d88fe4e223b3cd3f15afbb0c2c4db424be00
6
+ metadata.gz: 1a6c7fae2edab3ea80ce2dca50fff2802ed11919d0eff2c4875b64c9feb81812c4f5e1a7bcd1dcd2064c0d9103497f17eb55d563023d6a2f3847edd5e05ebdae
7
+ data.tar.gz: 9fca95689d5bc91c3b19a154f218498065b79a7f463c520d1d0c84bc21cf4d4a9d5e7d41a4323ed745a322da14f37590160637de5a176e61451bac3beca78fbf
@@ -1,7 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'htmlbeautifier'
4
-
5
3
  module Ruby2html
6
4
  class HtmlBeautifierMiddleware
7
5
  def initialize(app)
@@ -6,10 +6,6 @@ module Ruby2html
6
6
  self.default_format = :html
7
7
 
8
8
  def self.call(template, source)
9
- new.call(template, source)
10
- end
11
-
12
- def call(template, source)
13
9
  <<-RUBY
14
10
  begin
15
11
  previous_renderer = Thread.current[:__ruby2html_renderer__]
@@ -1,8 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'cgi'
4
- require 'stringio'
5
-
6
3
  module Ruby2html
7
4
  class Render
8
5
  HTML5_TAGS = %w[
@@ -22,7 +19,7 @@ module Ruby2html
22
19
  attr_reader :output
23
20
  attr_accessor :current_output
24
21
 
25
- def initialize(context, &root)
22
+ def initialize(context = nil, &root)
26
23
  @context = context
27
24
  @root = root
28
25
  @output = StringIO.new
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ruby2html
4
- VERSION = '1.5.5'
4
+ VERSION = '1.5.7'
5
5
  end
data/lib/gem/ruby2html.rb CHANGED
@@ -1,5 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'cgi'
4
+ require 'stringio'
5
+ require 'htmlbeautifier'
6
+
3
7
  Dir.glob(File.join(File.dirname(__FILE__), 'ruby2html', '**', '*.rb')).each do |file|
4
8
  require file
5
9
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2html
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.5
4
+ version: 1.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - sebi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-08-17 00:00:00.000000000 Z
11
+ date: 2024-11-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlbeautifier
@@ -68,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
68
  - !ruby/object:Gem::Version
69
69
  version: '0'
70
70
  requirements: []
71
- rubygems_version: 3.5.11
71
+ rubygems_version: 3.5.17
72
72
  signing_key:
73
73
  specification_version: 4
74
74
  summary: Transform Ruby code into beautiful, structured HTML