htmlutils 0.0.0.pre.dev → 0.0.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e8f45a15e275276378a9db0c798f13e14f8015c5
4
- data.tar.gz: cd59473a02894f5d33eef2c80fc3e387daa46e8d
3
+ metadata.gz: 123ed02fd787c977334c60bfaa7248291880740d
4
+ data.tar.gz: 84a854b88d8d43a59b9dd01efceee9ee5716f33e
5
5
  SHA512:
6
- metadata.gz: dd600eb753ffdde8658581f8127004d94ae9489fb99d42ae391f860bdb551b8390ef4939ca35852d5a01b3483053e8bb372e19bbf91bf135bd6131c05c6376f0
7
- data.tar.gz: 796a152ef1b929bbc520d9e58bf9295509e9c598a3484f44f1b390472930e306c449908916956ee1dda55d8da031133770080884f16ac661dc2922cf09792b35
6
+ metadata.gz: 06bbeb16429054ff06175aec2534e00c44753f2744de02522650b3335d1385d7812bd5cd55b2638b4854b1ea1747023aeed187d4cad9211a93e161f37a63fe3d
7
+ data.tar.gz: 78f89a95c26b74f778af5ce86adab320537a438b9d75006099b1a4a360a70f7d257a9baec8205dc3e761279ec73f5c24d8a5e55357af8e3381838f655c3ee644
@@ -0,0 +1,3 @@
1
+ *.gem
2
+ bin/
3
+ pkg
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in htmlutils.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Nickolay
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
@@ -0,0 +1 @@
1
+ NYI
@@ -0,0 +1,9 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ task :default => :spec
5
+
6
+ desc "Run tests"
7
+ Rake::TestTask.new do |t|
8
+ t.libs << "test"
9
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'htmlutils/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "htmlutils"
8
+ spec.version = HtmlUtils::VERSION
9
+ spec.authors = ["Nickolay"]
10
+ spec.email = ["nickolay02@inbox.ru"]
11
+
12
+ spec.summary = %q{Some utils for writing shorter HTML (ERB) code}
13
+ spec.description = %q{}
14
+ spec.homepage = "https://github.com/handicraftsman/htmlutils"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_development_dependency "bundler", "~> 1.13"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ end
@@ -0,0 +1,3 @@
1
+ require "htmlutils/version"
2
+ require "htmlutils/macro"
3
+
@@ -0,0 +1,40 @@
1
+ module HtmlUtils
2
+ puts self.instance_methods
3
+
4
+ def loadScripts(urls, type="text/javascript")
5
+ str = ""
6
+ urls.each do |url|
7
+ str << %{<script type="#{type}" src="#{url}"></script>\n}
8
+ end
9
+ str
10
+ end
11
+
12
+ def loadStyles(urls, type="text/css")
13
+ str = ""
14
+ urls.each do |url|
15
+ str << %{<link type="#{type}" rel="stylesheet" src="#{url}"}
16
+ end
17
+ end
18
+
19
+ def self.makeVTable(data)
20
+ str = ""
21
+ str << "<table>\n"
22
+ str << " <tr>\n"
23
+ data.each do |d|
24
+ str << %{ <th>#{d[0]}</th>\n}
25
+ end
26
+
27
+ str << " </tr>\n"
28
+
29
+ data.each do |d|
30
+ str << " <tr>\n"
31
+ d[1..-1].each do |d1|
32
+ str << " <td>#{d1}</td>\n"
33
+ end
34
+ str << " </tr>\n"
35
+ end
36
+
37
+ str << "</table>\n"
38
+ end
39
+ end
40
+
@@ -0,0 +1,3 @@
1
+ module HtmlUtils
2
+ VERSION = "0.0.1"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: htmlutils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.0.pre.dev
4
+ version: 0.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nickolay
@@ -44,7 +44,16 @@ email:
44
44
  executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
- files: []
47
+ files:
48
+ - ".gitignore"
49
+ - Gemfile
50
+ - LICENSE.txt
51
+ - README.md
52
+ - Rakefile
53
+ - htmlutils.gemspec
54
+ - lib/htmlutils.rb
55
+ - lib/htmlutils/macro.rb
56
+ - lib/htmlutils/version.rb
48
57
  homepage: https://github.com/handicraftsman/htmlutils
49
58
  licenses:
50
59
  - MIT
@@ -60,13 +69,13 @@ required_ruby_version: !ruby/object:Gem::Requirement
60
69
  version: '0'
61
70
  required_rubygems_version: !ruby/object:Gem::Requirement
62
71
  requirements:
63
- - - ">"
72
+ - - ">="
64
73
  - !ruby/object:Gem::Version
65
- version: 1.3.1
74
+ version: '0'
66
75
  requirements: []
67
76
  rubyforge_project:
68
77
  rubygems_version: 2.5.1
69
78
  signing_key:
70
79
  specification_version: 4
71
- summary: Some urils for writing shorter HTML (ERB) code
80
+ summary: Some utils for writing shorter HTML (ERB) code
72
81
  test_files: []