iso8601 0.4.0 → 0.4.1

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.
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.8.7
4
+ - 1.9.2
5
+ - 1.9.3
6
+ - 2.0.0
7
+ script: bundle exec rspec spec
data/README.md CHANGED
@@ -4,6 +4,11 @@ ISO8601 is a simple implementation of the ISO 8601 (Data elements and
4
4
  interchange formats — Information interchange — Representation of dates and
5
5
  times) standard.
6
6
 
7
+ ## Build status
8
+
9
+ [![Build Status](https://secure.travis-ci.org/arnau/ISO8601.png?branch=master)](http://travis-ci.org/arnau/ISO8601/)
10
+
11
+
7
12
  ## Comments
8
13
 
9
14
  ### Duration sign
@@ -43,6 +48,7 @@ so:
43
48
  * [Pelle Braendgaard](https://github.com/pelle)
44
49
  * [Takahiro Noda](https://github.com/tnoda)
45
50
  * [Porras](https://github.com/porras)
51
+ * [Kenichi Kamiya](https://github.com/kachick)
46
52
 
47
53
  ## License
48
54
 
data/lib/iso8601.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module ISO8601
4
- VERSION = '0.4.0'
4
+ VERSION = '0.4.1'
5
5
  end
6
6
 
7
7
  require 'time'
@@ -91,7 +91,7 @@ module ISO8601
91
91
  ##
92
92
  # Addition
93
93
  #
94
- # @param [ISO8601::DateTime] The seconds to add
94
+ # @param [ISO8601::DateTime] d The seconds to add
95
95
  def +(d)
96
96
  raise TypeError unless d.kind_of? Numeric
97
97
  ISO8601::DateTime.new((Time.utc(@year, @month, @day, @hour, @minute, @second) + d).iso8601)
@@ -99,7 +99,7 @@ module ISO8601
99
99
  ##
100
100
  # Substraction
101
101
  #
102
- # @param [ISO8601::DateTime] The seconds to substract
102
+ # @param [ISO8601::DateTime] d The seconds to substract
103
103
  def -(d)
104
104
  raise TypeError unless d.kind_of? Numeric
105
105
  ISO8601::DateTime.new((Time.utc(@year, @month, @day, @hour, @minute, @second) - d).iso8601)
@@ -120,7 +120,7 @@ module ISO8601
120
120
  elsif !day.nil? and (Time.parse(@date_time).month != month)
121
121
  raise RangeError
122
122
  end
123
- rescue ArgumentError => e
123
+ rescue ArgumentError
124
124
  raise RangeError
125
125
  end
126
126
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iso8601
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-15 00:00:00.000000000 Z
12
+ date: 2013-04-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70151454366940 !ruby/object:Gem::Requirement
16
+ requirement: &70318299471920 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '2.0'
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70151454366940
24
+ version_requirements: *70318299471920
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: ZenTest
27
- requirement: &70151454365560 !ruby/object:Gem::Requirement
27
+ requirement: &70318299469780 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: '4.8'
33
33
  type: :development
34
34
  prerelease: false
35
- version_requirements: *70151454365560
35
+ version_requirements: *70318299469780
36
36
  description: ! " ISO8601 is a simple implementation in Ruby of the ISO 8601 (Data
37
37
  elements and \n interchange formats - Information interchange - Representation
38
38
  of dates \n and times) standard.\n"
@@ -43,6 +43,7 @@ extra_rdoc_files: []
43
43
  files:
44
44
  - .gitignore
45
45
  - .rspec
46
+ - .travis.yml
46
47
  - Gemfile
47
48
  - LICENSE
48
49
  - README.md