html_skeleton 0.5.0 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +1 -1
- data/README.md +1 -0
- data/lib/html_skeleton.rb +2 -0
- data/lib/html_skeleton_calendar.rb +3 -2
- data/lib/html_skeleton_table.rb +3 -1
- metadata +7 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 257a4b33a0eeab346e831a3fbc7c68f32d1fb9e80abf203f3211b1ed8c020c3a
|
4
|
+
data.tar.gz: 64bb363bc93a4e2d9ea2a035daf45a1a25db7c90944b32ee6116789cea5038de
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05b1b6a13f30ff52c60ba2da4ef461feb82f2b1220b54e08583e84fdf5b010073ff7c928d63d503ae909c3d4390bcaacc1b4a454d8d5d03bff0c2bb8a4df06a8
|
7
|
+
data.tar.gz: 2b8c3c6a928688b71ddf6191c6fe531ba95afef11a245f4f37b76518c1760733da9b381a2fd5255bb8d3a7e1660559fe546ac841f34b36677533a0948b98d528
|
data/MIT-LICENSE
CHANGED
data/README.md
CHANGED
data/lib/html_skeleton.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'date'
|
2
4
|
|
3
5
|
# calendar methods ###################################################
|
@@ -41,7 +43,7 @@ class HtmlSkeleton
|
|
41
43
|
first = Date.civil(year, month, 1)
|
42
44
|
last = Date.civil(year, month, -1)
|
43
45
|
|
44
|
-
cal = '<tr>'
|
46
|
+
cal = '<tr>'.dup
|
45
47
|
cal << '<td></td>' * days_between(first_weekday, first.wday)
|
46
48
|
first.upto(last) { |cur|
|
47
49
|
cal << a_day(cur, today, cell_proc)
|
@@ -56,7 +58,6 @@ class HtmlSkeleton
|
|
56
58
|
attrs += ' weekendDay' if weekend?(date)
|
57
59
|
attrs += ' today' if date == today
|
58
60
|
"<td class=\"#{attrs}\">#{block.call(date)}</td>"
|
59
|
-
# "<td class=\"#{attrs}\">##</td>"
|
60
61
|
end
|
61
62
|
|
62
63
|
def weekend?(date)
|
data/lib/html_skeleton_table.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'date'
|
2
4
|
|
3
5
|
# table methods ######################################################
|
@@ -6,7 +8,7 @@ class HtmlSkeleton
|
|
6
8
|
def table_header(cols)
|
7
9
|
legend = @options[:legend]
|
8
10
|
th_attribute = @options[:th_attribute]
|
9
|
-
return ''
|
11
|
+
return '' unless legend
|
10
12
|
|
11
13
|
proc = @options[:col_legend]
|
12
14
|
col_header = cols.collect { |col|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: html_skeleton
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dittmar Krall
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -28,14 +28,14 @@ dependencies:
|
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '13'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '13'
|
41
41
|
description: |2
|
@@ -58,7 +58,8 @@ files:
|
|
58
58
|
homepage: http://matique.de
|
59
59
|
licenses:
|
60
60
|
- MIT
|
61
|
-
metadata:
|
61
|
+
metadata:
|
62
|
+
source_code_uri: https://github.com/matique/html_skeleton
|
62
63
|
post_install_message:
|
63
64
|
rdoc_options: []
|
64
65
|
require_paths:
|
@@ -74,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
74
75
|
- !ruby/object:Gem::Version
|
75
76
|
version: '0'
|
76
77
|
requirements: []
|
77
|
-
rubygems_version: 3.
|
78
|
+
rubygems_version: 3.2.6
|
78
79
|
signing_key:
|
79
80
|
specification_version: 4
|
80
81
|
summary: A simple helper for creating HTML calendars and tables
|