chronic 0.2.3 → 0.4.0

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.
Files changed (63) hide show
  1. data/HISTORY.md +103 -0
  2. data/LICENSE +21 -0
  3. data/Manifest.txt +16 -5
  4. data/README.md +171 -0
  5. data/Rakefile +136 -15
  6. data/benchmark/benchmark.rb +13 -0
  7. data/chronic.gemspec +82 -0
  8. data/lib/chronic/chronic.rb +65 -147
  9. data/lib/chronic/grabber.rb +13 -17
  10. data/lib/chronic/handlers.rb +216 -138
  11. data/lib/chronic/mini_date.rb +27 -0
  12. data/lib/chronic/numerizer.rb +120 -0
  13. data/lib/chronic/ordinal.rb +11 -16
  14. data/lib/chronic/pointer.rb +11 -13
  15. data/lib/chronic/repeater.rb +117 -106
  16. data/lib/chronic/repeaters/repeater_day.rb +50 -43
  17. data/lib/chronic/repeaters/repeater_day_name.rb +49 -42
  18. data/lib/chronic/repeaters/repeater_day_portion.rb +82 -80
  19. data/lib/chronic/repeaters/repeater_fortnight.rb +60 -53
  20. data/lib/chronic/repeaters/repeater_hour.rb +50 -43
  21. data/lib/chronic/repeaters/repeater_minute.rb +50 -43
  22. data/lib/chronic/repeaters/repeater_month.rb +63 -56
  23. data/lib/chronic/repeaters/repeater_month_name.rb +91 -82
  24. data/lib/chronic/repeaters/repeater_season.rb +125 -20
  25. data/lib/chronic/repeaters/repeater_season_name.rb +43 -22
  26. data/lib/chronic/repeaters/repeater_second.rb +40 -33
  27. data/lib/chronic/repeaters/repeater_time.rb +118 -106
  28. data/lib/chronic/repeaters/repeater_week.rb +64 -57
  29. data/lib/chronic/repeaters/repeater_weekday.rb +86 -0
  30. data/lib/chronic/repeaters/repeater_weekend.rb +58 -51
  31. data/lib/chronic/repeaters/repeater_year.rb +58 -50
  32. data/lib/chronic/scalar.rb +37 -27
  33. data/lib/chronic/separator.rb +34 -37
  34. data/lib/chronic/span.rb +31 -0
  35. data/lib/chronic/tag.rb +26 -0
  36. data/lib/chronic/time_zone.rb +9 -10
  37. data/lib/chronic/token.rb +35 -0
  38. data/lib/chronic.rb +34 -25
  39. data/test/helper.rb +6 -0
  40. data/test/test_Chronic.rb +22 -18
  41. data/test/test_DaylightSavings.rb +118 -0
  42. data/test/test_Handler.rb +37 -38
  43. data/test/test_Numerizer.rb +66 -42
  44. data/test/test_RepeaterDayName.rb +15 -16
  45. data/test/test_RepeaterFortnight.rb +16 -17
  46. data/test/test_RepeaterHour.rb +22 -19
  47. data/test/test_RepeaterMinute.rb +34 -0
  48. data/test/test_RepeaterMonth.rb +16 -17
  49. data/test/test_RepeaterMonthName.rb +17 -18
  50. data/test/test_RepeaterTime.rb +20 -22
  51. data/test/test_RepeaterWeek.rb +16 -17
  52. data/test/test_RepeaterWeekday.rb +55 -0
  53. data/test/test_RepeaterWeekend.rb +21 -22
  54. data/test/test_RepeaterYear.rb +17 -18
  55. data/test/test_Span.rb +5 -6
  56. data/test/test_Time.rb +11 -12
  57. data/test/test_Token.rb +5 -6
  58. data/test/test_parsing.rb +395 -208
  59. metadata +68 -52
  60. data/History.txt +0 -53
  61. data/README.txt +0 -149
  62. data/lib/numerizer/numerizer.rb +0 -103
  63. data/test/suite.rb +0 -9
