edtf 3.1.0 → 3.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -0
- data/features/support/env.rb +1 -1
- data/lib/edtf/interval.rb +4 -4
- data/lib/edtf/season.rb +2 -2
- data/lib/edtf/version.rb +1 -1
- data/spec/edtf/interval_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- metadata +3 -4
- data/.travis.yml +0 -17
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 750afc3b14ecab6a3cc5501ce4b3e8f70bc330c446049967912a44b73a5295b2
|
4
|
+
data.tar.gz: a0f03a70d0a4e83e1a71fdee6d19ec85edc17c36707ba0df6f60f7006dc83914
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a25877fc5a242cfc8e936610ae0b4a1cbeb6d71bc0befd2173cafedcaa738c2aaab2f45d9e246ae999dcb73931a504260fec2c2f18a17f512c16d87bc91de81
|
7
|
+
data.tar.gz: d00ae2cc4681b6cabdaec8231347e2c3c9674eb7bfc90d3b599b7d10675ec080af3f4527124b84735490e798b824ad69640edba9122f289f8de181aa3a3b2633
|
data/.github/workflows/ci.yml
CHANGED
data/features/support/env.rb
CHANGED
data/lib/edtf/interval.rb
CHANGED
@@ -211,9 +211,9 @@ module EDTF
|
|
211
211
|
# used to compare values (slower). Returns nil if the first date of the
|
212
212
|
# interval is larger than the last or if the interval has an unknown or
|
213
213
|
# open start.
|
214
|
-
def min
|
214
|
+
def min(&block)
|
215
215
|
if block_given?
|
216
|
-
to_a.min(&
|
216
|
+
to_a.min(&block)
|
217
217
|
else
|
218
218
|
case
|
219
219
|
when unknown_start?, !unknown_end? && !open? && to < from
|
@@ -244,9 +244,9 @@ module EDTF
|
|
244
244
|
# To calculate the dates, precision is taken into account. Thus, the max
|
245
245
|
# Date of "2007/2008" would be 2008-12-31, whilst the max Date of
|
246
246
|
# "2007-12/2008-10" would be 2009-10-31.
|
247
|
-
def max
|
247
|
+
def max(&block)
|
248
248
|
if block_given?
|
249
|
-
to_a.max(&
|
249
|
+
to_a.max(&block)
|
250
250
|
else
|
251
251
|
case
|
252
252
|
when open_end?, unknown_end?, !unknown_start? && to < from
|
data/lib/edtf/season.rb
CHANGED
data/lib/edtf/version.rb
CHANGED
data/spec/edtf/interval_spec.rb
CHANGED
@@ -153,9 +153,9 @@ module EDTF
|
|
153
153
|
end
|
154
154
|
|
155
155
|
it 'may not have an open start' do
|
156
|
-
expect
|
157
|
-
|
158
|
-
|
156
|
+
expect {
|
157
|
+
Interval.new(:open, Date.today)
|
158
|
+
}.to raise_error(ArgumentError)
|
159
159
|
end
|
160
160
|
end
|
161
161
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: edtf
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sylvester Keil
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2023-01-31 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -44,7 +44,6 @@ files:
|
|
44
44
|
- ".gitignore"
|
45
45
|
- ".rspec"
|
46
46
|
- ".simplecov"
|
47
|
-
- ".travis.yml"
|
48
47
|
- Gemfile
|
49
48
|
- LICENSE
|
50
49
|
- README.md
|
@@ -111,7 +110,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
111
110
|
- !ruby/object:Gem::Version
|
112
111
|
version: '0'
|
113
112
|
requirements: []
|
114
|
-
rubygems_version: 3.2
|
113
|
+
rubygems_version: 3.4.2
|
115
114
|
signing_key:
|
116
115
|
specification_version: 4
|
117
116
|
summary: Extended Date/Time Format for Ruby.
|
data/.travis.yml
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
language: ruby
|
2
|
-
bundler_args: --without debug extra
|
3
|
-
sudo: false
|
4
|
-
cache: bundler
|
5
|
-
script: bundle exec rake test_with_coveralls
|
6
|
-
rvm:
|
7
|
-
- 2.5.0
|
8
|
-
- 2.4.3
|
9
|
-
- 2.3.6
|
10
|
-
- 2.2.9
|
11
|
-
- jruby-9.1.16.0
|
12
|
-
notifications:
|
13
|
-
email:
|
14
|
-
- sk@semicolon.at
|
15
|
-
- namyra@gmail.com
|
16
|
-
on_success: change
|
17
|
-
on_failure: change
|