flexyear 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 97cfa33d0a581edde9231e9179dcf15b4961886f
4
- data.tar.gz: 28a10f8c6506e5aec3b1682e7bec4985cc6cd01b
3
+ metadata.gz: be16123e3ada3bc97daf20dfa0878e0ec64fb3d5
4
+ data.tar.gz: cdd73aa8f992531f09d9f329a76af8ec850bde19
5
5
  SHA512:
6
- metadata.gz: 239b899a0be17549545621a5aa099c21b592cffdb0d442200ff9567be24aad59d78e27cfd99b8760f0612574fba2c2e6875515db6a2e512604d0d1ea926b71d7
7
- data.tar.gz: f5045399981aac58a22aca47326d6cff185928943be452c256535aa95511a885ba984a9cbcad3bfa2ab1804ab56957d72ab11a2de1f0c46dccd7cae3833e2c06
6
+ metadata.gz: 6cebdc541a73b357bf70257e1c6127d88f1cc3c18253f70d5ca066df10485f0e4bb6f59806c337dc58044b910ca87b33a78724d854dc6873ac691fa52de1ff88
7
+ data.tar.gz: 0b96b4c50820649422dabf3f465d46ca4515ff937f4e99289413c6c761b869152a9d30ccb14d847a023306e18599c3cd99a415972c1d9d07d8b91dc05bd15818
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ rvm:
2
+ - 2.1
3
+ - 2.2
4
+ - 2.3.0
5
+ - 2.4.0
6
+
7
+ script: rake
@@ -1,3 +1,3 @@
1
1
  class FlexYear
2
- VERSION = "2.0.0"
2
+ VERSION = "2.0.1"
3
3
  end
data/lib/flexyear.rb CHANGED
@@ -26,7 +26,7 @@ class FlexYear
26
26
  attr_reader :year_low, :year_high
27
27
 
28
28
  def initialize(year_string)
29
- @year_string = year_string.to_s
29
+ @year_string = year_string.to_s.strip
30
30
 
31
31
  @low, @high = RangeParser.parse(@year_string)
32
32
 
@@ -38,6 +38,12 @@ describe FlexYear do
38
38
  its(:year_high) { should eq(1979) }
39
39
  end
40
40
 
41
+ context "given 1979 (with a space)" do
42
+ subject { flexyear_class.new("1979 ") }
43
+ its(:year_low) { should eq(1979) }
44
+ its(:year_high) { should eq(1979) }
45
+ end
46
+
41
47
  context 'given 197*' do
42
48
  subject { flexyear_class.new('197*') }
43
49
  its(:year_low) { should eq(1970) }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: flexyear
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Melnick & Yan Pritzker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-11-07 00:00:00.000000000 Z
11
+ date: 2017-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,6 +77,7 @@ files:
77
77
  - ".gitignore"
78
78
  - ".ruby-gemset"
79
79
  - ".ruby-version"
80
+ - ".travis.yml"
80
81
  - CHANGELOG
81
82
  - Gemfile
82
83
  - LICENSE.txt