data/HISTORY.md ADDED
@@ -0,0 +1,103 @@
1
+ # 0.4.0 / 2011-06-04
2
+
3
+ * Ensure context is being passed through grabbers. Now "Sunday at 2:18pm"
4
+ with `:context => :past` will return the correct date
5
+ * Support parsing ordinal strings (eg first, twenty third => 1st, 23rd)
6
+ * Seasons now ignore DST and return 00 as an hour
7
+ * Support parsing 2 digit years and added `ambiguous_year_future_bias` option
8
+ * Support parsing 'thurs' for Thursday
9
+ * Fix pre_normalize() to remove periods before numerizing
10
+ * Fix RepeaterDays to not add an extra hour in future tense. This meant
11
+ when parsing 'yesterday' after 11PM, Chronic would return today
12
+ * Discard any prefixed 0 for time strings when using post noon portion
13
+ * Gemspec updates for RubyGems deprecations
14
+ * Ensure 0:10 is treated like 00:10
15
+ * Ensure we load classes after setting Chronic class instance variables
16
+ so we can debug initialization and do assignments at compile time
17
+ * Added a Tag.scan_for method for DRYing up some scanning code
18
+ * Move some classes into their own files for maintainability
19
+ * Numerizer.andition should be a private class method, make it so
20
+ * Namespaced Numerizer, Season and MiniDate (Sascha Teske)
21
+ * Support for Ruby 1.9 (Dave Lee, Aaron Hurley)
22
+ * Fix `:context => :past` where parsed date is in current month (Marc Hedlund)
23
+ * Fix undefined variable in RepeaterHour (Ryan Garver)
24
+ * Added support for parsing 'Fourty' as another mis-spelling (Lee Reilly)
25
+ * Added ordinal format support: ie 'February 14th, 2004' (Jeff Felchner)
26
+ * Fix dates when working with daylight saving times Mike Mangino
27
+
28
+ # 0.3.0 / 2010-10-22
29
+
30
+ * Fix numerizer number combination bug (27 Oct 2006 7:30pm works now)
31
+ * Allow numeric timezone offset (e.g -0500)
32
+ * Disregard commas (so as to not return nil)
33
+ * Fix parse of (am|pm|oclock) separation to handle "Ham sandwich" properly
34
+ * Handle 'on' e.g. 5pm on Monday
35
+ * Support seasons
36
+ * Support weekend/weekday
37
+ * Add endianness option
38
+ * Update version number in the module
39
+ * Fix/improve logic checks in Ordinal, and Scalar
40
+ * Parse 'a' or 'p' as 'am' and 'pm' google-calendar style
41
+ * Dates < 1 are not valid
42
+ * Fix bugs related to timezone offset
43
+ * Use RakeGem for build management
44
+ * Reformat README and HISTORY to use Markdown
45
+ * Global whitespace removal
46
+
47
+ # 0.2.3
48
+
49
+ * Fix 12am/12pm
50
+
51
+ # 0.2.2
52
+
53
+ * Add missing files (damn you manifest)
54
+
55
+ # 0.2.1
56
+
57
+ * Fix time overflow issue
58
+ * Implement "next" for minute repeater
59
+ * Generalize time dealiasing to dealias regardless of day portion and
60
+ time position
61
+ * Add additional token match for cases like "friday evening at 7" and
62
+ "tomorrow evening at 7"
63
+ * Add support for Time#to_s output format: "Mon Apr 02 17:00:00 PDT 2007"
64
+
65
+ # 0.2.0 2007-03-20
66
+
67
+ * Implement numerizer, allowing the use of number words (e.g. five weeks ago)
68
+
69
+ # 0.1.6 2006-01-15
70
+
71
+ * Add 'weekend' support
72
+
73
+ # 0.1.5 2006-12-20
74
+
75
+ * Fix 'aug 20' returning next year if current month is august
76
+ * Modify behavior of 'from now'
77
+ * Add support for seconds on times, and thus db timestamp format:
78
+ "2006-12-20 18:04:23"
79
+ * Make Hoe compliant
80
+
81
+ # 0.1.4
82
+
83
+ * Remove verbose error checking code. oops. :-/
84
+
85
+ # 0.1.3
86
+
87
+ * improved regexes for word variations
88
+ * Fix a bug that caused "today at 3am" to return nil if current time is
89
+ after 3am
90
+
91
+ # 0.1.2
92
+
93
+ * Remove Date dependency (now works on windows properly without fiddling)
94
+
95
+ # 0.1.1
96
+
97
+ * Run to_s on incoming object
98
+ * Fix loop loading of repeaters files (out of order on some machines)
99
+ * Fix find_within to use this instead of next (was breaking "today at 6pm")
100
+
101
+ # 0.1.0
102
+
103
+ * Initial release
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License
2
+
3
+ Copyright (c) Tom Preston-Werner
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/Manifest.txt CHANGED
@@ -1,11 +1,16 @@
1
- History.txt
1
+ HISTORY.md
2
+ LICENSE
2
3
  Manifest.txt
3
- README.txt
4
+ README.md
4
5
  Rakefile
6
+ benchmark/benchmark.rb
7
+ chronic.gemspec
5
8
  lib/chronic.rb
6
9
  lib/chronic/chronic.rb
7
10
  lib/chronic/grabber.rb
8
11
  lib/chronic/handlers.rb
12
+ lib/chronic/mini_date.rb
13
+ lib/chronic/numerizer.rb
9
14
  lib/chronic/ordinal.rb
10
15
  lib/chronic/pointer.rb
11
16
  lib/chronic/repeater.rb
@@ -22,26 +27,32 @@ lib/chronic/repeaters/repeater_season_name.rb
22
27
  lib/chronic/repeaters/repeater_second.rb
23
28
  lib/chronic/repeaters/repeater_time.rb
24
29
  lib/chronic/repeaters/repeater_week.rb
30
+ lib/chronic/repeaters/repeater_weekday.rb
25
31
  lib/chronic/repeaters/repeater_weekend.rb
26
32
  lib/chronic/repeaters/repeater_year.rb
27
33
  lib/chronic/scalar.rb
28
34
  lib/chronic/separator.rb
35
+ lib/chronic/span.rb
36
+ lib/chronic/tag.rb
29
37
  lib/chronic/time_zone.rb
30
- lib/numerizer/numerizer.rb
31
- test/suite.rb
38
+ lib/chronic/token.rb
39
+ test/helper.rb
32
40
  test/test_Chronic.rb
41
+ test/test_DaylightSavings.rb
33
42
  test/test_Handler.rb
34
43
  test/test_Numerizer.rb
35
44
  test/test_RepeaterDayName.rb
36
45
  test/test_RepeaterFortnight.rb
37
46
  test/test_RepeaterHour.rb
47
+ test/test_RepeaterMinute.rb
38
48
  test/test_RepeaterMonth.rb
39
49
  test/test_RepeaterMonthName.rb
40
50
  test/test_RepeaterTime.rb
41
51
  test/test_RepeaterWeek.rb
52
+ test/test_RepeaterWeekday.rb
42
53
  test/test_RepeaterWeekend.rb
43
54
  test/test_RepeaterYear.rb
44
55
  test/test_Span.rb
45
56
  test/test_Time.rb
46
57
  test/test_Token.rb
