semantic_date_time_tags 0.1.13 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.github/workflows/ruby.yml +30 -0
- data/.rubocop.yml +6 -0
- data/.ruby-version +1 -0
- data/CHANGELOG.md +13 -0
- data/Gemfile +3 -1
- data/Gemfile.lock +162 -131
- data/Guardfile +4 -2
- data/README.md +1 -1
- data/Rakefile +7 -5
- data/lib/semantic_date_time_tags.rb +3 -1
- data/lib/semantic_date_time_tags/engine.rb +4 -2
- data/lib/semantic_date_time_tags/format_parser.rb +31 -25
- data/lib/semantic_date_time_tags/railtie.rb +5 -3
- data/lib/semantic_date_time_tags/tag.rb +48 -57
- data/lib/semantic_date_time_tags/tag/date.rb +12 -10
- data/lib/semantic_date_time_tags/tag/date_range.rb +22 -25
- data/lib/semantic_date_time_tags/tag/date_time.rb +19 -14
- data/lib/semantic_date_time_tags/tag/time.rb +9 -10
- data/lib/semantic_date_time_tags/version.rb +3 -1
- data/lib/semantic_date_time_tags/view_helpers.rb +8 -8
- data/semantic_date_time_tags.gemspec +9 -7
- data/test/semantic_date_time_tags/format_parser_test.rb +43 -43
- data/test/semantic_date_time_tags/semantic_date_range_test.rb +71 -0
- data/test/semantic_date_time_tags/semantic_date_tag_test.rb +61 -0
- data/test/semantic_date_time_tags/semantic_date_time_tag_test.rb +49 -0
- data/test/semantic_date_time_tags/semantic_time_tag_test.rb +90 -0
- data/test/test_helper.rb +10 -13
- metadata +27 -20
- data/.coveralls.yml +0 -1
- data/.travis.yml +0 -13
- data/test/semantic_date_time_tags/view_helpers_test.rb +0 -212
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c3f76d5246ac9a6a66d06cc053902dda4c35e8f7d3b77537368a8f34232e13f2
|
4
|
+
data.tar.gz: '0822888b686b4917cc00ee6b35711f42fc6be6530b46086d4269b6c03d6e4a57'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 91fac8e502610b004c5bb51de9862d0888756866867cd0d1092a63296106074396caab266c1dcca07df8ad93fcdb61469104b751c95648a2805c7ef07831f3d0
|
7
|
+
data.tar.gz: 7038aecae63702f829c16dd119eb3f742132cbd882c94bcecb421a20d1bee0b0befbbc8da84b88c0f84c3265cb3d1d7d76c5adf07734a8ef10ee9469e26b8217
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# This workflow uses actions that are not certified by GitHub.
|
2
|
+
# They are provided by a third-party and are governed by
|
3
|
+
# separate terms of service, privacy policy, and support
|
4
|
+
# documentation.
|
5
|
+
# This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
|
6
|
+
# For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
|
7
|
+
|
8
|
+
name: Ruby
|
9
|
+
|
10
|
+
on:
|
11
|
+
push:
|
12
|
+
branches: [ '**' ]
|
13
|
+
pull_request:
|
14
|
+
branches: [ '**' ]
|
15
|
+
|
16
|
+
jobs:
|
17
|
+
test:
|
18
|
+
|
19
|
+
runs-on: ubuntu-latest
|
20
|
+
|
21
|
+
steps:
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- name: Set up Ruby
|
24
|
+
uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: 2.7.2
|
27
|
+
- name: Install dependencies
|
28
|
+
run: bundle install
|
29
|
+
- name: Run tests
|
30
|
+
run: bundle exec rake
|
data/.rubocop.yml
ADDED
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.7.2
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## 0.2.0
|
4
|
+
|
5
|
+
* added possibility to pass in data attributes to both `time` and `span` tags (date range)
|
6
|
+
|
7
|
+
## 0.1.19
|
8
|
+
|
9
|
+
* removed `:format` from options passed to the `time` tag (in effect producing invalid HTML)
|
10
|
+
|
11
|
+
## 0.1.18
|
12
|
+
|
13
|
+
* removed `:separator` from options passed to the `time` tag (in effect producing invalid HTML)
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,183 +1,214 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
semantic_date_time_tags (0.
|
5
|
-
rails (>= 3
|
4
|
+
semantic_date_time_tags (0.2.0)
|
5
|
+
rails (>= 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (
|
11
|
-
actionpack (=
|
12
|
-
nio4r (~>
|
13
|
-
websocket-driver (
|
14
|
-
|
15
|
-
actionpack (=
|
16
|
-
|
17
|
-
|
10
|
+
actioncable (6.0.3.4)
|
11
|
+
actionpack (= 6.0.3.4)
|
12
|
+
nio4r (~> 2.0)
|
13
|
+
websocket-driver (>= 0.6.1)
|
14
|
+
actionmailbox (6.0.3.4)
|
15
|
+
actionpack (= 6.0.3.4)
|
16
|
+
activejob (= 6.0.3.4)
|
17
|
+
activerecord (= 6.0.3.4)
|
18
|
+
activestorage (= 6.0.3.4)
|
19
|
+
activesupport (= 6.0.3.4)
|
20
|
+
mail (>= 2.7.1)
|
21
|
+
actionmailer (6.0.3.4)
|
22
|
+
actionpack (= 6.0.3.4)
|
23
|
+
actionview (= 6.0.3.4)
|
24
|
+
activejob (= 6.0.3.4)
|
18
25
|
mail (~> 2.5, >= 2.5.4)
|
19
26
|
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (
|
21
|
-
actionview (=
|
22
|
-
activesupport (=
|
23
|
-
rack (~> 2.0)
|
24
|
-
rack-test (
|
27
|
+
actionpack (6.0.3.4)
|
28
|
+
actionview (= 6.0.3.4)
|
29
|
+
activesupport (= 6.0.3.4)
|
30
|
+
rack (~> 2.0, >= 2.0.8)
|
31
|
+
rack-test (>= 0.6.3)
|
25
32
|
rails-dom-testing (~> 2.0)
|
26
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
27
|
-
|
28
|
-
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
34
|
+
actiontext (6.0.3.4)
|
35
|
+
actionpack (= 6.0.3.4)
|
36
|
+
activerecord (= 6.0.3.4)
|
37
|
+
activestorage (= 6.0.3.4)
|
38
|
+
activesupport (= 6.0.3.4)
|
39
|
+
nokogiri (>= 1.8.5)
|
40
|
+
actionview (6.0.3.4)
|
41
|
+
activesupport (= 6.0.3.4)
|
29
42
|
builder (~> 3.1)
|
30
|
-
|
43
|
+
erubi (~> 1.4)
|
31
44
|
rails-dom-testing (~> 2.0)
|
32
|
-
rails-html-sanitizer (~> 1.
|
33
|
-
activejob (
|
34
|
-
activesupport (=
|
45
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
46
|
+
activejob (6.0.3.4)
|
47
|
+
activesupport (= 6.0.3.4)
|
35
48
|
globalid (>= 0.3.6)
|
36
|
-
activemodel (
|
37
|
-
activesupport (=
|
38
|
-
activerecord (
|
39
|
-
activemodel (=
|
40
|
-
activesupport (=
|
41
|
-
|
42
|
-
|
49
|
+
activemodel (6.0.3.4)
|
50
|
+
activesupport (= 6.0.3.4)
|
51
|
+
activerecord (6.0.3.4)
|
52
|
+
activemodel (= 6.0.3.4)
|
53
|
+
activesupport (= 6.0.3.4)
|
54
|
+
activestorage (6.0.3.4)
|
55
|
+
actionpack (= 6.0.3.4)
|
56
|
+
activejob (= 6.0.3.4)
|
57
|
+
activerecord (= 6.0.3.4)
|
58
|
+
marcel (~> 0.3.1)
|
59
|
+
activesupport (6.0.3.4)
|
43
60
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
44
|
-
i18n (
|
61
|
+
i18n (>= 0.7, < 2)
|
45
62
|
minitest (~> 5.1)
|
46
63
|
tzinfo (~> 1.1)
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
term-ansicolor (~> 1.3)
|
56
|
-
thor (~> 0.19.1)
|
57
|
-
docile (1.1.5)
|
58
|
-
domain_name (0.5.25)
|
59
|
-
unf (>= 0.0.5, < 1.0.0)
|
60
|
-
erubis (2.7.0)
|
61
|
-
ffi (1.9.10)
|
64
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
65
|
+
ast (2.4.1)
|
66
|
+
builder (3.2.4)
|
67
|
+
coderay (1.1.3)
|
68
|
+
concurrent-ruby (1.1.7)
|
69
|
+
crass (1.0.6)
|
70
|
+
erubi (1.10.0)
|
71
|
+
ffi (1.13.1)
|
62
72
|
formatador (0.2.5)
|
63
|
-
globalid (0.
|
64
|
-
activesupport (>= 4.
|
65
|
-
guard (2.
|
73
|
+
globalid (0.4.2)
|
74
|
+
activesupport (>= 4.2.0)
|
75
|
+
guard (2.16.2)
|
66
76
|
formatador (>= 0.2.4)
|
67
|
-
listen (>= 2.7,
|
68
|
-
lumberjack (
|
77
|
+
listen (>= 2.7, < 4.0)
|
78
|
+
lumberjack (>= 1.0.12, < 2.0)
|
69
79
|
nenv (~> 0.1)
|
70
80
|
notiffany (~> 0.0)
|
71
81
|
pry (>= 0.9.12)
|
72
82
|
shellany (~> 0.0)
|
73
83
|
thor (>= 0.18.1)
|
74
84
|
guard-compat (1.2.1)
|
75
|
-
guard-minitest (2.4.
|
85
|
+
guard-minitest (2.4.6)
|
76
86
|
guard-compat (~> 1.2)
|
77
87
|
minitest (>= 3.0)
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
loofah (2.0.3)
|
88
|
+
i18n (1.8.5)
|
89
|
+
concurrent-ruby (~> 1.0)
|
90
|
+
listen (3.3.3)
|
91
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
92
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
93
|
+
loofah (2.8.0)
|
94
|
+
crass (~> 1.0.2)
|
86
95
|
nokogiri (>= 1.5.9)
|
87
|
-
lumberjack (1.
|
88
|
-
mail (2.
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
|
96
|
+
lumberjack (1.2.8)
|
97
|
+
mail (2.7.1)
|
98
|
+
mini_mime (>= 0.1.1)
|
99
|
+
marcel (0.3.3)
|
100
|
+
mimemagic (~> 0.3.2)
|
101
|
+
method_source (1.0.0)
|
102
|
+
mimemagic (0.3.5)
|
103
|
+
mini_mime (1.0.2)
|
104
|
+
mini_portile2 (2.4.0)
|
105
|
+
minitest (5.14.2)
|
106
|
+
nenv (0.3.0)
|
107
|
+
nio4r (2.5.4)
|
108
|
+
nokogiri (1.10.10)
|
109
|
+
mini_portile2 (~> 2.4.0)
|
110
|
+
notiffany (0.1.3)
|
101
111
|
nenv (~> 0.1)
|
102
112
|
shellany (~> 0.0)
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
rack
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
|
120
|
-
|
121
|
-
|
113
|
+
parallel (1.20.1)
|
114
|
+
parser (2.7.2.0)
|
115
|
+
ast (~> 2.4.1)
|
116
|
+
pry (0.13.1)
|
117
|
+
coderay (~> 1.1)
|
118
|
+
method_source (~> 1.0)
|
119
|
+
rack (2.2.3)
|
120
|
+
rack-test (1.1.0)
|
121
|
+
rack (>= 1.0, < 3)
|
122
|
+
rails (6.0.3.4)
|
123
|
+
actioncable (= 6.0.3.4)
|
124
|
+
actionmailbox (= 6.0.3.4)
|
125
|
+
actionmailer (= 6.0.3.4)
|
126
|
+
actionpack (= 6.0.3.4)
|
127
|
+
actiontext (= 6.0.3.4)
|
128
|
+
actionview (= 6.0.3.4)
|
129
|
+
activejob (= 6.0.3.4)
|
130
|
+
activemodel (= 6.0.3.4)
|
131
|
+
activerecord (= 6.0.3.4)
|
132
|
+
activestorage (= 6.0.3.4)
|
133
|
+
activesupport (= 6.0.3.4)
|
134
|
+
bundler (>= 1.3.0)
|
135
|
+
railties (= 6.0.3.4)
|
122
136
|
sprockets-rails (>= 2.0.0)
|
123
|
-
rails-dom-testing (2.0.
|
124
|
-
activesupport (>= 4.2.0
|
125
|
-
nokogiri (
|
126
|
-
rails-html-sanitizer (1.0
|
127
|
-
loofah (~> 2.
|
128
|
-
railties (
|
129
|
-
actionpack (=
|
130
|
-
activesupport (=
|
137
|
+
rails-dom-testing (2.0.3)
|
138
|
+
activesupport (>= 4.2.0)
|
139
|
+
nokogiri (>= 1.6)
|
140
|
+
rails-html-sanitizer (1.3.0)
|
141
|
+
loofah (~> 2.3)
|
142
|
+
railties (6.0.3.4)
|
143
|
+
actionpack (= 6.0.3.4)
|
144
|
+
activesupport (= 6.0.3.4)
|
131
145
|
method_source
|
132
146
|
rake (>= 0.8.7)
|
133
|
-
thor (>= 0.
|
134
|
-
|
135
|
-
|
136
|
-
rb-
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
147
|
+
thor (>= 0.20.3, < 2.0)
|
148
|
+
rainbow (3.0.0)
|
149
|
+
rake (13.0.1)
|
150
|
+
rb-fsevent (0.10.4)
|
151
|
+
rb-inotify (0.10.1)
|
152
|
+
ffi (~> 1.0)
|
153
|
+
regexp_parser (2.0.0)
|
154
|
+
rexml (3.2.4)
|
155
|
+
rubocop (1.5.2)
|
156
|
+
parallel (~> 1.10)
|
157
|
+
parser (>= 2.7.1.5)
|
158
|
+
rainbow (>= 2.2.2, < 4.0)
|
159
|
+
regexp_parser (>= 1.8, < 3.0)
|
160
|
+
rexml
|
161
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
162
|
+
ruby-progressbar (~> 1.7)
|
163
|
+
unicode-display_width (>= 1.4.0, < 2.0)
|
164
|
+
rubocop-ast (1.3.0)
|
165
|
+
parser (>= 2.7.1.5)
|
166
|
+
rubocop-packaging (0.5.1)
|
167
|
+
rubocop (>= 0.89, < 2.0)
|
168
|
+
rubocop-performance (1.9.1)
|
169
|
+
rubocop (>= 0.90.0, < 2.0)
|
170
|
+
rubocop-ast (>= 0.4.0)
|
171
|
+
rubocop-rails (2.8.1)
|
172
|
+
activesupport (>= 4.2.0)
|
173
|
+
rack (>= 1.1)
|
174
|
+
rubocop (>= 0.87.0)
|
175
|
+
rubocop-rails_config (1.0.3)
|
176
|
+
railties (>= 5.0)
|
177
|
+
rubocop (>= 1.0)
|
178
|
+
rubocop-ast (>= 1.0.1)
|
179
|
+
rubocop-packaging (~> 0.4)
|
180
|
+
rubocop-performance (~> 1.3)
|
181
|
+
rubocop-rails (~> 2.0)
|
182
|
+
ruby-progressbar (1.10.1)
|
142
183
|
shellany (0.0.1)
|
143
|
-
|
144
|
-
docile (~> 1.1.0)
|
145
|
-
json (~> 1.8)
|
146
|
-
simplecov-html (~> 0.10.0)
|
147
|
-
simplecov-html (0.10.0)
|
148
|
-
slop (3.6.0)
|
149
|
-
sprockets (3.7.0)
|
184
|
+
sprockets (4.0.2)
|
150
185
|
concurrent-ruby (~> 1.0)
|
151
186
|
rack (> 1, < 3)
|
152
|
-
sprockets-rails (3.
|
187
|
+
sprockets-rails (3.2.2)
|
153
188
|
actionpack (>= 4.0)
|
154
189
|
activesupport (>= 4.0)
|
155
190
|
sprockets (>= 3.0.0)
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
thread_safe (0.3.5)
|
160
|
-
tins (1.6.0)
|
161
|
-
tzinfo (1.2.2)
|
191
|
+
thor (1.0.1)
|
192
|
+
thread_safe (0.3.6)
|
193
|
+
tzinfo (1.2.8)
|
162
194
|
thread_safe (~> 0.1)
|
163
|
-
|
164
|
-
|
165
|
-
unf_ext (0.0.7.1)
|
166
|
-
websocket-driver (0.6.4)
|
195
|
+
unicode-display_width (1.7.0)
|
196
|
+
websocket-driver (0.7.3)
|
167
197
|
websocket-extensions (>= 0.1.0)
|
168
|
-
websocket-extensions (0.1.
|
198
|
+
websocket-extensions (0.1.5)
|
199
|
+
zeitwerk (2.4.2)
|
169
200
|
|
170
201
|
PLATFORMS
|
171
202
|
ruby
|
172
203
|
|
173
204
|
DEPENDENCIES
|
174
|
-
bundler
|
175
|
-
coveralls
|
205
|
+
bundler
|
176
206
|
guard
|
177
207
|
guard-minitest
|
178
208
|
minitest
|
179
209
|
rake
|
210
|
+
rubocop-rails_config
|
180
211
|
semantic_date_time_tags!
|
181
212
|
|
182
213
|
BUNDLED WITH
|
183
|
-
1.
|
214
|
+
2.1.4
|
data/Guardfile
CHANGED
@@ -1,8 +1,10 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# A sample Guardfile
|
2
4
|
# More info at https://github.com/guard/guard#readme
|
3
5
|
|
4
6
|
guard :minitest do
|
5
7
|
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
6
8
|
watch(%r{^test/.+_test\.rb$})
|
7
|
-
watch(%r{^test/test_helper\.rb$}) {
|
8
|
-
end
|
9
|
+
watch(%r{^test/test_helper\.rb$}) { "test" }
|
10
|
+
end
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Semantic DateTime Tags
|
2
2
|
|
3
|
-
[![
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/semantic_date_time_tags.svg)](http://badge.fury.io/rb/semantic_date_time_tags)
|
4
4
|
|
5
5
|
Set of Rails helpers that mark up Date, DateTime instances and their ranges with sensible combination of (html5) tags, data attributes and CSS classes so that their display can be easily controlled via CSS.
|
6
6
|
|
data/Rakefile
CHANGED
@@ -1,9 +1,11 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require "bundler/gem_tasks"
|
4
|
+
require "rake/testtask"
|
3
5
|
|
4
6
|
Rake::TestTask.new do |t|
|
5
|
-
t.libs <<
|
6
|
-
t.pattern =
|
7
|
+
t.libs << "test"
|
8
|
+
t.pattern = "test/*/*_test.rb"
|
7
9
|
end
|
8
10
|
|
9
|
-
task :
|
11
|
+
task default: :test
|