chronic_duration 0.9.1 → 0.9.2

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.
@@ -50,7 +50,7 @@ ChronicDuration.raise_exceptions can be set to true to raise exceptions when the
50
50
 
51
51
  == Contributors
52
52
 
53
- brianjlandau, jduff, olauzon
53
+ brianjlandau, jduff, olauzon, roboman
54
54
 
55
55
  == TODO
56
56
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.1
1
+ 0.9.2
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{chronic_duration}
8
- s.version = "0.9.1"
8
+ s.version = "0.9.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["hpoydar"]
12
- s.date = %q{2010-03-09}
12
+ s.date = %q{2010-08-30}
13
13
  s.description = %q{A simple Ruby natural language parser for elapsed time. (For example, 4 hours and 30 minutes, 6 minutes 4 seconds, 3 days, etc.) Returns all results in seconds. Will return an integer unless you get tricky and need a float. (4 minutes and 13.47 seconds, for example.) The reverse can also be performed via the output method.}
14
14
  s.email = %q{hpoydar@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -29,7 +29,7 @@ Gem::Specification.new do |s|
29
29
  s.homepage = %q{http://github.com/hpoydar/chronic_duration}
30
30
  s.rdoc_options = ["--charset=UTF-8"]
31
31
  s.require_paths = ["lib"]
32
- s.rubygems_version = %q{1.3.6}
32
+ s.rubygems_version = %q{1.3.7}
33
33
  s.summary = %q{A Ruby natural language parser for elapsed time}
34
34
  s.test_files = [
35
35
  "spec/chronic_duration_spec.rb"
@@ -39,7 +39,7 @@ Gem::Specification.new do |s|
39
39
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
40
40
  s.specification_version = 3
41
41
 
42
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
42
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
43
43
  s.add_development_dependency(%q<rspec>, [">= 0"])
44
44
  else
45
45
  s.add_dependency(%q<rspec>, [">= 0"])
@@ -215,6 +215,7 @@ private
215
215
  'w' => 'weeks',
216
216
  'months' => 'months',
217
217
  'mos' => 'months',
218
+ 'month' => 'months',
218
219
  'years' => 'years',
219
220
  'year' => 'years',
220
221
  'yrs' => 'years',
@@ -230,4 +231,4 @@ private
230
231
  self.mappings.map {|k, v| k}
231
232
  end
232
233
 
233
- end
234
+ end
@@ -20,7 +20,9 @@ describe ChronicDuration, '.parse' do
20
20
  'four hours, and fourty minutes' => 4 * 3600 + 40 * 60,
21
21
  '3 weeks and, 2 days' => 3600 * 24 * 7 * 3 + 3600 * 24 * 2,
22
22
  '3 weeks, plus 2 days' => 3600 * 24 * 7 * 3 + 3600 * 24 * 2,
23
- '3 weeks with 2 days' => 3600 * 24 * 7 * 3 + 3600 * 24 * 2
23
+ '3 weeks with 2 days' => 3600 * 24 * 7 * 3 + 3600 * 24 * 2,
24
+ '1 month' => 3600 * 24 * 30,
25
+ '2 months' => 3600 * 24 * 30 * 2
24
26
  }
25
27
 
26
28
  it "should return nil if the string can't be parsed" do
@@ -161,4 +163,4 @@ describe ChronicDuration, "private methods" do
161
163
 
162
164
  end
163
165
 
164
- end
166
+ end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronic_duration
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 63
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 9
8
- - 1
9
- version: 0.9.1
9
+ - 2
10
+ version: 0.9.2
10
11
  platform: ruby
11
12
  authors:
12
13
  - hpoydar
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-09 00:00:00 -05:00
18
+ date: 2010-08-30 00:00:00 -04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: rspec
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - ">="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 3
27
30
  segments:
28
31
  - 0
29
32
  version: "0"
@@ -57,23 +60,27 @@ rdoc_options:
57
60
  require_paths:
58
61
  - lib
59
62
  required_ruby_version: !ruby/object:Gem::Requirement
63
+ none: false
60
64
  requirements:
61
65
  - - ">="
62
66
  - !ruby/object:Gem::Version
67
+ hash: 3
63
68
  segments:
64
69
  - 0
65
70
  version: "0"
66
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
+ none: false
67
73
  requirements:
68
74
  - - ">="
69
75
  - !ruby/object:Gem::Version
76
+ hash: 3
70
77
  segments:
71
78
  - 0
72
79
  version: "0"
73
80
  requirements: []
74
81
 
75
82
  rubyforge_project:
76
- rubygems_version: 1.3.6
83
+ rubygems_version: 1.3.7
77
84
  signing_key:
78
85
  specification_version: 3
79
86
  summary: A Ruby natural language parser for elapsed time