hiccup 0.5.6 → 0.5.7

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 7e951659bd70b7644903b02cf819b518632d0471
4
- data.tar.gz: 8f34e327a9eebc719cc4729505133bcc38f6b09b
3
+ metadata.gz: 9de7dfc5a6dd61e80743654199726d2f7bf77a10
4
+ data.tar.gz: 6cc66a4f757143a6ae238eebf4f03c4b0498c732
5
5
  SHA512:
6
- metadata.gz: 506065cfc2ac111628892588c57b4cf5c6984d955ccec0a6be6945c74cb9030a8f090f711f12bbc944264ce9cf6900dfa433c6ce1c1544f662b0e9705c740d18
7
- data.tar.gz: 89844952a547b7f52d991d50add128be4485db4921ba99b7f91f3decbeaddbdefe26901ec68b73945d846becccdfa2d98bcd2b6da58a3c93724f01036af8a42c
6
+ metadata.gz: 823add9242b2575e33f730ef7e586609e1dbf171aef895b41eebc4c52b23f084f64ecd4dcaae0068ba379ffc92531965ca0ffecc58ab58beb00d8b17813cb3a0
7
+ data.tar.gz: 47844cebe3bae66f1ba1a9e561be1e2dcdd4342c8e3250b98ca27a6d06a8102e5b6d063a6bdc3e04ad6fbecba536d48670a77fdb243a9315cc46dd782aa1a3f2
@@ -13,7 +13,7 @@ module Hiccup
13
13
 
14
14
  def dump(obj)
15
15
  @component = RiCal::Component::Event.new
16
- @component.dtstart = obj.start_date.to_time
16
+ @component.dtstart = obj.start_date.to_time if obj.start_date
17
17
  @obj = obj
18
18
 
19
19
  case obj.kind
@@ -1,3 +1,3 @@
1
1
  module Hiccup
2
- VERSION = "0.5.6"
2
+ VERSION = "0.5.7"
3
3
  end
@@ -266,6 +266,14 @@ class EnumerableTest < ActiveSupport::TestCase
266
266
  assert_equal [], schedule.n_occurrences_on_or_before(10, Date.new(2011,1,2))
267
267
  end
268
268
 
269
+ test "should predict nonrecurring dates before a date later than them" do
270
+ schedule = Schedule.new({
271
+ :kind => :never,
272
+ :start_date => Date.new(2011, 1, 3)})
273
+ assert_equal [Date.new(2011, 1, 3)], schedule.n_occurrences_on_or_before(10, Date.new(2011,1,3))
274
+ assert_equal [], schedule.n_occurrences_on_or_before(10, Date.new(2011,1,2))
275
+ end
276
+
269
277
  test "should not predict dates after the end of a schedule" do
270
278
  schedule = Schedule.new({
271
279
  :kind => :weekly,
@@ -22,6 +22,11 @@ class IcalSerializableTest < ActiveSupport::TestCase
22
22
  assert_equal :never, schedule.kind
23
23
  end
24
24
 
25
+ def test_formatting_an_empty_schedule
26
+ schedule = Schedule.new(:kind => :yearly, :start_date => "")
27
+ assert_equal "", schedule.to_ical
28
+ end
29
+
25
30
 
26
31
  test_roundtrip(
27
32
  "No recurrence",
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hiccup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bob Lail
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-24 00:00:00.000000000 Z
11
+ date: 2014-04-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport