i18n_date_range 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/Gemfile +2 -0
- data/Gemfile.lock +228 -0
- data/README.md +9 -68
- data/config/locales/en-GB.yml +6 -6
- data/config/locales/en.yml +6 -6
- data/config/locales/fr.yml +6 -6
- data/config.ru +9 -0
- data/i18n_date_range.gemspec +10 -2
- data/lib/i18n_date_range/i18n_date_range_generator.rb +21 -13
- data/lib/i18n_date_range/i18n_date_range_helper.rb +6 -3
- data/lib/i18n_date_range/version.rb +1 -1
- data/lib/i18n_date_range.rb +3 -1
- metadata +135 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a362ba947e3513cdc187c338aa439670cd06280157979b8fabc3345d51b24984
|
4
|
+
data.tar.gz: 20882671c1fcd39a191779b9aebe649a6405fde1450b49eb65941b1d9f250e17
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc4de9e028967651ae957e974013da5aaf53c084d2d8651f5da0ce134791503ecd8e799bf05ef3c64b42ee003b2b69c1274dfd7af5377c4aa36e0dd68416ebd3
|
7
|
+
data.tar.gz: fa97e0bb4dd5124d2bb27614ee31cd7a4ecb2a132b7467149e815568c7fe4ac9c280b78a399efd4cb6637684b54be285ec2d02f6c9c5c628a770dd156d5c12b6
|
data/.rubocop.yml
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,228 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
i18n_date_range (0.2.0)
|
5
|
+
rails
|
6
|
+
rails-i18n
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
actioncable (7.0.8)
|
12
|
+
actionpack (= 7.0.8)
|
13
|
+
activesupport (= 7.0.8)
|
14
|
+
nio4r (~> 2.0)
|
15
|
+
websocket-driver (>= 0.6.1)
|
16
|
+
actionmailbox (7.0.8)
|
17
|
+
actionpack (= 7.0.8)
|
18
|
+
activejob (= 7.0.8)
|
19
|
+
activerecord (= 7.0.8)
|
20
|
+
activestorage (= 7.0.8)
|
21
|
+
activesupport (= 7.0.8)
|
22
|
+
mail (>= 2.7.1)
|
23
|
+
net-imap
|
24
|
+
net-pop
|
25
|
+
net-smtp
|
26
|
+
actionmailer (7.0.8)
|
27
|
+
actionpack (= 7.0.8)
|
28
|
+
actionview (= 7.0.8)
|
29
|
+
activejob (= 7.0.8)
|
30
|
+
activesupport (= 7.0.8)
|
31
|
+
mail (~> 2.5, >= 2.5.4)
|
32
|
+
net-imap
|
33
|
+
net-pop
|
34
|
+
net-smtp
|
35
|
+
rails-dom-testing (~> 2.0)
|
36
|
+
actionpack (7.0.8)
|
37
|
+
actionview (= 7.0.8)
|
38
|
+
activesupport (= 7.0.8)
|
39
|
+
rack (~> 2.0, >= 2.2.4)
|
40
|
+
rack-test (>= 0.6.3)
|
41
|
+
rails-dom-testing (~> 2.0)
|
42
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
43
|
+
actiontext (7.0.8)
|
44
|
+
actionpack (= 7.0.8)
|
45
|
+
activerecord (= 7.0.8)
|
46
|
+
activestorage (= 7.0.8)
|
47
|
+
activesupport (= 7.0.8)
|
48
|
+
globalid (>= 0.6.0)
|
49
|
+
nokogiri (>= 1.8.5)
|
50
|
+
actionview (7.0.8)
|
51
|
+
activesupport (= 7.0.8)
|
52
|
+
builder (~> 3.1)
|
53
|
+
erubi (~> 1.4)
|
54
|
+
rails-dom-testing (~> 2.0)
|
55
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
56
|
+
activejob (7.0.8)
|
57
|
+
activesupport (= 7.0.8)
|
58
|
+
globalid (>= 0.3.6)
|
59
|
+
activemodel (7.0.8)
|
60
|
+
activesupport (= 7.0.8)
|
61
|
+
activerecord (7.0.8)
|
62
|
+
activemodel (= 7.0.8)
|
63
|
+
activesupport (= 7.0.8)
|
64
|
+
activestorage (7.0.8)
|
65
|
+
actionpack (= 7.0.8)
|
66
|
+
activejob (= 7.0.8)
|
67
|
+
activerecord (= 7.0.8)
|
68
|
+
activesupport (= 7.0.8)
|
69
|
+
marcel (~> 1.0)
|
70
|
+
mini_mime (>= 1.1.0)
|
71
|
+
activesupport (7.0.8)
|
72
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
73
|
+
i18n (>= 1.6, < 2)
|
74
|
+
minitest (>= 5.1)
|
75
|
+
tzinfo (~> 2.0)
|
76
|
+
ast (2.4.2)
|
77
|
+
base64 (0.1.1)
|
78
|
+
builder (3.2.4)
|
79
|
+
combustion (1.3.7)
|
80
|
+
activesupport (>= 3.0.0)
|
81
|
+
railties (>= 3.0.0)
|
82
|
+
thor (>= 0.14.6)
|
83
|
+
concurrent-ruby (1.2.2)
|
84
|
+
crass (1.0.6)
|
85
|
+
date (3.3.3)
|
86
|
+
diff-lcs (1.5.0)
|
87
|
+
erubi (1.12.0)
|
88
|
+
globalid (1.2.1)
|
89
|
+
activesupport (>= 6.1)
|
90
|
+
i18n (1.14.1)
|
91
|
+
concurrent-ruby (~> 1.0)
|
92
|
+
json (2.6.3)
|
93
|
+
language_server-protocol (3.17.0.3)
|
94
|
+
loofah (2.21.3)
|
95
|
+
crass (~> 1.0.2)
|
96
|
+
nokogiri (>= 1.12.0)
|
97
|
+
mail (2.8.1)
|
98
|
+
mini_mime (>= 0.1.1)
|
99
|
+
net-imap
|
100
|
+
net-pop
|
101
|
+
net-smtp
|
102
|
+
marcel (1.0.2)
|
103
|
+
method_source (1.0.0)
|
104
|
+
mini_mime (1.1.5)
|
105
|
+
minitest (5.20.0)
|
106
|
+
net-imap (0.3.7)
|
107
|
+
date
|
108
|
+
net-protocol
|
109
|
+
net-pop (0.1.2)
|
110
|
+
net-protocol
|
111
|
+
net-protocol (0.2.1)
|
112
|
+
timeout
|
113
|
+
net-smtp (0.3.3)
|
114
|
+
net-protocol
|
115
|
+
nio4r (2.5.9)
|
116
|
+
nokogiri (1.15.4-x86_64-darwin)
|
117
|
+
racc (~> 1.4)
|
118
|
+
parallel (1.23.0)
|
119
|
+
parser (3.2.2.3)
|
120
|
+
ast (~> 2.4.1)
|
121
|
+
racc
|
122
|
+
racc (1.7.1)
|
123
|
+
rack (2.2.8)
|
124
|
+
rack-test (2.1.0)
|
125
|
+
rack (>= 1.3)
|
126
|
+
rails (7.0.8)
|
127
|
+
actioncable (= 7.0.8)
|
128
|
+
actionmailbox (= 7.0.8)
|
129
|
+
actionmailer (= 7.0.8)
|
130
|
+
actionpack (= 7.0.8)
|
131
|
+
actiontext (= 7.0.8)
|
132
|
+
actionview (= 7.0.8)
|
133
|
+
activejob (= 7.0.8)
|
134
|
+
activemodel (= 7.0.8)
|
135
|
+
activerecord (= 7.0.8)
|
136
|
+
activestorage (= 7.0.8)
|
137
|
+
activesupport (= 7.0.8)
|
138
|
+
bundler (>= 1.15.0)
|
139
|
+
railties (= 7.0.8)
|
140
|
+
rails-dom-testing (2.2.0)
|
141
|
+
activesupport (>= 5.0.0)
|
142
|
+
minitest
|
143
|
+
nokogiri (>= 1.6)
|
144
|
+
rails-html-sanitizer (1.6.0)
|
145
|
+
loofah (~> 2.21)
|
146
|
+
nokogiri (~> 1.14)
|
147
|
+
rails-i18n (7.0.8)
|
148
|
+
i18n (>= 0.7, < 2)
|
149
|
+
railties (>= 6.0.0, < 8)
|
150
|
+
railties (7.0.8)
|
151
|
+
actionpack (= 7.0.8)
|
152
|
+
activesupport (= 7.0.8)
|
153
|
+
method_source
|
154
|
+
rake (>= 12.2)
|
155
|
+
thor (~> 1.0)
|
156
|
+
zeitwerk (~> 2.5)
|
157
|
+
rainbow (3.1.1)
|
158
|
+
rake (13.0.6)
|
159
|
+
regexp_parser (2.8.1)
|
160
|
+
rexml (3.2.6)
|
161
|
+
rspec (3.12.0)
|
162
|
+
rspec-core (~> 3.12.0)
|
163
|
+
rspec-expectations (~> 3.12.0)
|
164
|
+
rspec-mocks (~> 3.12.0)
|
165
|
+
rspec-core (3.12.2)
|
166
|
+
rspec-support (~> 3.12.0)
|
167
|
+
rspec-expectations (3.12.3)
|
168
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
169
|
+
rspec-support (~> 3.12.0)
|
170
|
+
rspec-mocks (3.12.6)
|
171
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
172
|
+
rspec-support (~> 3.12.0)
|
173
|
+
rspec-rails (6.0.3)
|
174
|
+
actionpack (>= 6.1)
|
175
|
+
activesupport (>= 6.1)
|
176
|
+
railties (>= 6.1)
|
177
|
+
rspec-core (~> 3.12)
|
178
|
+
rspec-expectations (~> 3.12)
|
179
|
+
rspec-mocks (~> 3.12)
|
180
|
+
rspec-support (~> 3.12)
|
181
|
+
rspec-support (3.12.1)
|
182
|
+
rubocop (1.56.2)
|
183
|
+
base64 (~> 0.1.1)
|
184
|
+
json (~> 2.3)
|
185
|
+
language_server-protocol (>= 3.17.0)
|
186
|
+
parallel (~> 1.10)
|
187
|
+
parser (>= 3.2.2.3)
|
188
|
+
rainbow (>= 2.2.2, < 4.0)
|
189
|
+
regexp_parser (>= 1.8, < 3.0)
|
190
|
+
rexml (>= 3.2.5, < 4.0)
|
191
|
+
rubocop-ast (>= 1.28.1, < 2.0)
|
192
|
+
ruby-progressbar (~> 1.7)
|
193
|
+
unicode-display_width (>= 2.4.0, < 3.0)
|
194
|
+
rubocop-ast (1.29.0)
|
195
|
+
parser (>= 3.2.1.0)
|
196
|
+
rubocop-rails (2.21.0)
|
197
|
+
activesupport (>= 4.2.0)
|
198
|
+
rack (>= 1.1)
|
199
|
+
rubocop (>= 1.33.0, < 2.0)
|
200
|
+
ruby-progressbar (1.13.0)
|
201
|
+
thor (1.2.2)
|
202
|
+
timeout (0.4.0)
|
203
|
+
tzinfo (2.0.6)
|
204
|
+
concurrent-ruby (~> 1.0)
|
205
|
+
unicode-display_width (2.4.2)
|
206
|
+
websocket-driver (0.7.6)
|
207
|
+
websocket-extensions (>= 0.1.0)
|
208
|
+
websocket-extensions (0.1.5)
|
209
|
+
zeitwerk (2.6.11)
|
210
|
+
|
211
|
+
PLATFORMS
|
212
|
+
x86_64-darwin-20
|
213
|
+
x86_64-darwin-22
|
214
|
+
|
215
|
+
DEPENDENCIES
|
216
|
+
bundler
|
217
|
+
combustion
|
218
|
+
i18n_date_range!
|
219
|
+
rails
|
220
|
+
rails-i18n
|
221
|
+
rake (~> 13.0)
|
222
|
+
rspec (~> 3.0)
|
223
|
+
rspec-rails
|
224
|
+
rubocop (~> 1.21)
|
225
|
+
rubocop-rails
|
226
|
+
|
227
|
+
BUNDLED WITH
|
228
|
+
2.4.6
|
data/README.md
CHANGED
@@ -26,79 +26,20 @@ Format can be `:short` or `:long` (default is :short)
|
|
26
26
|
"Short" format means without the explicit day name (September 8, 2024).
|
27
27
|
"Long" format means with it (Friday, September 8, 2024).
|
28
28
|
|
29
|
-
## Examples (in French)
|
30
|
-
|
31
|
-
// Example 1
|
32
|
-
<% date_from = Date.today %>
|
33
|
-
<%= date_range_i18n(date_from) %>
|
34
|
-
|
35
|
-
=> 8 septembre 2023
|
36
|
-
|
37
|
-
// Example 1 bis
|
38
|
-
<% date_from = Date.today %>
|
39
|
-
<%= date_range_i18n(date_from, nil, :long) %>
|
40
|
-
|
41
|
-
=> vendredi 8 septembre 2023
|
42
|
-
|
43
|
-
// Example 2
|
44
|
-
<%
|
45
|
-
date_from = Date.today
|
46
|
-
date_to = Date.today + 1.day
|
47
|
-
%>
|
48
|
-
<%= date_range_i18n(date_from, date_to) %>
|
49
|
-
|
50
|
-
=> Du 8 au 9 septembre 2023
|
51
|
-
|
52
|
-
// Example 2 bis
|
53
|
-
<%
|
54
|
-
date_from = Date.today
|
55
|
-
date_to = Date.today + 1.day
|
56
|
-
%>
|
57
|
-
<%= date_range_i18n(date_from, date_to, :long) %>
|
58
|
-
|
59
|
-
=> Du vendredi 8 au samedi 9 septembre 2023
|
60
|
-
|
61
|
-
// Example 3
|
62
|
-
<%
|
63
|
-
date_from = Date.today
|
64
|
-
date_to = Date.today + 1.month
|
65
|
-
%>
|
66
|
-
<%= date_range_i18n(date_from, date_to) %>
|
67
|
-
|
68
|
-
=> Du 8 septembre au 8 octobre 2023
|
69
|
-
|
70
|
-
// Example 3 bis
|
71
|
-
<%
|
72
|
-
date_from = Date.today
|
73
|
-
date_to = Date.today + 1.month
|
74
|
-
%>
|
75
|
-
<%= date_range_i18n(date_from, date_to, :long) %>
|
76
|
-
|
77
|
-
=> Du vendredi 8 septembre au dimanche 8 octobre 2023
|
78
|
-
|
79
|
-
// Example 4
|
80
|
-
<%
|
81
|
-
date_from = Date.today
|
82
|
-
date_to = Date.today + 1.year
|
83
|
-
%>
|
84
|
-
<%= date_range_i18n(date_from, date_to) %>
|
85
|
-
|
86
|
-
=> Du 8 septembre 2023 au 8 septembre 2024
|
87
|
-
|
88
|
-
// Example 4 bis
|
89
|
-
<%
|
90
|
-
date_from = Date.today
|
91
|
-
date_to = Date.today + 1.year
|
92
|
-
%>
|
93
|
-
<%= date_range_i18n(date_from, date_to, :long) %>
|
94
|
-
|
95
|
-
=> Du vendredi 8 septembre 2023 au dimanche 8 septembre 2024
|
96
|
-
|
97
29
|
## Change texts or formats
|
98
30
|
|
99
31
|
This gem is based on I18n. Feel free to overwrite any key you want.
|
100
32
|
Refer to [config/locales/fr.yml](config/locales/fr.yml) to see what can be edited.
|
101
33
|
|
34
|
+
## Tests
|
35
|
+
|
36
|
+
Tests are done with RSpec, and Combustion is used to simulate the Rails app.
|
37
|
+
Rubocop is used to check the syntax.
|
38
|
+
|
39
|
+
- `bundle exec rspec` to launch the tests
|
40
|
+
- `rake rubocop` to launch Rubocop
|
41
|
+
- `rake` to launch both (default)
|
42
|
+
|
102
43
|
## Contributing
|
103
44
|
|
104
45
|
Bug reports and pull requests are welcome on GitHub at https://github.com/noesya/i18n_date_range.
|
data/config/locales/en-GB.yml
CHANGED
@@ -6,10 +6,10 @@ en-GB:
|
|
6
6
|
date:
|
7
7
|
formats:
|
8
8
|
short:
|
9
|
-
day: "
|
10
|
-
day_month: "
|
11
|
-
day_month_year: "
|
9
|
+
day: "%-d"
|
10
|
+
day_month: "%-d %B"
|
11
|
+
day_month_year: "%-d %B %Y"
|
12
12
|
long:
|
13
|
-
day: "%A
|
14
|
-
day_month: "%A,
|
15
|
-
day_month_year: "%A,
|
13
|
+
day: "%A %-d"
|
14
|
+
day_month: "%A, %-d %B"
|
15
|
+
day_month_year: "%A, %-d %B %Y"
|
data/config/locales/en.yml
CHANGED
@@ -6,10 +6,10 @@ en:
|
|
6
6
|
date:
|
7
7
|
formats:
|
8
8
|
short:
|
9
|
-
day: "
|
10
|
-
day_month: "%B
|
11
|
-
day_month_year: "%B
|
9
|
+
day: "%-d"
|
10
|
+
day_month: "%B %-d"
|
11
|
+
day_month_year: "%B %-d, %Y"
|
12
12
|
long:
|
13
|
-
day: "%A
|
14
|
-
day_month: "%A, %B
|
15
|
-
day_month_year: "%A, %B
|
13
|
+
day: "%A %-d"
|
14
|
+
day_month: "%A, %B %-d"
|
15
|
+
day_month_year: "%A, %B %-d, %Y"
|
data/config/locales/fr.yml
CHANGED
@@ -6,10 +6,10 @@ fr:
|
|
6
6
|
date:
|
7
7
|
formats:
|
8
8
|
short:
|
9
|
-
day: "
|
10
|
-
day_month: "
|
11
|
-
day_month_year: "
|
9
|
+
day: "%-d"
|
10
|
+
day_month: "%-d %B"
|
11
|
+
day_month_year: "%-d %B %Y"
|
12
12
|
long:
|
13
|
-
day: "%A
|
14
|
-
day_month: "%A
|
15
|
-
day_month_year: "%A
|
13
|
+
day: "%A %-d"
|
14
|
+
day_month: "%A %-d %B"
|
15
|
+
day_month_year: "%A %-d %B %Y"
|
data/config.ru
ADDED
data/i18n_date_range.gemspec
CHANGED
@@ -29,6 +29,14 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
30
30
|
spec.require_paths = ["lib"]
|
31
31
|
|
32
|
-
|
33
|
-
|
32
|
+
spec.add_dependency "rails"
|
33
|
+
spec.add_dependency "rails-i18n"
|
34
|
+
|
35
|
+
spec.add_development_dependency "bundler"
|
36
|
+
spec.add_development_dependency "combustion"
|
37
|
+
spec.add_development_dependency "rails"
|
38
|
+
spec.add_development_dependency "rails-i18n"
|
39
|
+
spec.add_development_dependency "rspec-rails"
|
40
|
+
spec.add_development_dependency "rubocop"
|
41
|
+
spec.add_development_dependency "rubocop-rails"
|
34
42
|
end
|
@@ -1,46 +1,55 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
# Computing range to choose the correct form
|
1
4
|
class I18nDateRangeGenerator
|
2
5
|
attr_reader :from_date, :to_date, :format
|
3
|
-
|
4
|
-
def self.generate(from_date, to_date, format)
|
6
|
+
|
7
|
+
def self.generate(from_date, to_date, format = :short)
|
5
8
|
new(from_date, to_date, format).to_s
|
6
9
|
end
|
7
10
|
|
8
|
-
def initialize(from_date, to_date, format)
|
11
|
+
def initialize(from_date, to_date, format = :short)
|
9
12
|
@from_date = from_date
|
10
13
|
@to_date = to_date
|
11
14
|
@format = format
|
12
15
|
end
|
13
|
-
|
16
|
+
|
14
17
|
def to_s
|
15
|
-
to_date.blank? ? without_to : with_to
|
18
|
+
to_date.blank? || same_date? ? without_to : with_to
|
16
19
|
end
|
17
20
|
|
18
21
|
protected
|
19
22
|
|
23
|
+
def same_date?
|
24
|
+
to_date == from_date
|
25
|
+
end
|
26
|
+
|
20
27
|
def without_to
|
21
28
|
I18n.t(
|
22
|
-
|
29
|
+
"date_range.without_to",
|
23
30
|
from: format_date(from_date, :day_month_year)
|
24
|
-
)
|
31
|
+
).capitalize
|
25
32
|
end
|
26
33
|
|
27
34
|
def with_to
|
28
35
|
I18n.t(
|
29
|
-
|
30
|
-
from: format_date(from_date, from_format),
|
36
|
+
"date_range.with_to",
|
37
|
+
from: format_date(from_date, from_format),
|
31
38
|
to: format_date(to_date, :day_month_year)
|
32
|
-
)
|
39
|
+
).capitalize
|
33
40
|
end
|
34
41
|
|
35
42
|
def from_format
|
36
43
|
return :day_month_year if different_year?
|
44
|
+
|
37
45
|
return :day_month if different_month?
|
46
|
+
|
38
47
|
:day
|
39
48
|
end
|
40
49
|
|
41
50
|
def format_date(date, key)
|
42
51
|
I18n.l(
|
43
|
-
date,
|
52
|
+
date,
|
44
53
|
format: "#{format}.#{key}".to_sym
|
45
54
|
)
|
46
55
|
end
|
@@ -52,5 +61,4 @@ class I18nDateRangeGenerator
|
|
52
61
|
def different_month?
|
53
62
|
from_date.month != to_date.month
|
54
63
|
end
|
55
|
-
|
56
|
-
end
|
64
|
+
end
|
@@ -1,7 +1,10 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
+
# Rails helper
|
4
|
+
# Format can be :short (default) or :long
|
5
|
+
# <%= date_range_i18n(start, end, :long)
|
6
|
+
module I18nDateRangeHelper
|
3
7
|
def date_range_i18n(from, to = nil, format = :short)
|
4
8
|
I18nDateRangeGenerator.generate(from, to, format)
|
5
9
|
end
|
6
|
-
|
7
|
-
end
|
10
|
+
end
|
data/lib/i18n_date_range.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require "rails"
|
3
4
|
require_relative "i18n_date_range/version"
|
4
5
|
require_relative "i18n_date_range/i18n_date_range_generator"
|
5
6
|
require_relative "i18n_date_range/i18n_date_range_helper"
|
@@ -7,9 +8,10 @@ require_relative "i18n_date_range/i18n_date_range_helper"
|
|
7
8
|
module I18nDateRange
|
8
9
|
class Error < StandardError; end
|
9
10
|
|
11
|
+
# Integration in Rails
|
10
12
|
class Engine < ::Rails::Engine
|
11
13
|
isolate_namespace I18nDateRange
|
12
14
|
|
13
|
-
ActiveSupport.on_load(
|
15
|
+
ActiveSupport.on_load(:action_view) { include I18nDateRangeHelper }
|
14
16
|
end
|
15
17
|
end
|
metadata
CHANGED
@@ -1,15 +1,141 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: i18n_date_range
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- pabois
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-09-
|
12
|
-
dependencies:
|
11
|
+
date: 2023-09-10 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rails-i18n
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: combustion
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rails-i18n
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: rspec-rails
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: rubocop
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: rubocop-rails
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
13
139
|
description: 'Add a new helper to display properly a date range (ex: From 8 to 9 September
|
14
140
|
2023)'
|
15
141
|
email:
|
@@ -23,11 +149,13 @@ files:
|
|
23
149
|
- ".rubocop.yml"
|
24
150
|
- CHANGELOG.md
|
25
151
|
- Gemfile
|
152
|
+
- Gemfile.lock
|
26
153
|
- LICENSE.txt
|
27
154
|
- README.md
|
28
155
|
- Rakefile
|
29
156
|
- bin/console
|
30
157
|
- bin/setup
|
158
|
+
- config.ru
|
31
159
|
- config/locales/en-GB.yml
|
32
160
|
- config/locales/en.yml
|
33
161
|
- config/locales/fr.yml
|
@@ -43,7 +171,7 @@ metadata:
|
|
43
171
|
homepage_uri: https://github.com/noesya/i18n_date_range
|
44
172
|
source_code_uri: https://github.com/noesya/i18n_date_range
|
45
173
|
changelog_uri: https://github.com/noesya/i18n_date_range/CHANGELOG.md
|
46
|
-
post_install_message:
|
174
|
+
post_install_message:
|
47
175
|
rdoc_options: []
|
48
176
|
require_paths:
|
49
177
|
- lib
|
@@ -58,8 +186,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
58
186
|
- !ruby/object:Gem::Version
|
59
187
|
version: '0'
|
60
188
|
requirements: []
|
61
|
-
rubygems_version: 3.
|
62
|
-
signing_key:
|
189
|
+
rubygems_version: 3.4.6
|
190
|
+
signing_key:
|
63
191
|
specification_version: 4
|
64
192
|
summary: Add helper to display a date range
|
65
193
|
test_files: []
|