html_ina 0.1.0 → 0.1.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/html_ina.rb +9 -8
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f1df4067e04568800f1e579b4b8e05c4bde52b7d389e775298d3fda951724728
4
- data.tar.gz: 6408867913e706f51f55391ae20fd088115ef40da177a5fe0da886370b0ecc8d
3
+ metadata.gz: de79aa44b1f77f4e39f9d0457de6c0e558777f3f746f5212f5e657b8d225061d
4
+ data.tar.gz: fad89f0275f20459da3920ab68b7dcc16163721dc6615d7841feca5489bc6278
5
5
  SHA512:
6
- metadata.gz: 886eb0ed45923f83bb1f3fb9d2adc38fad6253fccc44029be7d26e2a3e779926bc1270cfa862281e4a8f2bebe45b839a35f9cb3da41fbdff2560330a8bfc10a6
7
- data.tar.gz: 2c80df8aaa7be63f6c0f1667b928e6fa0eb9484be11d7c1c4f8f0d33e344e1cf15df02c494e3019fb0c88ec0f2a7d23e0b9b36736575d94d49931e808e4bb396
6
+ metadata.gz: 29c49261a5d2b84f997eee632e8a08dbaa63f4f216c6a9fadcdea10bda5428714b034ed5c38133d4ed5bac607cd6ec2d065d871da5aac1854b0c884ce7f53eba
7
+ data.tar.gz: 0d4c46341d93d7f6a0e935877c8e98bf16e218394bb6f59cc71353c3d827d39db028b91d4fa3ad1252213fac1fc6d36ee5c4933f27e620e7c2f1fefaae53ff8f
data/lib/html_ina.rb CHANGED
@@ -1,18 +1,19 @@
1
- require 'sanitize'
1
+ class GetHtml
2
+ def get(content, bypass_html: false, file_name: 'index.html')
3
+ paste = content.gsub(/[<>]/, '') unless bypass_html
2
4
 
3
- class HTMLSaver
4
- def self.save(body, file_name: 'index.html', bypass_html: false)
5
- body = Sanitize.fragment(body) unless bypass_html
6
5
  File.open(file_name, 'w+') do |f|
7
6
  html = <<~HTML
8
- <!DOCTYPE html>
7
+ <!doctype html>
9
8
  <html lang="en">
10
9
  <head>
11
- <title>#{file_name}</title>
12
- <meta charset="utf-8">
10
+ <meta charset="UTF-8">
11
+ <title>#{file_name}</title>
13
12
  </head>
14
13
  <body>
15
- #{body}
14
+ <div class="info">
15
+ #{content}
16
+ </div>
16
17
  </body>
17
18
  </html>
18
19
  HTML
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html_ina
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nazar Volynets