flexyear 2.1.1 → 2.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +8 -0
- data/lib/flexyear/version.rb +1 -1
- data/lib/flexyear.rb +4 -0
- data/spec/flexyear_spec.rb +7 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2fb4798c126d9f8ee4d7045436f487f3a679af87
|
4
|
+
data.tar.gz: f1fc3aad4bbcd29cbaf4955d0079a581b8ac0b85
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ddf3c28f8240c9d44d61deb52210c9f8872e767c4640dd8ce727f7e1418cc96aa2806c4826cf379e9450f05a14c3aaea528f940a28bcf254c5b0bf5bca8fcc1f
|
7
|
+
data.tar.gz: d9d213c018110dde753c7bdcba2eeb5a5f1a0971df51ae9eb37b3cfa1d7c4a0912b931d95f24d2e762ee68d9315c4caf92c272e486ff6d8ccbbe5b166a31d156
|
data/README.md
CHANGED
@@ -48,3 +48,11 @@ Or install it yourself as:
|
|
48
48
|
### Test
|
49
49
|
|
50
50
|
`rake`
|
51
|
+
|
52
|
+
### Publish a new version
|
53
|
+
|
54
|
+
We use bundlers rake commands to release versions. To cut and release a new version:
|
55
|
+
|
56
|
+
1. Update lib/flexyear/version.rb and increment to your new desired version
|
57
|
+
2. Commit and push your version bump
|
58
|
+
3. Run `bundle exec rake release` to package and publish that version
|
data/lib/flexyear/version.rb
CHANGED
data/lib/flexyear.rb
CHANGED
data/spec/flexyear_spec.rb
CHANGED
@@ -30,42 +30,49 @@ describe FlexYear do
|
|
30
30
|
subject { flexyear_class.new(1979) }
|
31
31
|
its(:year_low) { should eq(1979) }
|
32
32
|
its(:year_high) { should eq(1979) }
|
33
|
+
its(:decade?) { should eq(false) }
|
33
34
|
end
|
34
35
|
|
35
36
|
context "given 1979" do
|
36
37
|
subject { flexyear_class.new("1979") }
|
37
38
|
its(:year_low) { should eq(1979) }
|
38
39
|
its(:year_high) { should eq(1979) }
|
40
|
+
its(:decade?) { should eq(false) }
|
39
41
|
end
|
40
42
|
|
41
43
|
context "given 1979 (with a space)" do
|
42
44
|
subject { flexyear_class.new("1979 ") }
|
43
45
|
its(:year_low) { should eq(1979) }
|
44
46
|
its(:year_high) { should eq(1979) }
|
47
|
+
its(:decade?) { should eq(false) }
|
45
48
|
end
|
46
49
|
|
47
50
|
context 'given 197*' do
|
48
51
|
subject { flexyear_class.new('197*') }
|
49
52
|
its(:year_low) { should eq(1970) }
|
50
53
|
its(:year_high) { should eq(1979) }
|
54
|
+
its(:decade?) { should eq(true) }
|
51
55
|
end
|
52
56
|
|
53
57
|
context "given 1970s" do
|
54
58
|
subject { flexyear_class.new("1970s") }
|
55
59
|
its(:year_low) { should eq(1970) }
|
56
60
|
its(:year_high) { should eq(1979) }
|
61
|
+
its(:decade?) { should eq(true) }
|
57
62
|
end
|
58
63
|
|
59
64
|
context "given 70s" do
|
60
65
|
subject { flexyear_class.new("70s") }
|
61
66
|
its(:year_low) { should eq(1970) }
|
62
67
|
its(:year_high) { should eq(1979) }
|
68
|
+
its(:decade?) { should eq(true) }
|
63
69
|
end
|
64
70
|
|
65
71
|
context "given something with negative and dots" do
|
66
72
|
subject { flexyear_class.new("approx.-2006") }
|
67
73
|
its(:year_low) { should eq(2005) }
|
68
74
|
its(:year_high) { should eq(2007) }
|
75
|
+
its(:decade?) { should eq(false) }
|
69
76
|
end
|
70
77
|
|
71
78
|
context 'given before 1973' do
|
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.
|
4
|
+
version: 2.2.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: 2019-
|
11
|
+
date: 2019-04-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|