edtf 3.0.3 → 3.0.7

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
- SHA1:
3
- metadata.gz: 4eaa12c5a18d89168a79a4440ab57ad31f30f1a6
4
- data.tar.gz: 0d519d883e3fe9b935b93dde20c15377109576a2
2
+ SHA256:
3
+ metadata.gz: b7f7b4973ec4c8f3c5b12db9bfc6076dac982cfab422f700a31b5a0754b19611
4
+ data.tar.gz: af05e5ed8581f9ecf1394e948a89d15fc4786f5c44be26cdae90df0952aacbc5
5
5
  SHA512:
6
- metadata.gz: 3350c1191ede7bb72951ad845c220e0ab87d30315b1d4677660922b2b5c831d7aa3331f3694b4105f4a7bbc3b0984a24af371af840d0a28764a13dc652e57c8c
7
- data.tar.gz: 8d1c8954f197ed4871217c151b8619a27b247068d470a843a5a74d941f627dc477408fe3fb9377e6fb431768a2697236f3dbdfa84b349f9a263818ae8f0f4ce4
6
+ metadata.gz: 1a3c4ada19ea18a3cf79e39fa504269d76fb8a062f47d8990123eca1e6da5c30ffb9abcb6aea4656258589c23141509aca66a6eb83208add92884e2bb1ce6e78
7
+ data.tar.gz: e3e7ec3482a2eb14319cc5c10eadc60b93b36334cf9a30d333ba132a18edea386ad90723ef43140f855dd6c462f1172f6ae8fcd0838ad9294b9be51ca9339b25
data/.travis.yml CHANGED
@@ -2,13 +2,13 @@ language: ruby
2
2
  bundler_args: --without debug extra
3
3
  sudo: false
4
4
  cache: bundler
5
- before_install:
6
- - gem install bundler
7
5
  script: bundle exec rake test_with_coveralls
8
6
  rvm:
9
- - 2.3.1
10
- - 2.2.5
11
- - jruby-9.0.5.0
7
+ - 2.5.0
8
+ - 2.4.3
9
+ - 2.3.6
10
+ - 2.2.9
11
+ - jruby-9.1.16.0
12
12
  notifications:
13
13
  email:
14
14
  - sk@semicolon.at
data/README.md CHANGED
@@ -30,7 +30,7 @@ overlaps (version 3.x and 4.x are supported).
30
30
 
31
31
  A variation of EDTF will part of the upcoming ISO 8601-2 standard. EDTF-Ruby
32
32
  does not support this new version of EDTF yet, but if you are curious,
33
- [EDTF.js](inukshuk/edtf.js), an ES6 implementation is already available.
33
+ [EDTF.js](https://github.com/inukshuk/edtf.js), an ES6 implementation is already available.
34
34
 
35
35
  Quickstart
36
36
  ----------
data/edtf.gemspec CHANGED
@@ -15,7 +15,7 @@ Gem::Specification.new do |s|
15
15
  s.description = 'A Ruby implementation of the Extended Date/Time Format (EDTF).'
16
16
  s.license = 'BSD-2-Clause-FreeBSD'
17
17
 
18
- s.add_runtime_dependency('activesupport', '>= 3.0', '< 6.0')
18
+ s.add_runtime_dependency('activesupport', '>= 3.0', '< 8.0')
19
19
 
20
20
  s.files = `git ls-files`.split("\n") << 'lib/edtf/parser.rb'
21
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -31,19 +31,19 @@ Then /^the hours should be "([^"]*)"$/ do |hours|
31
31
  expect(@date.hour).to eq(hours.to_i)
32
32
  end
33
33
 
34
- Then /^the year should be "([^"]*)" \(UTC\)$/ do |year|
34
+ Then /^the year should be "([^"]*)" UTC$/ do |year|
35
35
  expect(@date.to_time.utc.year).to eq(year.to_i)
36
36
  end
37
37
 
38
- Then /^the month should be "([^"]*)" \(UTC\)$/ do |month|
38
+ Then /^the month should be "([^"]*)" UTC$/ do |month|
39
39
  expect(@date.to_time.utc.month).to eq(month.to_i)
40
40
  end
41
41
 
42
- Then /^the day should be "([^"]*)" \(UTC\)$/ do |day|
42
+ Then /^the day should be "([^"]*)" UTC$/ do |day|
43
43
  expect(@date.to_time.utc.day).to eq(day.to_i)
44
44
  end
45
45
 
46
- Then /^the hours should be "([^"]*)" \(UTC\)$/ do |hours|
46
+ Then /^the hours should be "([^"]*)" UTC$/ do |hours|
47
47
  expect(@date.to_time.utc.hour).to eq(hours.to_i)
48
48
  end
49
49
 
data/lib/edtf/epoch.rb CHANGED
@@ -61,9 +61,9 @@ module EDTF
61
61
  false
62
62
  end
63
63
 
64
- def each
64
+ def each(&block)
65
65
  if block_given?
66
- to_range.each(&Proc.new)
66
+ to_range.each(&block)
67
67
  else
68
68
  to_enum
69
69
  end
data/lib/edtf/interval.rb CHANGED
@@ -216,7 +216,7 @@ module EDTF
216
216
  to_a.min(&Proc.new)
217
217
  else
218
218
  case
219
- when unknown_start?, !open? && to < from
219
+ when unknown_start?, !unknown_end? && !open? && to < from
220
220
  nil
221
221
  when from.day_precision?
222
222
  from