medjool 0.5 → 0.5.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.
@@ -35,7 +35,7 @@ class Medjool::Parser
35
35
  if Medjool::DATE_MATCHER.match(text)
36
36
  if /^[0-9]$/.match(text.strip)
37
37
  # Handle lone integers
38
- text = "#{text}st"
38
+ text = "#{text.strip}st"
39
39
  end
40
40
 
41
41
  base_date = Date.parse(text)
data/lib/medjool.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module Medjool
2
- VERSION = '0.5'
2
+ VERSION = '0.5.1'
3
3
 
4
4
  require 'medjool/parser'
5
5
  require 'medjool/date_range'
data/test/test_medjool.rb CHANGED
@@ -75,5 +75,6 @@ class TestMedjool < TestCase
75
75
  def test_lone_numbers
76
76
  parser = Medjool::Parser.new
77
77
  assert_equal Date.parse("1st"), parser.parse("1")
78
+ assert_equal Date.parse("2st"), parser.parse("2 ")
78
79
  end
79
80
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: medjool
3
3
  version: !ruby/object:Gem::Version
4
- hash: 1
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- version: "0.5"
9
+ - 1
10
+ version: 0.5.1
10
11
  platform: ruby
11
12
  authors:
12
13
  - Andy Geers