creates_html_file 0.1.0

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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 9bcce2b5224a5761bca3750baa3fdf0cb460b303e8911769b7a9e819a49f1281
4
+ data.tar.gz: faa0a43640c462b6e0bd382ffde1bac00bce349857c089fb21a8727d3bcaf8d2
5
+ SHA512:
6
+ metadata.gz: 7aefc474c451997115133b37b5b1e3ed8d41f139e70f55a8a75a322ee41b9672ebfd380188a46768e6d4544d1ee20cd39d0f103250e8c5eeedf9b826cedc84bc
7
+ data.tar.gz: 83541949f6df530f684a7a3aff831835d924797bf5bfd2cf4d7a6c1eadd8bbb83be923122e258a957c098056910513f85052bf4742ac76e6e328bdafec7f2931
data/Gemfile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in creates_html_file.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # CreatesHtmlFile
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/creates_html_file`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add creates_html_file
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install creates_html_file
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+
25
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/creates_html_file.
data/Rakefile ADDED
@@ -0,0 +1,4 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ task default: %i[]
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module CreatesHtmlFile
4
+ VERSION = "0.1.0"
5
+ end
@@ -0,0 +1,39 @@
1
+ module CreatesHtmlFile
2
+ def creates_html_file(content=nil, arg="index")
3
+
4
+ hash_valid = content
5
+
6
+ contents = "<table>"
7
+ if hash_valid.any? {|k,v| v == "&#x1F480"}
8
+ content += "<h1>&#x1F480 тамагочи помер &#x1F480</h1>"
9
+ else
10
+ for k, v in content
11
+ contents += "<tr><td>#{k}</td><td>#{v}</td></tr>"
12
+ end
13
+ end
14
+ contents += "</table>"
15
+
16
+ html_temp = %[
17
+ <!DOCTYPE html>
18
+ <html lang="">
19
+ <head>
20
+ <meta charset="utf-8">
21
+ <title>моя сторінка</title>
22
+ </head>
23
+ <body>
24
+ <header></header>
25
+ <main>
26
+ #{contents}
27
+ </main>
28
+ <footer></footer>
29
+ </body>
30
+ </html>]
31
+
32
+ system "echo '#{html_temp}' > #{arg}.html"
33
+ end
34
+ end
35
+
36
+
37
+ class CreateHtml
38
+ include CreatesHtmlFile
39
+ end
@@ -0,0 +1,4 @@
1
+ module CreatesHtmlFile
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,49 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: creates_html_file
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - EduardKurbanov
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-11-04 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description: accepts content and stores content passed to the .html page.
14
+ email:
15
+ - edward89@ukr.net
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - Gemfile
21
+ - README.md
22
+ - Rakefile
23
+ - lib/creates_html_file.rb
24
+ - lib/creates_html_file/version.rb
25
+ - sig/creates_html_file.rbs
26
+ homepage: https://github.com/EduardKurbanov/gem_creates_html_file
27
+ licenses:
28
+ - MIT
29
+ metadata: {}
30
+ post_install_message:
31
+ rdoc_options: []
32
+ require_paths:
33
+ - lib
34
+ required_ruby_version: !ruby/object:Gem::Requirement
35
+ requirements:
36
+ - - ">="
37
+ - !ruby/object:Gem::Version
38
+ version: 2.6.0
39
+ required_rubygems_version: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: '0'
44
+ requirements: []
45
+ rubygems_version: 3.3.7
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: generates html.
49
+ test_files: []