timeboss 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/timeboss/calendar/parser.rb +2 -1
- data/lib/timeboss/version.rb +1 -1
- data/spec/calendars/broadcast_spec.rb +3 -4
- data/spec/calendars/gregorian_spec.rb +3 -4
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e6b6b0fe418ccba6ac446549992d5a9d1317b095afd603fd8517f9f43ddb2754
|
4
|
+
data.tar.gz: 494e8602b7ce8662503ce8720da802a3351a74116e73b6e9cee64c1b8bf82895
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 82fec7e7f6e798469d99853dc30b6233eb55a55bd8e09d79143be086c790677d8249cbeacb72ab94c6ce20ad9a5dd2d4ecf4f96d3d7c4c65179749c7ae8597ca
|
7
|
+
data.tar.gz: 03a6a53d9b0316ec5074855ed5f240cad7a578a72ce12eda272d6fa6a2a4f70237416814bd3783342849e47e21503fc3e75d3170e79388a58be23244c307d7c6
|
@@ -11,7 +11,8 @@ module TimeBoss
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def parse(identifier = nil)
|
14
|
-
return
|
14
|
+
return nil unless identifier.present?
|
15
|
+
return parse_identifier(identifier) unless identifier&.include?(RANGE_DELIMITER)
|
15
16
|
bases = identifier.split(RANGE_DELIMITER).map { |i| parse_identifier(i.strip) } unless identifier.nil?
|
16
17
|
bases ||= [parse_identifier(nil)]
|
17
18
|
Period.new(calendar, *bases)
|
data/lib/timeboss/version.rb
CHANGED
@@ -493,10 +493,9 @@ module TimeBoss
|
|
493
493
|
expect(date.end_date).to eq Date.parse('2017-04-08')
|
494
494
|
end
|
495
495
|
|
496
|
-
it 'gives you
|
497
|
-
|
498
|
-
expect(subject.parse(
|
499
|
-
expect(subject.parse('')).to eq year
|
496
|
+
it 'gives you nothing if you give it nothing' do
|
497
|
+
expect(subject.parse(nil)).to be nil
|
498
|
+
expect(subject.parse('')).to be nil
|
500
499
|
end
|
501
500
|
end
|
502
501
|
|
@@ -475,10 +475,9 @@ module TimeBoss
|
|
475
475
|
expect(date.end_date).to eq Date.parse('2017-04-08')
|
476
476
|
end
|
477
477
|
|
478
|
-
it 'gives you
|
479
|
-
|
480
|
-
expect(subject.parse(
|
481
|
-
expect(subject.parse('')).to eq year
|
478
|
+
it 'gives you nothing if you give it nothing' do
|
479
|
+
expect(subject.parse(nil)).to be nil
|
480
|
+
expect(subject.parse('')).to be nil
|
482
481
|
end
|
483
482
|
end
|
484
483
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: timeboss
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin McDonald
|
@@ -199,7 +199,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
199
199
|
- !ruby/object:Gem::Version
|
200
200
|
version: '0'
|
201
201
|
requirements: []
|
202
|
-
|
202
|
+
rubyforge_project:
|
203
|
+
rubygems_version: 2.7.7
|
203
204
|
signing_key:
|
204
205
|
specification_version: 4
|
205
206
|
summary: Broadcast Calendar navigation in Ruby made simple
|