semantic_date_time_tags 0.1.12 → 0.1.13

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: 5f7f0de51380b40defb7d79a38b4d8e34a95cd5a
4
- data.tar.gz: cf7e5b8ca3318dae36c22f6014454b47e6a2eac5
3
+ metadata.gz: bf70e1d85ad773cd4d321186e33446a2dbbd3339
4
+ data.tar.gz: bbc6cc4adda95ef5034b20e4f4816508f796d963
5
5
  SHA512:
6
- metadata.gz: ea024eeb9a280119a1a1fbd0ca23fe397043cdf1a4d14c230934d307eb35f3898f9864d303d9981fbdbb9a2d764cba7f7158373f5dd45abb00cf62370742ef7c
7
- data.tar.gz: 6443fe709ea653b5706a91cb1afb61c1e5a111fae9b3ef28d15f27941f3e405cdf9f8be048ea93dfa9f103d675cae3c5a0a877548f0b4c1fc7977503e9f521f0
6
+ metadata.gz: a02c9c9cef2ced2989ae8ab84b8b7de296be66441d2e9305c0baa789d575bf02d7318fb50b32e948d09f48b7d8fa1e2d7905c3875752cd30f22e0e5352b2c145
7
+ data.tar.gz: 1000be57867c8136f8ba92405baa445f7d37378fb5c6a2c16902efdebf78225d73360422d25020e61192dc9e4df96140166a6100d06f5fa9520bc045c7e8c473
@@ -3,7 +3,7 @@ cache: bundler
3
3
  script: 'bundle exec rake'
4
4
  sudo: false
5
5
  rvm:
6
- - 2.1.2
6
+ - 2.2.4
7
7
 
8
8
  notifications:
9
9
  email:
@@ -1,51 +1,53 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- semantic_date_time_tags (0.1.12)
4
+ semantic_date_time_tags (0.1.13)
5
5
  rails (>= 3.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actionmailer (4.2.6)
11
- actionpack (= 4.2.6)
12
- actionview (= 4.2.6)
13
- activejob (= 4.2.6)
10
+ actioncable (5.0.0)
11
+ actionpack (= 5.0.0)
12
+ nio4r (~> 1.2)
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
18
  mail (~> 2.5, >= 2.5.4)
15
- rails-dom-testing (~> 1.0, >= 1.0.5)
16
- actionpack (4.2.6)
17
- actionview (= 4.2.6)
18
- activesupport (= 4.2.6)
19
- rack (~> 1.6)
20
- rack-test (~> 0.6.2)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
19
+ rails-dom-testing (~> 2.0)
20
+ actionpack (5.0.0)
21
+ actionview (= 5.0.0)
22
+ activesupport (= 5.0.0)
23
+ rack (~> 2.0)
24
+ rack-test (~> 0.6.3)
25
+ rails-dom-testing (~> 2.0)
22
26
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
23
- actionview (4.2.6)
24
- activesupport (= 4.2.6)
27
+ actionview (5.0.0)
28
+ activesupport (= 5.0.0)
25
29
  builder (~> 3.1)
26
30
  erubis (~> 2.7.0)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
31
+ rails-dom-testing (~> 2.0)
28
32
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- activejob (4.2.6)
30
- activesupport (= 4.2.6)
31
- globalid (>= 0.3.0)
32
- activemodel (4.2.6)
33
- activesupport (= 4.2.6)
34
- builder (~> 3.1)
35
- activerecord (4.2.6)
36
- activemodel (= 4.2.6)
37
- activesupport (= 4.2.6)
38
- arel (~> 6.0)
39
- activesupport (4.2.6)
33
+ activejob (5.0.0)
34
+ activesupport (= 5.0.0)
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)
41
+ arel (~> 7.0)
42
+ activesupport (5.0.0)
43
+ concurrent-ruby (~> 1.0, >= 1.0.2)
40
44
  i18n (~> 0.7)
41
- json (~> 1.7, >= 1.7.7)
42
45
  minitest (~> 5.1)
43
- thread_safe (~> 0.3, >= 0.3.4)
44
46
  tzinfo (~> 1.1)
45
- arel (6.0.3)
47
+ arel (7.1.0)
46
48
  builder (3.2.2)
47
49
  coderay (1.1.0)
48
- concurrent-ruby (1.0.1)
50
+ concurrent-ruby (1.0.2)
49
51
  coveralls (0.8.3)
50
52
  json (~> 1.8)
51
53
  rest-client (>= 1.6.8, < 2)
@@ -58,7 +60,7 @@ GEM
58
60
  erubis (2.7.0)
59
61
  ffi (1.9.10)
60
62
  formatador (0.2.5)
61
- globalid (0.3.6)
63
+ globalid (0.3.7)
62
64
  activesupport (>= 4.1.0)
63
65
  guard (2.13.0)
64
66
  formatador (>= 0.2.4)
@@ -87,44 +89,46 @@ GEM
87
89
  mime-types (>= 1.16, < 4)
88
90
  method_source (0.8.2)
89
91
  mime-types (2.6.2)
90
- mini_portile2 (2.0.0)
92
+ mini_portile2 (2.1.0)
91
93
  minitest (5.8.2)
92
94
  nenv (0.2.0)
93
95
  netrc (0.11.0)
