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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56db184d22751726492ac71403572cd8a2834d0181aadc3ba867c88308cd249d
4
- data.tar.gz: da19bf08daca4345f61044155ea1e2829824614d02489bfdcb187f30cf6538f1
3
+ metadata.gz: 257a4b33a0eeab346e831a3fbc7c68f32d1fb9e80abf203f3211b1ed8c020c3a
4
+ data.tar.gz: 64bb363bc93a4e2d9ea2a035daf45a1a25db7c90944b32ee6116789cea5038de
5
5
  SHA512:
6
- metadata.gz: dbc2c9998eb15367256072d4c1963526f5225a72c5177a63d852ac587bf4f7a8aff7278c6558d2093a0eed9c9f1b2ced057cdfe65612112b99d9ed392d05c36a
7
- data.tar.gz: 138ab21b89eb023bdaddeff721831a96cceb5b7e5b85ec457dee7d043ffb04f6ec888f0acc2aae57e19af2b05b77668b6c8f1522abfcb2752dcc451584905b44
6
+ metadata.gz: 05b1b6a13f30ff52c60ba2da4ef461feb82f2b1220b54e08583e84fdf5b010073ff7c928d63d503ae909c3d4390bcaacc1b4a454d8d5d03bff0c2bb8a4df06a8
7
+ data.tar.gz: 2b8c3c6a928688b71ddf6191c6fe531ba95afef11a245f4f37b76518c1760733da9b381a2fd5255bb8d3a7e1660559fe546ac841f34b36677533a0948b98d528
data/MIT-LICENSE CHANGED
@@ -1,4 +1,4 @@
1
- Copyright 2012-2020 Dittmar Krall - http://matique.de
1
+ Copyright 2012-2021 Dittmar Krall - www.matique.com
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  HtmlSkeleton
2
2
  ============
3
+ [![Gem Version](https://badge.fury.io/rb/html_skeleton.png)](http://badge.fury.io/rb/html_skeleton)
3
4
 
4
5
  HtmlSkeleton provides the frame for a calendar or a table,
5
6
  i.e. no loops are required to build up the HTML structure.
data/lib/html_skeleton.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'date'
2
4
  require 'html_skeleton_calendar'
3
5
  require 'html_skeleton_table'
@@ -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)
@@ -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 '' unless legend
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.0
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: 2020-03-02 00:00:00.000000000 Z
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.0.8
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