47
- test/test_parsing.rb
58
+ test/test_parsing.rb
data/README.md ADDED
@@ -0,0 +1,171 @@
1
+ Chronic
2
+ =======
3
+
4
+ ## DESCRIPTION
5
+
6
+ Chronic is a natural language date/time parser written in pure Ruby. See below
7
+ for the wide variety of formats Chronic will parse.
8
+
9
+
10
+ ## INSTALLATION
11
+
12
+ ### RubyGems
13
+
14
+ $ [sudo] gem install chronic
15
+
16
+ ### GitHub
17
+
18
+ $ git clone git://github.com/mojombo/chronic.git
19
+ $ cd chronic && gem build chronic.gemspec
20
+ $ gem install chronic-<version>.gem
21
+
22
+
23
+ ## USAGE
24
+
25
+ You can parse strings containing a natural language date using the
26
+ `Chronic.parse` method.
27
+
28
+ require 'chronic'
29
+
30
+ Time.now #=> Sun Aug 27 23:18:25 PDT 2006
31
+
32
+ Chronic.parse('tomorrow')
33
+ #=> Mon Aug 28 12:00:00 PDT 2006
34
+
35
+ Chronic.parse('monday', :context => :past)
36
+ #=> Mon Aug 21 12:00:00 PDT 2006
37
+
38
+ Chronic.parse('this tuesday 5:00')
39
+ #=> Tue Aug 29 17:00:00 PDT 2006
40
+
41
+ Chronic.parse('this tuesday 5:00', :ambiguous_time_range => :none)
42
+ #=> Tue Aug 29 05:00:00 PDT 2006
43
+
44
+ Chronic.parse('may 27th', :now => Time.local(2000, 1, 1))
45
+ #=> Sat May 27 12:00:00 PDT 2000
46
+
47
+ Chronic.parse('may 27th', :guess => false)
48
+ #=> Sun May 27 00:00:00 PDT 2007..Mon May 28 00:00:00 PDT 2007
49
+
50
+ See `Chronic.parse` for detailed usage instructions.
51
+
52
+
53
+ ## EXAMPLES
54
+
55
+ Chronic can parse a huge variety of date and time formats. Following is a
56
+ small sample of strings that will be properly parsed. Parsing is case
57
+ insensitive and will handle common abbreviations and misspellings.
58
+
59
+ Simple
60
+
61
+ * thursday
62
+ * november
63
+ * summer
64
+ * friday 13:00
65
+ * mon 2:35
66
+ * 4pm
67
+ * 6 in the morning
68
+ * friday 1pm
69
+ * sat 7 in the evening
70
+ * yesterday
71
+ * today
72
+ * tomorrow
73
+ * this tuesday
74
+ * next month
75
+ * last winter
76
+ * this morning
77
+ * last night
78
+ * this second
79
+ * yesterday at 4:00
80
+ * last friday at 20:00
81
+ * last week tuesday
82
+ * tomorrow at 6:45pm
83
+ * afternoon yesterday
84
+ * thursday last week
85
+
86
+ Complex
87
+
88
+ * 3 years ago
89
+ * 5 months before now
90
+ * 7 hours ago
91
+ * 7 days from now
92
+ * 1 week hence
93
+ * in 3 hours
94
+ * 1 year ago tomorrow
95
+ * 3 months ago saturday at 5:00 pm
96
+ * 7 hours before tomorrow at noon
97
+ * 3rd wednesday in november
98
+ * 3rd month next year
99
+ * 3rd thursday this september
100
+ * 4th day last week
101
+
102
+ Specific Dates
103
+
104
+ * January 5
105
+ * February twenty first
106
+ * dec 25
107
+ * may 27th
108
+ * October 2006
109
+ * oct 06
110
+ * jan 3 2010
111
+ * february 14, 2004
112
+ * february 14th, 2004
113
+ * 3 jan 2000
114
+ * 17 april 85
115
+ * 5/27/1979
116
+ * 27/5/1979
117
+ * 05/06
118
+ * 1979-05-27
119
+ * Friday
120
+ * 5
121
+ * 4:00
122
+ * 17:00
123
+ * 0800
124
+
125
+ Specific Times (many of the above with an added time)
126
+
127
+ * January 5 at 7pm
128
+ * 1979-05-27 05:00:00
129
+ * etc
130
+
131
+
132
+ ## TIME ZONES
133
+
134
+ Chronic allows you to set which Time class to use when constructing times. By
135
+ default, the built in Ruby time class creates times in your system's local
136
+ time zone. You can set this to something like ActiveSupport's TimeZone class
137
+ to get full time zone support.
138
+
139
+ >> Time.zone = "UTC"
140
+ >> Chronic.time_class = Time.zone
141
+ >> Chronic.parse("June 15 2006 at 5:45 AM")
142
+ => Thu, 15 Jun 2006 05:45:00 UTC +00:00
143
+
144
+
145
+ ## LIMITATIONS
146
+
147
+ Chronic uses Ruby's built in Time class for all time storage and computation.
148
+ Because of this, only times that the Time class can handle will be properly
149
+ parsed. Parsing for times outside of this range will simply return nil.
150
+ Support for a wider range of times is planned for a future release.
151
+
152
+
153
+ ## CONTRIBUTE
154
+
155
+ If you'd like to hack on Chronic, start by forking the repo on GitHub:
156
+
157
+ https://github.com/mojombo/chronic
158
+
159
+ To get all of the dependencies, install the gem first. The best way to get
160
+ your changes merged back into core is as follows:
161
+
162
+ 1. Clone down your fork
163
+ 1. Create a thoughtfully named topic branch to contain your change
164
+ 1. Hack away
165
+ 1. Add tests and make sure everything still passes by running `rake`
166
+ 1. Ensure your tests pass in multiple timezones
167
+ 1. If you are adding new functionality, document it in the README
168
+ 1. Do not change the version number, we will do that on our end
169
+ 1. If necessary, rebase your commits into logical chunks, without errors
170
+ 1. Push the branch up to GitHub
171
+ 1. Send a pull request for your branch
data/Rakefile CHANGED
@@ -1,19 +1,140 @@
1
- # -*- ruby -*-
1
+ require 'date'
2
2
 