94
- nokogiri (1.6.7.2)
95
- mini_portile2 (~> 2.0.0.rc2)
96
+ nio4r (1.2.1)
97
+ nokogiri (1.6.8)
98
+ mini_portile2 (~> 2.1.0)
99
+ pkg-config (~> 1.1.7)
96
100
  notiffany (0.0.8)
97
101
  nenv (~> 0.1)
98
102
  shellany (~> 0.0)
103
+ pkg-config (1.1.7)
99
104
  pry (0.10.3)
100
105
  coderay (~> 1.1.0)
101
106
  method_source (~> 0.8.1)
102
107
  slop (~> 3.4)
103
- rack (1.6.4)
108
+ rack (2.0.1)
104
109
  rack-test (0.6.3)
105
110
  rack (>= 1.0)
106
- rails (4.2.6)
107
- actionmailer (= 4.2.6)
108
- actionpack (= 4.2.6)
109
- actionview (= 4.2.6)
110
- activejob (= 4.2.6)
111
- activemodel (= 4.2.6)
112
- activerecord (= 4.2.6)
113
- activesupport (= 4.2.6)
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)
114
120
  bundler (>= 1.3.0, < 2.0)
115
- railties (= 4.2.6)
116
- sprockets-rails
117
- rails-deprecated_sanitizer (1.0.3)
118
- activesupport (>= 4.2.0.alpha)
119
- rails-dom-testing (1.0.7)
120
- activesupport (>= 4.2.0.beta, < 5.0)
121
+ railties (= 5.0.0)
122
+ sprockets-rails (>= 2.0.0)
123
+ rails-dom-testing (2.0.1)
124
+ activesupport (>= 4.2.0, < 6.0)
121
125
  nokogiri (~> 1.6.0)
122
- rails-deprecated_sanitizer (>= 1.0.1)
123
126
  rails-html-sanitizer (1.0.3)
124
127
  loofah (~> 2.0)
125
- railties (4.2.6)
126
- actionpack (= 4.2.6)
127
- activesupport (= 4.2.6)
128
+ railties (5.0.0)
129
+ actionpack (= 5.0.0)
130
+ activesupport (= 5.0.0)
131
+ method_source
128
132
  rake (>= 0.8.7)
129
133
  thor (>= 0.18.1, < 2.0)
130
134
  rake (10.4.2)
@@ -142,10 +146,10 @@ GEM
142
146
  simplecov-html (~> 0.10.0)
143
147
  simplecov-html (0.10.0)
144
148
  slop (3.6.0)
145
- sprockets (3.6.0)
149
+ sprockets (3.7.0)
146
150
  concurrent-ruby (~> 1.0)
147
151
  rack (> 1, < 3)
148
- sprockets-rails (3.0.4)
152
+ sprockets-rails (3.1.1)
149
153
  actionpack (>= 4.0)
150
154
  activesupport (>= 4.0)
151
155
  sprockets (>= 3.0.0)
@@ -159,6 +163,9 @@ GEM
159
163
  unf (0.1.4)
160
164
  unf_ext
161
165
  unf_ext (0.0.7.1)
166
+ websocket-driver (0.6.4)
167
+ websocket-extensions (>= 0.1.0)
168
+ websocket-extensions (0.1.2)
162
169
 
163
170
  PLATFORMS
164
171
  ruby
@@ -173,4 +180,4 @@ DEPENDENCIES
173
180
  semantic_date_time_tags!
174
181
 
175
182
  BUNDLED WITH
176
- 1.11.2
183
+ 1.12.1
@@ -7,14 +7,16 @@ module SemanticDateTimeTags
7
7
 
8
8
  def to_html
9
9
  processed_str = str
10
- formatting_components.flatten.inject('') do |res, comp|
11
- regexp = Regexp.new(get_regexp_for_component(comp))
12
- if match = processed_str.match(regexp)
13
- res += get_tag_for_match(match[0], comp)
14
- processed_str = processed_str[match[0].length..-1]
15
- end
16
- res
17
- end.html_safe
10
+ (
11
+ formatting_components.flatten.inject('') do |res, comp|
12
+ regexp = Regexp.new(get_regexp_for_component(comp))
13
+ if match = processed_str.match(regexp)
14
+ res += get_tag_for_match(match[0], comp)
15
+ processed_str = processed_str[match[0].length..-1]
16
+ end
17
+ res
18
+ end + processed_str
19
+ ).html_safe
18
20
  end
19
21
 
20
22
  private # =============================================================
@@ -1,3 +1,3 @@
1
1
  module SemanticDateTimeTags
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.13"
3
3
  end
@@ -70,5 +70,14 @@ describe SemanticDateTimeTags::FormatParser do
70
70
  to_html.must_equal "<span class=\"day A\">Čtvrtek</span><span class=\"sep\">, </span><span class=\"day d\">16</span><span class=\"sep\">. </span><span class=\"month B\">Červen</span><span class=\"sep\">, </span><span class=\"year Y\">2016</span>"
71
71
  end
72
72
  end
73
+
74
+ describe 'additional string' do
75
+ let(:format) { '%d.%m.%Y %H.%M hrs' }
76
+ let(:string) { "09.09.2014 19.00 hrs" }
77
+
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"
80
+ end
81
+ end
73
82
  end
74
83
  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.12
4
+ version: 0.1.13
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-04-22 00:00:00.000000000 Z
11
+ date: 2016-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -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.4.8
168
+ rubygems_version: 2.6.6
169
169
  signing_key:
170
170
  specification_version: 4
171
171
  summary: Rails helpers for handling dates and time.