semantic_date_time_tags 0.1.13 → 0.1.14
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 214992205dd337c46a4e02b106a5c7601388c7b1
|
4
|
+
data.tar.gz: 10c0a3dbec7349e53758ed2767c2d33c83ad814a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd9a6758bff9fb7c5c2339c42046b40dac9b1e1287464692e43ef38b8b71a2b783da80fbdbb819234221810fa043f7ba845ef35d9b3574c02130d32d17db6621
|
7
|
+
data.tar.gz: b4a3c1272e3153bb0f085d018aab6fed0db7893b2f23d85df841649aa155e2d02b8d817035232f149f9854785a0cc3991533f59f0479c20ee48806aad5df0e75
|
data/.travis.yml
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,70 +1,68 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
semantic_date_time_tags (0.1.
|
5
|
-
rails (>= 3
|
4
|
+
semantic_date_time_tags (0.1.14)
|
5
|
+
rails (>= 3)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
actioncable (5.0.0)
|
11
|
-
actionpack (= 5.0.0)
|
10
|
+
actioncable (5.0.0.1)
|
11
|
+
actionpack (= 5.0.0.1)
|
12
12
|
nio4r (~> 1.2)
|
13
13
|
websocket-driver (~> 0.6.1)
|
14
|
-
actionmailer (5.0.0)
|
15
|
-
actionpack (= 5.0.0)
|
16
|
-
actionview (= 5.0.0)
|
17
|
-
activejob (= 5.0.0)
|
14
|
+
actionmailer (5.0.0.1)
|
15
|
+
actionpack (= 5.0.0.1)
|
16
|
+
actionview (= 5.0.0.1)
|
17
|
+
activejob (= 5.0.0.1)
|
18
18
|
mail (~> 2.5, >= 2.5.4)
|
19
19
|
rails-dom-testing (~> 2.0)
|
20
|
-
actionpack (5.0.0)
|
21
|
-
actionview (= 5.0.0)
|
22
|
-
activesupport (= 5.0.0)
|
20
|
+
actionpack (5.0.0.1)
|
21
|
+
actionview (= 5.0.0.1)
|
22
|
+
activesupport (= 5.0.0.1)
|
23
23
|
rack (~> 2.0)
|
24
24
|
rack-test (~> 0.6.3)
|
25
25
|
rails-dom-testing (~> 2.0)
|
26
26
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
27
|
-
actionview (5.0.0)
|
28
|
-
activesupport (= 5.0.0)
|
27
|
+
actionview (5.0.0.1)
|
28
|
+
activesupport (= 5.0.0.1)
|
29
29
|
builder (~> 3.1)
|
30
30
|
erubis (~> 2.7.0)
|
31
31
|
rails-dom-testing (~> 2.0)
|
32
32
|
rails-html-sanitizer (~> 1.0, >= 1.0.2)
|
33
|
-
activejob (5.0.0)
|
34
|
-
activesupport (= 5.0.0)
|
33
|
+
activejob (5.0.0.1)
|
34
|
+
activesupport (= 5.0.0.1)
|
35
35
|
globalid (>= 0.3.6)
|
36
|
-
activemodel (5.0.0)
|
37
|
-
activesupport (= 5.0.0)
|
38
|
-
activerecord (5.0.0)
|
39
|
-
activemodel (= 5.0.0)
|
40
|
-
activesupport (= 5.0.0)
|
36
|
+
activemodel (5.0.0.1)
|
37
|
+
activesupport (= 5.0.0.1)
|
38
|
+
activerecord (5.0.0.1)
|
39
|
+
activemodel (= 5.0.0.1)
|
40
|
+
activesupport (= 5.0.0.1)
|
41
41
|
arel (~> 7.0)
|
42
|
-
activesupport (5.0.0)
|
42
|
+
activesupport (5.0.0.1)
|
43
43
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
44
44
|
i18n (~> 0.7)
|
45
45
|
minitest (~> 5.1)
|
46
46
|
tzinfo (~> 1.1)
|
47
|
-
arel (7.1.
|
47
|
+
arel (7.1.1)
|
48
48
|
builder (3.2.2)
|
49
|
-
coderay (1.1.
|
49
|
+
coderay (1.1.1)
|
50
50
|
concurrent-ruby (1.0.2)
|
51
|
-
coveralls (0.8.
|
52
|
-
json (
|
53
|
-
|
54
|
-
simplecov (~> 0.10.0)
|
51
|
+
coveralls (0.8.15)
|
52
|
+
json (>= 1.8, < 3)
|
53
|
+
simplecov (~> 0.12.0)
|
55
54
|
term-ansicolor (~> 1.3)
|
56
55
|
thor (~> 0.19.1)
|
56
|
+
tins (>= 1.6.0, < 2)
|
57
57
|
docile (1.1.5)
|
58
|
-
domain_name (0.5.25)
|
59
|
-
unf (>= 0.0.5, < 1.0.0)
|
60
58
|
erubis (2.7.0)
|
61
|
-
ffi (1.9.
|
59
|
+
ffi (1.9.14)
|
62
60
|
formatador (0.2.5)
|
63
61
|
globalid (0.3.7)
|
64
62
|
activesupport (>= 4.1.0)
|
65
|
-
guard (2.
|
63
|
+
guard (2.14.0)
|
66
64
|
formatador (>= 0.2.4)
|
67
|
-
listen (>= 2.7,
|
65
|
+
listen (>= 2.7, < 4.0)
|
68
66
|
lumberjack (~> 1.0)
|
69
67
|
nenv (~> 0.1)
|
70
68
|
notiffany (~> 0.0)
|
@@ -72,77 +70,74 @@ GEM
|
|
72
70
|
shellany (~> 0.0)
|
73
71
|
thor (>= 0.18.1)
|
74
72
|
guard-compat (1.2.1)
|
75
|
-
guard-minitest (2.4.
|
73
|
+
guard-minitest (2.4.6)
|
76
74
|
guard-compat (~> 1.2)
|
77
75
|
minitest (>= 3.0)
|
78
|
-
http-cookie (1.0.2)
|
79
|
-
domain_name (~> 0.5)
|
80
76
|
i18n (0.7.0)
|
81
|
-
json (
|
82
|
-
listen (3.
|
83
|
-
rb-fsevent (>= 0.9.
|
84
|
-
rb-inotify (>= 0.9)
|
77
|
+
json (2.0.2)
|
78
|
+
listen (3.1.5)
|
79
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
80
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
81
|
+
ruby_dep (~> 1.2)
|
85
82
|
loofah (2.0.3)
|
86
83
|
nokogiri (>= 1.5.9)
|
87
|
-
lumberjack (1.0.
|
84
|
+
lumberjack (1.0.10)
|
88
85
|
mail (2.6.4)
|
89
86
|
mime-types (>= 1.16, < 4)
|
90
87
|
method_source (0.8.2)
|
91
|
-
mime-types (
|
88
|
+
mime-types (3.1)
|
89
|
+
mime-types-data (~> 3.2015)
|
90
|
+
mime-types-data (3.2016.0521)
|
92
91
|
mini_portile2 (2.1.0)
|
93
|
-
minitest (5.
|
94
|
-
nenv (0.
|
95
|
-
netrc (0.11.0)
|
92
|
+
minitest (5.9.0)
|
93
|
+
nenv (0.3.0)
|
96
94
|
nio4r (1.2.1)
|
97
95
|
nokogiri (1.6.8)
|
98
96
|
mini_portile2 (~> 2.1.0)
|
99
97
|
pkg-config (~> 1.1.7)
|
100
|
-
notiffany (0.
|
98
|
+
notiffany (0.1.1)
|
101
99
|
nenv (~> 0.1)
|
102
100
|
shellany (~> 0.0)
|
103
101
|
pkg-config (1.1.7)
|
104
|
-
pry (0.10.
|
102
|
+
pry (0.10.4)
|
105
103
|
coderay (~> 1.1.0)
|
106
104
|
method_source (~> 0.8.1)
|
107
105
|
slop (~> 3.4)
|
108
106
|
rack (2.0.1)
|
109
107
|
rack-test (0.6.3)
|
110
108
|
rack (>= 1.0)
|
111
|
-
rails (5.0.0)
|
112
|
-
actioncable (= 5.0.0)
|
113
|
-
actionmailer (= 5.0.0)
|
114
|
-
actionpack (= 5.0.0)
|
115
|
-
actionview (= 5.0.0)
|
116
|
-
activejob (= 5.0.0)
|
117
|
-
activemodel (= 5.0.0)
|
118
|
-
activerecord (= 5.0.0)
|
119
|
-
activesupport (= 5.0.0)
|
109
|
+
rails (5.0.0.1)
|
110
|
+
actioncable (= 5.0.0.1)
|
111
|
+
actionmailer (= 5.0.0.1)
|
112
|
+
actionpack (= 5.0.0.1)
|
113
|
+
actionview (= 5.0.0.1)
|
114
|
+
activejob (= 5.0.0.1)
|
115
|
+
activemodel (= 5.0.0.1)
|
116
|
+
activerecord (= 5.0.0.1)
|
117
|
+
activesupport (= 5.0.0.1)
|
120
118
|
bundler (>= 1.3.0, < 2.0)
|
121
|
-
railties (= 5.0.0)
|
119
|
+
railties (= 5.0.0.1)
|
122
120
|
sprockets-rails (>= 2.0.0)
|
123
121
|
rails-dom-testing (2.0.1)
|
124
122
|
activesupport (>= 4.2.0, < 6.0)
|
125
123
|
nokogiri (~> 1.6.0)
|
126
124
|
rails-html-sanitizer (1.0.3)
|
127
125
|
loofah (~> 2.0)
|
128
|
-
railties (5.0.0)
|
129
|
-
actionpack (= 5.0.0)
|
130
|
-
activesupport (= 5.0.0)
|
126
|
+
railties (5.0.0.1)
|
127
|
+
actionpack (= 5.0.0.1)
|
128
|
+
activesupport (= 5.0.0.1)
|
131
129
|
method_source
|
132
130
|
rake (>= 0.8.7)
|
133
131
|
thor (>= 0.18.1, < 2.0)
|
134
|
-
rake (
|
135
|
-
rb-fsevent (0.9.
|
136
|
-
rb-inotify (0.9.
|
132
|
+
rake (11.2.2)
|
133
|
+
rb-fsevent (0.9.7)
|
134
|
+
rb-inotify (0.9.7)
|
137
135
|
ffi (>= 0.5.0)
|
138
|
-
|
139
|
-
http-cookie (>= 1.0.2, < 2.0)
|
140
|
-
mime-types (>= 1.16, < 3.0)
|
141
|
-
netrc (~> 0.7)
|
136
|
+
ruby_dep (1.4.0)
|
142
137
|
shellany (0.0.1)
|
143
|
-
simplecov (0.
|
138
|
+
simplecov (0.12.0)
|
144
139
|
docile (~> 1.1.0)
|
145
|
-
json (
|
140
|
+
json (>= 1.8, < 3)
|
146
141
|
simplecov-html (~> 0.10.0)
|
147
142
|
simplecov-html (0.10.0)
|
148
143
|
slop (3.6.0)
|
@@ -157,12 +152,9 @@ GEM
|
|
157
152
|
tins (~> 1.0)
|
158
153
|
thor (0.19.1)
|
159
154
|
thread_safe (0.3.5)
|
160
|
-
tins (1.
|
155
|
+
tins (1.12.0)
|
161
156
|
tzinfo (1.2.2)
|
162
157
|
thread_safe (~> 0.1)
|
163
|
-
unf (0.1.4)
|
164
|
-
unf_ext
|
165
|
-
unf_ext (0.0.7.1)
|
166
158
|
websocket-driver (0.6.4)
|
167
159
|
websocket-extensions (>= 0.1.0)
|
168
160
|
websocket-extensions (0.1.2)
|
@@ -180,4 +172,4 @@ DEPENDENCIES
|
|
180
172
|
semantic_date_time_tags!
|
181
173
|
|
182
174
|
BUNDLED WITH
|
183
|
-
1.12.
|
175
|
+
1.12.5
|
@@ -15,7 +15,7 @@ module SemanticDateTimeTags
|
|
15
15
|
processed_str = processed_str[match[0].length..-1]
|
16
16
|
end
|
17
17
|
res
|
18
|
-
end + processed_str
|
18
|
+
end + get_tag_for_str(processed_str)
|
19
19
|
).html_safe
|
20
20
|
end
|
21
21
|
|
@@ -29,6 +29,11 @@ module SemanticDateTimeTags
|
|
29
29
|
content_tag :span, match, class: get_classes_for_component(comp)
|
30
30
|
end
|
31
31
|
|
32
|
+
def get_tag_for_str(str)
|
33
|
+
return '' unless str.present?
|
34
|
+
content_tag :span, str, class: 'str'
|
35
|
+
end
|
36
|
+
|
32
37
|
def get_regexp_for_component(comp)
|
33
38
|
case comp
|
34
39
|
when /%-?[[:word:]]/ then '([[:word:]]+)'
|
@@ -4,26 +4,25 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'semantic_date_time_tags/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'semantic_date_time_tags'
|
8
8
|
spec.version = SemanticDateTimeTags::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
11
|
-
spec.summary =
|
12
|
-
spec.
|
13
|
-
spec.
|
14
|
-
spec.license = "MIT"
|
9
|
+
spec.authors = ['Tomas Celizna']
|
10
|
+
spec.email = ['tomas.celizna@gmail.com']
|
11
|
+
spec.summary = 'Rails helpers for handling dates and time.'
|
12
|
+
spec.homepage = 'https://github.com/tomasc/semantic_date_time_tags'
|
13
|
+
spec.license = 'MIT'
|
15
14
|
|
16
15
|
spec.files = `git ls-files -z`.split("\x0")
|
17
16
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
17
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
-
spec.require_paths = [
|
18
|
+
spec.require_paths = ['lib']
|
20
19
|
|
21
|
-
spec.add_dependency
|
20
|
+
spec.add_dependency 'rails', '>= 3'
|
22
21
|
|
23
|
-
spec.add_development_dependency
|
24
|
-
spec.add_development_dependency
|
25
|
-
spec.add_development_dependency
|
26
|
-
spec.add_development_dependency
|
27
|
-
spec.add_development_dependency
|
28
|
-
spec.add_development_dependency
|
22
|
+
spec.add_development_dependency 'bundler', '~> 1.6'
|
23
|
+
spec.add_development_dependency 'coveralls'
|
24
|
+
spec.add_development_dependency 'guard'
|
25
|
+
spec.add_development_dependency 'guard-minitest'
|
26
|
+
spec.add_development_dependency 'minitest'
|
27
|
+
spec.add_development_dependency 'rake'
|
29
28
|
end
|
@@ -76,7 +76,7 @@ describe SemanticDateTimeTags::FormatParser do
|
|
76
76
|
let(:string) { "09.09.2014 19.00 hrs" }
|
77
77
|
|
78
78
|
it 'preserves additional strings' do
|
79
|
-
to_html.must_equal "<span class=\"day d\">09</span><span class=\"sep\">.</span><span class=\"month m\">09</span><span class=\"sep\">.</span><span class=\"year Y\">2014</span><span class=\"sep\"> </span><span class=\"hours H\">19</span><span class=\"sep\">.</span><span class=\"minutes M\">00</span> hrs"
|
79
|
+
to_html.must_equal "<span class=\"day d\">09</span><span class=\"sep\">.</span><span class=\"month m\">09</span><span class=\"sep\">.</span><span class=\"year Y\">2014</span><span class=\"sep\"> </span><span class=\"hours H\">19</span><span class=\"sep\">.</span><span class=\"minutes M\">00</span><span class=\"str\"> hrs</span>"
|
80
80
|
end
|
81
81
|
end
|
82
82
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: semantic_date_time_tags
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomas Celizna
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3
|
19
|
+
version: '3'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3
|
26
|
+
version: '3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
|
-
description:
|
111
|
+
description:
|
112
112
|
email:
|
113
113
|
- tomas.celizna@gmail.com
|
114
114
|
executables: []
|
@@ -165,7 +165,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
165
165
|
version: '0'
|
166
166
|
requirements: []
|
167
167
|
rubyforge_project:
|
168
|
-
rubygems_version: 2.
|
168
|
+
rubygems_version: 2.4.5.1
|
169
169
|
signing_key:
|
170
170
|
specification_version: 4
|
171
171
|
summary: Rails helpers for handling dates and time.
|