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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 508a9d4cc114b76f7f7c4b96e92322fbe936d20e4c879258cc07bde58a469b47
4
- data.tar.gz: a818969998194574dbeb8912f4652b0574e50343ba5aac39a88e956534d3a3cf
3
+ metadata.gz: 750afc3b14ecab6a3cc5501ce4b3e8f70bc330c446049967912a44b73a5295b2
4
+ data.tar.gz: a0f03a70d0a4e83e1a71fdee6d19ec85edc17c36707ba0df6f60f7006dc83914
5
5
  SHA512:
6
- metadata.gz: 574b53436042ada550507f2c7432ccec439389eb812161850e4c4e7004554c3e1838d853b49966448c2cf84ffdd607af971eb71f9d3932dfc39e639c6b004fef
7
- data.tar.gz: 31708d12d6cbef246d378d67ef1d5c799e586409269f88e539ba395695a255a66a6f65f4d34850e8e941073954fdc77c391561529c44f62c0fbf11290ca6fda1
6
+ metadata.gz: 5a25877fc5a242cfc8e936610ae0b4a1cbeb6d71bc0befd2173cafedcaa738c2aaab2f45d9e246ae999dcb73931a504260fec2c2f18a17f512c16d87bc91de81
7
+ data.tar.gz: d00ae2cc4681b6cabdaec8231347e2c3c9674eb7bfc90d3b599b7d10675ec080af3f4527124b84735490e798b824ad69640edba9122f289f8de181aa3a3b2633
@@ -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:
@@ -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.1.1'.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.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: 2022-07-08 00:00:00.000000000 Z
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.15
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