hobo_support 1.3.0.pre26 → 1.3.0.pre27

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0.pre26
1
+ 1.3.0.pre27
@@ -5,7 +5,7 @@ begin
5
5
  module Chronic
6
6
 
7
7
  class << self
8
- def parse_with_hobo_fix(s)
8
+ def parse_with_hobo_fix(s, *options)
9
9
  if s =~ /^\s*\d+\s*(st|nd|rd|th)\s+[a-zA-Z]+(\s+\d+)?\s*$/
10
10
  s = s.sub(/\s*\d+(st|nd|rd|th)/) {|s| s[0..-3]}
11
11
  end
@@ -13,7 +13,7 @@ begin
13
13
  # Chronic can't parse '1/1/2008 1:00' or '1/1/2008 1:00 PM',
14
14
  # so convert them to '1/1/2008 @ 1:00' and '1/1/2008 @ 1:00 PM'
15
15
  s = s.sub(/^\s*(\d+\/\d+\/\d+)\s+(\d+:\d+.*)/, '\1 @ \2')
16
- parse_without_hobo_fix(s)
16
+ parse_without_hobo_fix(s, *options)
17
17
  end
18
18
  alias_method_chain :parse, :hobo_fix
19
19
  end
@@ -0,0 +1,18 @@
1
+ # HoboSupport - Chronic extensions
2
+
3
+ doctest_require: '../../lib/hobo_support'
4
+ {.hidden}
5
+
6
+ ## `Chronic.parse`
7
+
8
+ Chronic.parse can't parse 'M/D/Y H:S', so convert it to 'M/D/Y @ H:S'.
9
+
10
+ >> Chronic.parse('1/1/2008 1:00') == Chronic.parse('1/1/2008 @ 1:00')
11
+
12
+ => true
13
+
14
+ Chronic.parse takes additional options (see Chronic.parse).
15
+
16
+ >> Chronic.parse('today', :guess => false).instance_of? Chronic::Span
17
+
18
+ => true
metadata CHANGED
@@ -1,14 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hobo_support
3
3
  version: !ruby/object:Gem::Version
4
- hash: -1637108448
5
- prerelease: true
6
- segments:
7
- - 1
8
- - 3
9
- - 0
10
- - pre26
11
- version: 1.3.0.pre26
4
+ prerelease: 6
5
+ version: 1.3.0.pre27
12
6
  platform: ruby
13
7
  authors:
14
8
  - Tom Locke
@@ -16,7 +10,7 @@ autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
12
 
19
- date: 2011-01-22 00:00:00 -04:00
13
+ date: 2011-02-22 00:00:00 -04:00
20
14
  default_executable:
21
15
  dependencies:
22
16
  - !ruby/object:Gem::Dependency
@@ -27,11 +21,6 @@ dependencies:
27
21
  requirements:
28
22
  - - ">="
29
23
  - !ruby/object:Gem::Version
30
- hash: 7
31
- segments:
32
- - 3
33
- - 0
34
- - 0
35
24
  version: 3.0.0
36
25
  type: :runtime
37
26
  version_requirements: *id001
@@ -43,9 +32,6 @@ dependencies:
43
32
  requirements:
44
33
  - - ">="
45
34
  - !ruby/object:Gem::Version
46
- hash: 3
47
- segments:
48
- - 0
49
35
  version: "0"
50
36
  type: :development
51
37
  version_requirements: *id002
@@ -85,6 +71,7 @@ files:
85
71
  - lib/hobo_support/string.rb
86
72
  - lib/hobo_support/xss.rb
87
73
  - test/hobosupport.rdoctest
74
+ - test/hobosupport/chronic.rdoctest
88
75
  - test/hobosupport/enumerable.rdoctest
89
76
  - test/hobosupport/hash.rdoctest
90
77
  - test/hobosupport/implies.rdoctest
@@ -106,25 +93,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
106
93
  requirements:
107
94
  - - ">="
108
95
  - !ruby/object:Gem::Version
109
- hash: 3
110
- segments:
111
- - 0
112
96
  version: "0"
113
97
  required_rubygems_version: !ruby/object:Gem::Requirement
114
98
  none: false
115
99
  requirements:
116
100
  - - ">="
117
101
  - !ruby/object:Gem::Version
118
- hash: 23
119
- segments:
120
- - 1
121
- - 3
122
- - 6
123
102
  version: 1.3.6
124
103
  requirements: []
125
104
 
126
105
  rubyforge_project: hobo
127
- rubygems_version: 1.3.7
106
+ rubygems_version: 1.5.0
128
107
  signing_key:
129
108
  specification_version: 3
130
109
  summary: Core Ruby extensions from the Hobo project