chronic_duration 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.8.1
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
- # DO NOT EDIT THIS FILE
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run `rake gemspec`
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{chronic_duration}
8
- s.version = "0.8.0"
8
+ s.version = "0.8.1"
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{2009-12-15}
12
+ s.date = %q{2010-01-01}
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 = [
@@ -48,3 +48,4 @@ Gem::Specification.new do |s|
48
48
  s.add_dependency(%q<rspec>, [">= 0"])
49
49
  end
50
50
  end
51
+
@@ -108,7 +108,8 @@ private
108
108
  end
109
109
 
110
110
  def cleanup(string)
111
- res = filter_by_type(Numerizer.numerize(string))
111
+ res = string.downcase
112
+ res = filter_by_type(Numerizer.numerize(res))
112
113
  res = res.gsub(float_matcher) {|n| " #{n} "}.squeeze(' ').strip
113
114
  res = filter_through_white_list(res)
114
115
  end
@@ -7,6 +7,7 @@ describe ChronicDuration, '.parse' do
7
7
  '1:20.51' => 60 + 20.51,
8
8
  '4:01:01' => 4 * 3600 + 60 + 1,
9
9
  '3 mins 4 sec' => 3 * 60 + 4,
10
+ '3 Mins 4 Sec' => 3 * 60 + 4,
10
11
  'three mins four sec' => 3 * 60 + 4,
11
12
  '2 hrs 20 min' => 2 * 3600 + 20 * 60,
12
13
  '2h20min' => 2 * 3600 + 20 * 60,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chronic_duration
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.8.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - hpoydar
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-15 00:00:00 -05:00
12
+ date: 2010-01-01 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency