TamagochiAddon 0.1.0 → 0.1.2

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: 8eb500137ced51e6795a8c5e02be1f947572b4a769d346600b2a410787dd5359
4
- data.tar.gz: 7c49ff02b01fff1f4d813840dba5d19d2d09a5295db2115b3f8b1a84761b277f
3
+ metadata.gz: fb32cae01281f65bb95e3840676816b4096d0f851aa0ea258d18cdebc648ee34
4
+ data.tar.gz: 6db95a810d7803ea62a67a8bbf12c0f3de5b0217b234b519b881806cea1af350
5
5
  SHA512:
6
- metadata.gz: 7835b6efe2ece10deb91fb80cd4f105e0d1a6c143916dc53e822b4677c30a1b1865bb3ee720c358f4f9421347985de47644c6ad3399ebd0fa4b87c7e1f2605e7
7
- data.tar.gz: '04549cd26f97b98c82a9d938e70d5d173139797f4f3ef90b6f83b634899ca3d6b09c6c383ae462304d4e6090246e3c3274f1b7f09fb131845f22bcb78553f1b1'
6
+ metadata.gz: e55f901aa49c2f710935358b62597b4dcaa2f79bac65468be1707883391606a910c90aa8b98a3311c88ade48e1eda70c727120064aed850ca27b5971be1a13c7
7
+ data.tar.gz: 72cbc3f074d03db5be141003136b58a8c3f126b20f594c9eb46bebd174ed6f77695846393db67b9e92ff7c58340860321d3e54a3eb20980996afacb761451155
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TamagochiAddon
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.2"
5
5
  end
@@ -3,34 +3,24 @@
3
3
  require_relative "TamagochiAddon/version"
4
4
  require 'sanitize'
5
5
 
6
- module TamagochiAddon
7
- def make_html(content, name_file = 'index.html')
8
- content = Sanitize.fragment(content)
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
27
- end
28
6
 
29
- include TamagochiAddon
30
- make_html(" <div class=""card col-6"">\n" \
31
- " <h5 class=""card-header""><strong><%= @pet.name %></strong></h5>\n" \
32
- " <div class=""card-body"">\n" \
33
- " <h6 class=""card-subtitle"">43 апреля 2000 года</h6>\n" \
34
- " <a href="" class=""btn btn-primary"">Читать целиком</a>\n" \
35
- " </div>\n" \
36
- "</div>" )
7
+ def make_html(content, name_file = 'index.html')
8
+ content = Sanitize.fragment(content)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: TamagochiAddon
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
  - Serhii Dratovanyi