TamagochiAddon 0.1.2 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/TamagochiAddon/version.rb +1 -1
- data/lib/TamagochiAddon.rb +21 -20
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 728b6d2e089e733578a95ffd14095a1cf807f5da6a5488dba5d9b2127fee5948
|
4
|
+
data.tar.gz: 1d9c52c2e356096249b522dcffe5f120e697eff519994af10c62bc5a2bd611c0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 995f1ef0dbc6c167c57b5232b16eac26d8c5060b128a214ac9eb642f227d2805c2c0f403511c2e79f194a9a82fa7334b1cee11c7fbcae8b3cc42d208c0b94e46
|
7
|
+
data.tar.gz: 8e7cbd169b0ec984e103c3f3ad37b206da6921675385af6651f2c86999b937a56b8b66246ca4aee337d20ad0b6b0bfd8ba86369a5f7fb99323ef3596a1483f46
|
data/lib/TamagochiAddon.rb
CHANGED
@@ -3,24 +3,25 @@
|
|
3
3
|
require_relative "TamagochiAddon/version"
|
4
4
|
require 'sanitize'
|
5
5
|
|
6
|
-
|
7
|
-
def make_html(content, name_file = 'index.html')
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
6
|
+
module TamagochiAddon
|
7
|
+
def make_html(content, name_file = 'index.html')
|
8
|
+
content = Sanitize.fragment(content, Sanitize::Config::RELAXED)
|
9
|
+
text = "<!DOCTYPE html> \n" \
|
10
|
+
"<html> \n" \
|
11
|
+
" <head>\n" \
|
12
|
+
" <meta charset=""utf-8"">\n" \
|
13
|
+
" <title>Tamagochi</title>\n" \
|
14
|
+
" <link\n" \
|
15
|
+
" href=""https://cdn.jsdelivr.net/npm/bootstrap@5.0.1/dist/css/bootstrap.min.css""\n" \
|
16
|
+
" rel=""stylesheet""\n" \
|
17
|
+
" integrity=""sha384-+0n0xVW2eSR5OomGNYDnhzAbDsOXxcvSN1TPprVMTNDbiYZCxYbOOl7+AMvyTG2x""\n" \
|
18
|
+
" crossorigin=""anonymous"">\n" \
|
19
|
+
" </head>\n" \
|
20
|
+
"<body class=""text-center"">\n" \
|
21
|
+
"#{content}\n" \
|
22
|
+
"</body>\n" \
|
23
|
+
"</html>\n"
|
24
|
+
|
25
|
+
File.open(name_file, "w") { |f| f.write text }
|
26
|
+
end
|
26
27
|
end
|