iso8601 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -7
- data/CHANGELOG.md +23 -0
- data/README.md +4 -1
- data/iso8601.gemspec +1 -1
- data/lib/iso8601/dateTime.rb +2 -0
- data/lib/iso8601/version.rb +1 -1
- data/spec/iso8601/dateTime_spec.rb +1 -0
- data/spec/iso8601/date_spec.rb +1 -0
- data/spec/iso8601/time_spec.rb +2 -0
- metadata +48 -41
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
5
|
-
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1e768c6e31ed30d4c5275356329d3eeef4508fd3
|
4
|
+
data.tar.gz: 3a9ba019e31b7874535e200a067e5e78e583e06c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 18b394d3a4ad6fdd33546d667743aeac309213c40793e66c0f03e0d05da7d0ad6f6f8ae259d7ed4401d2b847e477abc683ec54f1b712487d7d6ade37a28b15b6
|
7
|
+
data.tar.gz: 4d4f9ef990d4ff79a0023169e96de92200af682835c6124bcf78f98267a31f7eb0b8c2260e1c0909a2cbc4c3b323fa54f1ecae83f23a253fad9e37a3e36c84d5
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
|
2
|
+
## Changes for 0.5.2
|
3
|
+
|
4
|
+
* Fix `DateTime` when handling empty strings.
|
5
|
+
|
6
|
+
## Changes for 0.5.1
|
7
|
+
|
8
|
+
* Fix durations with sign.
|
9
|
+
|
10
|
+
## Changes for 0.5
|
11
|
+
|
12
|
+
* Drop support for Ruby 1.8.7.
|
13
|
+
* Add support for Rubinius 2.
|
14
|
+
* `ISO8601::DateTime#century` no longer exists. Truncated representations were
|
15
|
+
removed in ISO 8601:2004.
|
16
|
+
* `ISO8601::DateTime#zone` delegates to core `DateTime#zone`.
|
17
|
+
* `ISO8601::DateTime#timezone` no longer exists. Now it delegates to
|
18
|
+
`DateTime#zone`.
|
19
|
+
* A date can have sign: `-1000-01-01`, `+2014-05-06T10:11:12Z`.
|
20
|
+
* A date time can be converted to an array of atoms with `#to_a`.
|
21
|
+
* Ordinal dates supported.
|
22
|
+
* A date component is represented by `ISO8601::Date`.
|
23
|
+
* Week date pattern (YYYY-Wdww, YYYY-Www-D).
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ times) standard.
|
|
16
16
|
* RBX 2
|
17
17
|
|
18
18
|
|
19
|
-
## Comments
|
19
|
+
## Comments about this implementation
|
20
20
|
|
21
21
|
### Duration sign
|
22
22
|
|
@@ -97,6 +97,9 @@ removed in ISO 8601:2004.
|
|
97
97
|
* A date component is represented by `ISO8601::Date`.
|
98
98
|
* Week date pattern (YYYY-Wdww, YYYY-Www-D).
|
99
99
|
|
100
|
+
Check the [changelog](https://github.com/arnau/ISO8601/blob/master/CHANGELOG.md)
|
101
|
+
for a more complete list.
|
102
|
+
|
100
103
|
|
101
104
|
## TODO
|
102
105
|
|
data/iso8601.gemspec
CHANGED
data/lib/iso8601/dateTime.rb
CHANGED
data/lib/iso8601/version.rb
CHANGED
@@ -4,6 +4,7 @@ require 'spec_helper'
|
|
4
4
|
|
5
5
|
describe ISO8601::DateTime do
|
6
6
|
it "should raise a ISO8601::Errors::UnknownPattern for any unknown pattern" do
|
7
|
+
expect { ISO8601::DateTime.new('') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
7
8
|
expect { ISO8601::DateTime.new('2') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
8
9
|
expect { ISO8601::DateTime.new('20') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
9
10
|
expect { ISO8601::DateTime.new('201') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
data/spec/iso8601/date_spec.rb
CHANGED
@@ -2,6 +2,7 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe ISO8601::Date do
|
4
4
|
it "should raise an error for any unknown pattern" do
|
5
|
+
expect { ISO8601::Date.new('') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
5
6
|
expect { ISO8601::Date.new('2') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
6
7
|
expect { ISO8601::Date.new('20') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
7
8
|
expect { ISO8601::Date.new('201') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
data/spec/iso8601/time_spec.rb
CHANGED
@@ -2,6 +2,8 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe ISO8601::Time do
|
4
4
|
it "should raise an error for any unknown pattern" do
|
5
|
+
expect { ISO8601::Time.new('') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
6
|
+
expect { ISO8601::Time.new('T') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
5
7
|
expect { ISO8601::Time.new('T10:3012+0400') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
6
8
|
expect { ISO8601::Time.new('T10:30:12+0400') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
7
9
|
expect { ISO8601::Time.new('T10:30:12+040') }.to raise_error(ISO8601::Errors::UnknownPattern)
|
metadata
CHANGED
@@ -1,48 +1,54 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: iso8601
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
|
-
authors:
|
6
|
+
authors:
|
7
7
|
- Arnau Siches
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
version_requirements: &id001 !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - ~>
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: "2.14"
|
11
|
+
date: 2014-08-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
20
14
|
name: rspec
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.14'
|
21
20
|
type: :development
|
22
|
-
requirement: *id001
|
23
21
|
prerelease: false
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
version: "0"
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.14'
|
27
|
+
- !ruby/object:Gem::Dependency
|
31
28
|
name: rerun
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
32
34
|
type: :development
|
33
|
-
requirement: *id002
|
34
35
|
prerelease: false
|
35
|
-
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
description: " ISO8601 is a simple implementation in Ruby of the ISO 8601 (Data
|
42
|
+
elements and \n interchange formats - Information interchange - Representation
|
43
|
+
of dates \n and times) standard.\n"
|
36
44
|
email: arnau.siches@gmail.com
|
37
45
|
executables: []
|
38
|
-
|
39
46
|
extensions: []
|
40
|
-
|
41
47
|
extra_rdoc_files: []
|
42
|
-
|
43
|
-
|
44
|
-
- .
|
45
|
-
- .
|
48
|
+
files:
|
49
|
+
- ".gitignore"
|
50
|
+
- ".travis.yml"
|
51
|
+
- CHANGELOG.md
|
46
52
|
- Gemfile
|
47
53
|
- LICENSE
|
48
54
|
- README.md
|
@@ -63,29 +69,30 @@ files:
|
|
63
69
|
- spec/iso8601/time_spec.rb
|
64
70
|
- spec/spec_helper.rb
|
65
71
|
homepage: https://github.com/arnau/ISO8601
|
66
|
-
licenses:
|
72
|
+
licenses:
|
67
73
|
- MIT
|
68
74
|
metadata: {}
|
69
|
-
|
70
75
|
post_install_message:
|
71
76
|
rdoc_options: []
|
72
|
-
|
73
|
-
require_paths:
|
77
|
+
require_paths:
|
74
78
|
- lib
|
75
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
76
|
-
requirements:
|
77
|
-
-
|
78
|
-
|
79
|
-
|
80
|
-
|
79
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - ">="
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '0'
|
81
89
|
requirements: []
|
82
|
-
|
83
90
|
rubyforge_project: iso8601
|
84
91
|
rubygems_version: 2.2.2
|
85
92
|
signing_key:
|
86
93
|
specification_version: 4
|
87
94
|
summary: Ruby parser to work with ISO 8601 dateTimes and durations - http://en.wikipedia.org/wiki/ISO_8601
|
88
|
-
test_files:
|
95
|
+
test_files:
|
89
96
|
- spec/iso8601/atoms_spec.rb
|
90
97
|
- spec/iso8601/dateTime_spec.rb
|
91
98
|
- spec/iso8601/date_spec.rb
|