edtf 3.1.0 → 3.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ci.yml +1 -0
- data/edtf.gemspec +2 -2
- 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 +6 -7
- 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: 6cc486f565cf7987bbb547f9ddb63a8eb50e0f6cd016a409f3eb60caf7f4544b
|
4
|
+
data.tar.gz: de1c6696854d6c7c58a6bb1f133ebe4cd7d363022617a2fe5cf78d3b2e55722d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 27e4c029c50828e797ab21fe727bc850cb80367f0fe74421158dc32387d21b4424ef1614defc3b86bb9a957d397fc792d6f7152dc0c085d93b41f5c4b3c78055
|
7
|
+
data.tar.gz: 4832debc9c007c0e324b6705fb5346b3755235c5b92b19498d46f50324498ff1673c9559e1242b6abdc8e968267c5a849fbaef08d8cd509ed9ab527bcda6ef49
|
data/.github/workflows/ci.yml
CHANGED
data/edtf.gemspec
CHANGED
@@ -12,9 +12,9 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = 'http://github.com/inukshuk/edtf-ruby'
|
13
13
|
s.summary = 'Extended Date/Time Format for Ruby.'
|
14
14
|
s.description = 'A Ruby implementation of the Extended Date/Time Format (EDTF).'
|
15
|
-
s.license = 'BSD-2-Clause-
|
15
|
+
s.license = 'BSD-2-Clause-Views'
|
16
16
|
|
17
|
-
s.add_runtime_dependency('activesupport', '>= 3.0', '<
|
17
|
+
s.add_runtime_dependency('activesupport', '>= 3.0', '< 9.0')
|
18
18
|
|
19
19
|
s.files = `git ls-files`.split("\n") << 'lib/edtf/parser.rb'
|
20
20
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
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.
|
4
|
+
version: 3.2.0
|
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: 2024-11-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
version: '3.0'
|
21
21
|
- - "<"
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: '
|
23
|
+
version: '9.0'
|
24
24
|
type: :runtime
|
25
25
|
prerelease: false
|
26
26
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
version: '3.0'
|
31
31
|
- - "<"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '9.0'
|
34
34
|
description: A Ruby implementation of the Extended Date/Time Format (EDTF).
|
35
35
|
email:
|
36
36
|
executables: []
|
@@ -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
|
@@ -87,7 +86,7 @@ files:
|
|
87
86
|
- spec/spec_helper.rb
|
88
87
|
homepage: http://github.com/inukshuk/edtf-ruby
|
89
88
|
licenses:
|
90
|
-
- BSD-2-Clause-
|
89
|
+
- BSD-2-Clause-Views
|
91
90
|
metadata: {}
|
92
91
|
post_install_message:
|
93
92
|
rdoc_options:
|
@@ -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.
|
113
|
+
rubygems_version: 3.5.6
|
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
|