semantic_date_time_tags 0.1.14 → 0.1.16

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: 214992205dd337c46a4e02b106a5c7601388c7b1
4
- data.tar.gz: 10c0a3dbec7349e53758ed2767c2d33c83ad814a
3
+ metadata.gz: 6312925ee44e3f19a3cc43667234383e4ff94f6e
4
+ data.tar.gz: 7e5216ba936def1f2c6008d4aaeb2adbd75dff60
5
5
  SHA512:
6
- metadata.gz: fd9a6758bff9fb7c5c2339c42046b40dac9b1e1287464692e43ef38b8b71a2b783da80fbdbb819234221810fa043f7ba845ef35d9b3574c02130d32d17db6621
7
- data.tar.gz: b4a3c1272e3153bb0f085d018aab6fed0db7893b2f23d85df841649aa155e2d02b8d817035232f149f9854785a0cc3991533f59f0479c20ee48806aad5df0e75
6
+ metadata.gz: eb6e01fb0305336df88b0dcf96723bf9cb17868066c3694b48d0a7fa2611ec744ad17de4bbcfc7635a29652ceefec6b7ed2a998c1756bd97c4c39c3ed88ec7aa
7
+ data.tar.gz: 3727825770e022a75345b1b8605f49b300a9bc5daf851268521b95522da4846cbb03886d08182a18f6119184d6101e04f0f7b9ecd9ed4509f6476672d56c0181
data/Gemfile.lock CHANGED
@@ -1,66 +1,66 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- semantic_date_time_tags (0.1.14)
4
+ semantic_date_time_tags (0.1.16)
5
5
  rails (>= 3)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- actioncable (5.0.0.1)
11
- actionpack (= 5.0.0.1)
12
- nio4r (~> 1.2)
10
+ actioncable (5.0.2)
11
+ actionpack (= 5.0.2)
12
+ nio4r (>= 1.2, < 3.0)
13
13
  websocket-driver (~> 0.6.1)
14
- actionmailer (5.0.0.1)
15
- actionpack (= 5.0.0.1)
16
- actionview (= 5.0.0.1)
17
- activejob (= 5.0.0.1)
14
+ actionmailer (5.0.2)
15
+ actionpack (= 5.0.2)
16
+ actionview (= 5.0.2)
17
+ activejob (= 5.0.2)
18
18
  mail (~> 2.5, >= 2.5.4)
19
19
  rails-dom-testing (~> 2.0)
20
- actionpack (5.0.0.1)
21
- actionview (= 5.0.0.1)
22
- activesupport (= 5.0.0.1)
20
+ actionpack (5.0.2)
21
+ actionview (= 5.0.2)
22
+ activesupport (= 5.0.2)
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.1)
28
- activesupport (= 5.0.0.1)
27
+ actionview (5.0.2)
28
+ activesupport (= 5.0.2)
29
29
  builder (~> 3.1)
30
30
  erubis (~> 2.7.0)
31
31
  rails-dom-testing (~> 2.0)
32
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
33
- activejob (5.0.0.1)
34
- activesupport (= 5.0.0.1)
32
+ rails-html-sanitizer (~> 1.0, >= 1.0.3)
33
+ activejob (5.0.2)
34
+ activesupport (= 5.0.2)
35
35
  globalid (>= 0.3.6)
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)
36
+ activemodel (5.0.2)
37
+ activesupport (= 5.0.2)
38
+ activerecord (5.0.2)
39
+ activemodel (= 5.0.2)
40
+ activesupport (= 5.0.2)
41
41
  arel (~> 7.0)
42
- activesupport (5.0.0.1)
42
+ activesupport (5.0.2)
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.1)
48
- builder (3.2.2)
47
+ arel (7.1.4)
48
+ builder (3.2.3)
49
49
  coderay (1.1.1)
50
- concurrent-ruby (1.0.2)
51
- coveralls (0.8.15)
50
+ concurrent-ruby (1.0.5)
51
+ coveralls (0.8.19)
52
52
  json (>= 1.8, < 3)
53
53
  simplecov (~> 0.12.0)
54
54
  term-ansicolor (~> 1.3)
55
55
  thor (~> 0.19.1)
56
- tins (>= 1.6.0, < 2)
56
+ tins (~> 1.6)
57
57
  docile (1.1.5)
58
58
  erubis (2.7.0)
59
- ffi (1.9.14)
59
+ ffi (1.9.18)
60
60
  formatador (0.2.5)
