rubyredrick-ri_cal 0.0.9 → 0.0.10

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.
@@ -17,6 +17,10 @@ module RiCal
17
17
  @index = 0
18
18
  end
19
19
 
20
+ def bounded?
21
+ true
22
+ end
23
+
20
24
  def empty?
21
25
  occurrence_list.empty?
22
26
  end
data/lib/ri_cal.rb CHANGED
@@ -11,7 +11,7 @@ module RiCal
11
11
  autoload :OccurrenceEnumerator, "#{my_dir}/ri_cal/occurrence_enumerator.rb"
12
12
 
13
13
  # :stopdoc:
14
- VERSION = '0.0.9'
14
+ VERSION = '0.0.10'
15
15
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
16
16
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
17
17
 
data/ri_cal.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ri_cal}
5
- s.version = "0.0.9"
5
+ s.version = "0.0.10"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["author=Rick DeNatale"]
@@ -422,4 +422,34 @@ ENDCAL
422
422
  @occurrences.all? {|o| o.dtend.class == ::Date}.should be_true
423
423
  end
424
424
  end
425
+ context "bounded? bug" do
426
+ before(:each) do
427
+ events = RiCal.parse_string rectify_ical <<-ENDCAL
428
+ BEGIN:VEVENT
429
+ EXDATE:20090114T163000
430
+ EXDATE:20090128T163000
431
+ EXDATE:20090121T163000
432
+ EXDATE:20090211T163000
433
+ EXDATE:20090204T163000
434
+ EXDATE:20090218T163000
435
+ TRANSP:OPAQUE
436
+ DTSTAMP;VALUE=DATE-TIME:20090107T024340Z
437
+ CREATED;VALUE=DATE-TIME:20090107T024012Z
438
+ DTEND;TZID=US/Mountain;VALUE=DATE-TIME:20090114T180000
439
+ DTSTART;TZID=US/Mountain;VALUE=DATE-TIME:20090114T163000
440
+ UID:15208112-E0FA-4A7C-954C-CFDF19D1B0E7
441
+ RRULE:FREQ=WEEKLY;INTERVAL=1;UNTIL=20090219T065959Z
442
+ SUMMARY:Wild Rose XC/Skate Training Series
443
+ SEQUENCE:11
444
+ LOCATION:Mountain Dell Golf Course
445
+ END:VEVENT
446
+ ENDCAL
447
+ @event = events.first
448
+ end
449
+
450
+ it "should be able to enumerate occurrences" do
451
+ @event.should be_bounded
452
+ end
453
+ end
454
+
425
455
  end
data/spec/spec_helper.rb CHANGED
@@ -28,6 +28,10 @@ def offset_for_tzid(year, month, day, hour, min, sec, tzid, alternate)
28
28
  end
29
29
  end
30
30
 
31
+ def rectify_ical(string)
32
+ string.gsub(/^\s+/, "")
33
+ end
34
+
31
35
  if RiCal::TimeWithZone
32
36
  def result_time_in_zone(year, month, day, hour, min, sec, tzid, alternate_offset = nil)
33
37
  DateTime.civil(year, month, day, hour, min, sec,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyredrick-ri_cal
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - author=Rick DeNatale