3
- require 'rubygems'
4
- require 'hoe'
5
- require './lib/chronic.rb'
3
+ #############################################################################
4
+ #
5
+ # Helper functions
6
+ #
7
+ #############################################################################
6
8
 
7
- Hoe.new('chronic', Chronic::VERSION) do |p|
8
- p.rubyforge_name = 'chronic'
9
- p.summary = 'A natural language date parser'
10
- p.author = 'Tom Preston-Werner'
11
- p.email = 'tom@rubyisawesome.com'
12
- p.description = p.paragraphs_of('README.txt', 2).join("\n\n")
13
- p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
14
- p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
15
- p.need_tar = false
16
- p.extra_deps = []
9
+ def name
10
+ @name ||= Dir['*.gemspec'].first.split('.').first
17
11
  end
18
12
 
19
- # vim: syntax=Ruby
13
+ def version
14
+ line = File.read("lib/#{name}.rb")[/^\s*VERSION\s*=\s*.*/]
15
+ line.match(/.*VERSION\s*=\s*['"](.*)['"]/)[1]
16
+ end
17
+
18
+ def rubyforge_project
19
+ name
20
+ end
21
+
22
+ def gemspec_file
23
+ "#{name}.gemspec"
24
+ end
25
+
26
+ def gem_file
27
+ "#{name}-#{version}.gem"
28
+ end
29
+
30
+ def replace_header(head, header_name)
31
+ head.sub!(/(\.#{header_name}\s*= ').*'/) { "#{$1}#{send(header_name)}'"}
32
+ end
33
+
34
+ #############################################################################
35
+ #
36
+ # Standard tasks
37
+ #
38
+ #############################################################################
39
+
40
+ task :default => :test
41
+
42
+ require 'rake/testtask'
43
+ Rake::TestTask.new(:test) do |test|
44
+ test.libs << 'lib' << 'test'
45
+ test.pattern = 'test/**/test_*.rb'
46
+ test.verbose = true
47
+ end
48
+
49
+ desc "Generate RCov test coverage and open in your browser"
50
+ task :coverage do
51
+ require 'rcov'
52
+ sh "rm -fr coverage"
53
+ sh "rcov test/test_*.rb"
54
+ sh "open coverage/index.html"
55
+ end
56
+
57
+ require 'rake/rdoctask'
58
+ Rake::RDocTask.new do |rdoc|
59
+ rdoc.rdoc_dir = 'rdoc'
60
+ rdoc.title = "#{name} #{version}"
61
+ rdoc.rdoc_files.include('README*')
62
+ rdoc.rdoc_files.include('lib/**/*.rb')
63
+ end
64
+
65
+ desc "Open an irb session preloaded with this library"
66
+ task :console do
67
+ sh "irb -Ilib -rchronic"
68
+ end
69
+
70
+ #############################################################################
71
+ #
72
+ # Custom tasks (add your own tasks here)
73
+ #
74
+ #############################################################################
75
+
76
+
77
+
78
+ #############################################################################
79
+ #
80
+ # Packaging tasks
81
+ #
82
+ #############################################################################
83
+
84
+ task :release => :build do
85
+ unless `git branch` =~ /^\* master$/
86
+ puts "You must be on the master branch to release!"
87
+ exit!
88
+ end
89
+ sh "git commit --allow-empty -a -m 'Release #{version}'"
90
+ sh "git tag v#{version}"
91
+ sh "git push origin master"
92
+ sh "git push origin v#{version}"
93
+ sh "gem push pkg/#{name}-#{version}.gem"
94
+ end
95
+
96
+ task :build => :gemspec do
97
+ sh "mkdir -p pkg"
98
+ sh "gem build #{gemspec_file}"
99
+ sh "mv #{gem_file} pkg"
100
+ end
101
+
102
+ task :gemspec => :validate do
103
+ # read spec file and split out manifest section
104
+ spec = File.read(gemspec_file)
105
+ head, manifest, tail = spec.split(" # = MANIFEST =\n")
106
+
107
+ # replace name version and date
108
+ replace_header(head, :name)
109
+ replace_header(head, :version)
110
+
111
+ #comment this out if your rubyforge_project has a different name
112
+ replace_header(head, :rubyforge_project)
113
+
114
+ # determine file list from git ls-files
115
+ files = `git ls-files`.
116
+ split("\n").
117
+ sort.
118
+ reject { |file| file =~ /^\./ }.
119
+ reject { |file| file =~ /^(rdoc|pkg)/ }.
120
+ map { |file| " #{file}" }.
121
+ join("\n")
122
+
123
+ # piece file back together and write
124
+ manifest = " s.files = %w[\n#{files}\n ]\n"
125
+ spec = [head, manifest, tail].join(" # = MANIFEST =\n")
126
+ File.open(gemspec_file, 'w') { |io| io.write(spec) }
127
+ puts "Updated #{gemspec_file}"
128
+ end
129
+
130
+ task :validate do
131
+ libfiles = Dir['lib/*'] - ["lib/#{name}.rb", "lib/#{name}"]
132
+ unless libfiles.empty?
133
+ puts "Directory `lib` should only contain a `#{name}.rb` file and `#{name}` dir."
134
+ exit!
135
+ end
136
+ unless Dir['VERSION*'].empty?
137
+ puts "A `VERSION` file at root level violates Gem best practices."
138
+ exit!
139
+ end
140
+ end
@@ -0,0 +1,13 @@
1
+ require 'chronic'
2
+ require 'benchmark'
3
+
4
+ print "jan 3 2010: "
5
+ puts Benchmark.measure { Chronic.parse("jan 3 2010") }
6
+
7
+ print "7 hours before tomorrow at midnight: "
8
+ puts Benchmark.measure { Chronic.parse("7 hours before tomorrow at midnight") }
9
+
10
+ # n = 100
11
+ # Benchmark.bm(14) do |x|
12
+ # x.report("jan 3 2010:") { for i in 1..n; Chronic.parse("jan 3 2010"); end }
13
+ # end
data/chronic.gemspec ADDED
@@ -0,0 +1,82 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = 'chronic'
3
+ s.version = '0.4.0'
4
+ s.rubyforge_project = 'chronic'
5
+
6
+ s.summary = "Natural language date/time parsing."
7
+ s.description = "Chronic is a natural language date/time parser written in pure Ruby."
8
+
9
+ s.authors = ["Tom Preston-Werner", "Lee Jarvis"]
10
+ s.email = ['tom@mojombo.com', 'lee@jarvis.co']
11
+ s.homepage = 'http://github.com/mojombo/chronic'
12
+
13
+ s.rdoc_options = ["--charset=UTF-8"]
14
+ s.extra_rdoc_files = %w[README.md HISTORY.md LICENSE]
15
+
16
+ # = MANIFEST =
17
+ s.files = %w[
18
+ HISTORY.md
19
+ LICENSE
20
+ Manifest.txt
21
+ README.md
22
+ Rakefile
23
+ benchmark/benchmark.rb
24
+ chronic.gemspec
25
+ lib/chronic.rb
26
+ lib/chronic/chronic.rb
27
+ lib/chronic/grabber.rb
28
+ lib/chronic/handlers.rb
29
+ lib/chronic/mini_date.rb
30
+ lib/chronic/numerizer.rb
31
+ lib/chronic/ordinal.rb
32
+ lib/chronic/pointer.rb
33
+ lib/chronic/repeater.rb
34
+ lib/chronic/repeaters/repeater_day.rb
35
+ lib/chronic/repeaters/repeater_day_name.rb
36
+ lib/chronic/repeaters/repeater_day_portion.rb
37
+ lib/chronic/repeaters/repeater_fortnight.rb
38
+ lib/chronic/repeaters/repeater_hour.rb
39
+ lib/chronic/repeaters/repeater_minute.rb
40
+ lib/chronic/repeaters/repeater_month.rb
41
+ lib/chronic/repeaters/repeater_month_name.rb
42
+ lib/chronic/repeaters/repeater_season.rb
43
+ lib/chronic/repeaters/repeater_season_name.rb
44
+ lib/chronic/repeaters/repeater_second.rb
45
+ lib/chronic/repeaters/repeater_time.rb
46
+ lib/chronic/repeaters/repeater_week.rb
47
+ lib/chronic/repeaters/repeater_weekday.rb
48
+ lib/chronic/repeaters/repeater_weekend.rb
49
+ lib/chronic/repeaters/repeater_year.rb
50
+ lib/chronic/scalar.rb
51
+ lib/chronic/separator.rb
52
+ lib/chronic/span.rb
53
+ lib/chronic/tag.rb
54
+ lib/chronic/time_zone.rb
55
+ lib/chronic/token.rb
56
+ test/helper.rb
57
+ test/test_Chronic.rb
58
+ test/test_DaylightSavings.rb
59
+ test/test_Handler.rb
60
+ test/test_Numerizer.rb
61
+ test/test_RepeaterDayName.rb
62
+ test/test_RepeaterFortnight.rb
63
+ test/test_RepeaterHour.rb
64
+ test/test_RepeaterMinute.rb
65
+ test/test_RepeaterMonth.rb
66
+ test/test_RepeaterMonthName.rb
67
+ test/test_RepeaterTime.rb
68
+ test/test_RepeaterWeek.rb
69
+ test/test_RepeaterWeekday.rb
70
+ test/test_RepeaterWeekend.rb
71
+ test/test_RepeaterYear.rb
72
+ test/test_Span.rb
73
+ test/test_Time.rb
74
+ test/test_Token.rb
75
+ test/test_parsing.rb
76
+ ]
77
+ # = MANIFEST =
78
+
79
+ ## Test files will be grabbed from the file list. Make sure the path glob
80
+ ## matches what you actually use.
81
+ s.test_files = s.files.select { |path| path =~ /^test\/test_.*\.rb/ }
82
+ end