61
61
  globalid (0.3.7)
62
62
  activesupport (>= 4.1.0)
63
- guard (2.14.0)
63
+ guard (2.14.1)
64
64
  formatador (>= 0.2.4)
65
65
  listen (>= 2.7, < 4.0)
66
66
  lumberjack (~> 1.0)
@@ -73,15 +73,15 @@ GEM
73
73
  guard-minitest (2.4.6)
74
74
  guard-compat (~> 1.2)
75
75
  minitest (>= 3.0)
76
- i18n (0.7.0)
77
- json (2.0.2)
76
+ i18n (0.8.1)
77
+ json (2.0.3)
78
78
  listen (3.1.5)
79
79
  rb-fsevent (~> 0.9, >= 0.9.4)
80
80
  rb-inotify (~> 0.9, >= 0.9.7)
81
81
  ruby_dep (~> 1.2)
82
82
  loofah (2.0.3)
83
83
  nokogiri (>= 1.5.9)
84
- lumberjack (1.0.10)
84
+ lumberjack (1.0.11)
85
85
  mail (2.6.4)
86
86
  mime-types (>= 1.16, < 4)
87
87
  method_source (0.8.2)
@@ -89,16 +89,14 @@ GEM
89
89
  mime-types-data (~> 3.2015)
90
90
  mime-types-data (3.2016.0521)
91
91
  mini_portile2 (2.1.0)
92
- minitest (5.9.0)
92
+ minitest (5.10.1)
93
93
  nenv (0.3.0)
94
- nio4r (1.2.1)
95
- nokogiri (1.6.8)
94
+ nio4r (2.0.0)
95
+ nokogiri (1.7.0.1)
96
96
  mini_portile2 (~> 2.1.0)
97
- pkg-config (~> 1.1.7)
98
97
  notiffany (0.1.1)
99
98
  nenv (~> 0.1)
100
99
  shellany (~> 0.0)
101
- pkg-config (1.1.7)
102
100
  pry (0.10.4)
103
101
  coderay (~> 1.1.0)
104
102
  method_source (~> 0.8.1)
@@ -106,34 +104,34 @@ GEM
106
104
  rack (2.0.1)
107
105
  rack-test (0.6.3)
108
106
  rack (>= 1.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)
107
+ rails (5.0.2)
108
+ actioncable (= 5.0.2)
109
+ actionmailer (= 5.0.2)
110
+ actionpack (= 5.0.2)
111
+ actionview (= 5.0.2)
112
+ activejob (= 5.0.2)
113
+ activemodel (= 5.0.2)
114
+ activerecord (= 5.0.2)
115
+ activesupport (= 5.0.2)
118
116
  bundler (>= 1.3.0, < 2.0)
119
- railties (= 5.0.0.1)
117
+ railties (= 5.0.2)
120
118
  sprockets-rails (>= 2.0.0)
121
- rails-dom-testing (2.0.1)
119
+ rails-dom-testing (2.0.2)
122
120
  activesupport (>= 4.2.0, < 6.0)
123
- nokogiri (~> 1.6.0)
121
+ nokogiri (~> 1.6)
124
122
  rails-html-sanitizer (1.0.3)
125
123
  loofah (~> 2.0)
126
- railties (5.0.0.1)
127
- actionpack (= 5.0.0.1)
128
- activesupport (= 5.0.0.1)
124
+ railties (5.0.2)
125
+ actionpack (= 5.0.2)
126
+ activesupport (= 5.0.2)
129
127
  method_source
130
128
  rake (>= 0.8.7)
131
129
  thor (>= 0.18.1, < 2.0)
132
- rake (11.2.2)
133
- rb-fsevent (0.9.7)
134
- rb-inotify (0.9.7)
130
+ rake (12.0.0)
131
+ rb-fsevent (0.9.8)
132
+ rb-inotify (0.9.8)
135
133
  ffi (>= 0.5.0)
136
- ruby_dep (1.4.0)
134
+ ruby_dep (1.5.0)
137
135
  shellany (0.0.1)
138
136
  simplecov (0.12.0)
139
137
  docile (~> 1.1.0)
@@ -141,21 +139,21 @@ GEM
141
139
  simplecov-html (~> 0.10.0)
142
140
  simplecov-html (0.10.0)
143
141
  slop (3.6.0)
144
- sprockets (3.7.0)
142
+ sprockets (3.7.1)
145
143
  concurrent-ruby (~> 1.0)
146
144
  rack (> 1, < 3)
147
- sprockets-rails (3.1.1)
145
+ sprockets-rails (3.2.0)
148
146
  actionpack (>= 4.0)
149
147
  activesupport (>= 4.0)
150
148
  sprockets (>= 3.0.0)
151
- term-ansicolor (1.3.2)
149
+ term-ansicolor (1.4.0)
152
150
  tins (~> 1.0)
153
- thor (0.19.1)
154
- thread_safe (0.3.5)
155
- tins (1.12.0)
151
+ thor (0.19.4)
152
+ thread_safe (0.3.6)
153
+ tins (1.13.2)
156
154
  tzinfo (1.2.2)
157
155
  thread_safe (~> 0.1)
158
- websocket-driver (0.6.4)
156
+ websocket-driver (0.6.5)
159
157
  websocket-extensions (>= 0.1.0)
160
158
  websocket-extensions (0.1.2)
161
159
 
@@ -172,4 +170,4 @@ DEPENDENCIES
172
170
  semantic_date_time_tags!
173
171
 
174
172
  BUNDLED WITH
175
- 1.12.5
173
+ 1.13.6
@@ -31,7 +31,10 @@ module SemanticDateTimeTags
31
31
  end
32
32
 
33
33
  def localized_obj
34
- format_string = I18n.t(format, scope: scope, locale: I18n.locale)
34
+ format_string = case format
35
+ when Symbol then I18n.t(format, scope: scope, locale: I18n.locale)
36
+ else format
37
+ end
35
38
  I18n.l(obj, format: format_string)
36
39
  end
37
40
  end
@@ -100,7 +100,10 @@ module SemanticDateTimeTags
100
100
  end
101
101
 
102
102
  def format_string
103
- I18n.t(scope)[format]
103
+ case format
104
+ when Symbol then I18n.t(scope)[format]
105
+ else format
106
+ end
104
107
  end
105
108
 
106
109
  def format
@@ -1,3 +1,3 @@
1
1
  module SemanticDateTimeTags
2
- VERSION = '0.1.14'.freeze
2
+ VERSION = '0.1.16'.freeze
3
3
  end
@@ -79,6 +79,7 @@ describe SemanticDateTimeTags::ViewHelpers do
79
79
  it 'allows to pass :format' do
80
80
  semantic_time_tag(time_object, format: :test).must_include '~'
81
81
  semantic_time_tag(time_object, format: :test).must_include 'data-format="test"'
82
+ semantic_time_tag(time_object, format: '%-l:%M %P').must_include 'data-format="%-l:%M %P"'
82
83
  end
83
84
  end
84
85
 
@@ -124,6 +125,7 @@ describe SemanticDateTimeTags::ViewHelpers do
124
125
  it 'allows to pass :format' do
125
126
  semantic_date_tag(Date.today, format: :test).must_include '~'
126
127
  semantic_date_tag(Date.today, format: :test).must_include 'data-format="test"'
128
+ semantic_date_tag(Date.today, format: '%a, %b %-d, %Y').must_include 'data-format="%a, %b %-d, %Y"'
127
129
  end
128
130
  end
129
131
 
@@ -157,6 +159,7 @@ describe SemanticDateTimeTags::ViewHelpers do
157
159
  it 'allows to pass :format' do
158
160
  semantic_date_time_tag(date_time_object, format: :test).must_include '~'
159
161
  semantic_date_time_tag(date_time_object, format: :test).must_include 'data-format="test"'
162
+ semantic_date_time_tag(date_time_object, format: '%a, %b %-d, %Y, %-l:%M %P').must_include 'data-format="%a, %b %-d, %Y, %-l:%M %P"'
160
163
  end
161
164
  end
162
165
 
@@ -207,6 +210,7 @@ describe SemanticDateTimeTags::ViewHelpers do
207
210
  it 'allows to pass :format' do
208
211
  semantic_date_time_range_tag(date_object, date_tomorrow_object, format: :test).must_include '~'
209
212
  semantic_date_time_range_tag(date_object, date_tomorrow_object, format: :test).must_include 'data-format="test"'
213
+ semantic_time_tag(time_object, format: '%a, %b %-d, %Y, %-l:%M %P').must_include 'data-format="%a, %b %-d, %Y, %-l:%M %P"'
210
214
  end
211
215
  end
212
216
  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.14
4
+ version: 0.1.16
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-08-24 00:00:00.000000000 Z
11
+ date: 2017-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails