edtf 3.1.0 → 3.2.0

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
  SHA256:
3
- metadata.gz: 508a9d4cc114b76f7f7c4b96e92322fbe936d20e4c879258cc07bde58a469b47
4
- data.tar.gz: a818969998194574dbeb8912f4652b0574e50343ba5aac39a88e956534d3a3cf
3
+ metadata.gz: 6cc486f565cf7987bbb547f9ddb63a8eb50e0f6cd016a409f3eb60caf7f4544b
4
+ data.tar.gz: de1c6696854d6c7c58a6bb1f133ebe4cd7d363022617a2fe5cf78d3b2e55722d
5
5
  SHA512:
6
- metadata.gz: 574b53436042ada550507f2c7432ccec439389eb812161850e4c4e7004554c3e1838d853b49966448c2cf84ffdd607af971eb71f9d3932dfc39e639c6b004fef
7
- data.tar.gz: 31708d12d6cbef246d378d67ef1d5c799e586409269f88e539ba395695a255a66a6f65f4d34850e8e941073954fdc77c391561529c44f62c0fbf11290ca6fda1
6
+ metadata.gz: 27e4c029c50828e797ab21fe727bc850cb80367f0fe74421158dc32387d21b4424ef1614defc3b86bb9a957d397fc792d6f7152dc0c085d93b41f5c4b3c78055
7
+ data.tar.gz: 4832debc9c007c0e324b6705fb5346b3755235c5b92b19498d46f50324498ff1673c9559e1242b6abdc8e968267c5a849fbaef08d8cd509ed9ab527bcda6ef49
@@ -17,6 +17,7 @@ jobs:
17
17
  - '2.7'
18
18
  - '3.0'
19
19
  - '3.1'
20
+ - '3.2'
20
21
  - 'jruby'
21
22
 
22
23
  steps:
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-FreeBSD'
15
+ s.license = 'BSD-2-Clause-Views'
16
16
 
17
- s.add_runtime_dependency('activesupport', '>= 3.0', '< 8.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")
@@ -5,7 +5,7 @@ rescue LoadError
5
5
  end
6
6
 
7
7
  begin
8
- require 'debug'
8
+ require 'debug' unless RUBY_PLATFORM == 'java'
9
9
  rescue LoadError
10
10
  # ignore
11
11
  end
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(&Proc.new)
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(&Proc.new)
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
@@ -107,9 +107,9 @@ module EDTF
107
107
  min.day_precision! <= other && other <= max.day_precision!
108
108
  end
109
109
 
110
- def each
110
+ def each(&block)
111
111
  if block_given?
112
- to_range.each(&Proc.new)
112
+ to_range.each(&block)
113
113
  self
114
114
  else
115
115
  to_enum
data/lib/edtf/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module EDTF
2
- VERSION = '3.1.0'.freeze
2
+ VERSION = '3.2.0'.freeze
3
3
  end
@@ -153,9 +153,9 @@ module EDTF
153
153
  end
154
154
 
155
155
  it 'may not have an open start' do
156
- expect(
157
- proc { Interval.new(:open, Date.today) }
158
- ).to raise_error(ArgumentError)
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
@@ -5,7 +5,7 @@ rescue LoadError
5
5
  end
6
6
 
7
7
  begin
8
- require 'debug'
8
+ require 'debug' unless RUBY_PLATFORM == 'java'
9
9
  rescue LoadError
10
10
  # ignore
11
11
  end
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.0
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: 2022-07-08 00:00:00.000000000 Z
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: '8.0'
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: '8.0'
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-FreeBSD
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.2.15
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