rubyredrick-ri_cal 0.0.4 → 0.0.5

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.
data/History.txt CHANGED
@@ -1,3 +1,5 @@
1
+ === 0.0.5
2
+ * Fixed a bug in occurrence enumeration reported by paulsm on github
1
3
  === 0.0.4
2
4
  * Fixed a bug in imported timezones reported by paulsm on github
3
5
  === 0.0.3
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.4'
14
+ VERSION = '0.0.5'
15
15
  LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
16
16
  PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
17
17
 
@@ -8,8 +8,8 @@ module RiCal
8
8
 
9
9
  include Enumerable
10
10
 
11
- def default_duration # :nodoc:
12
- dtend && dtstart.to_ri_cal_date_time_value.duration_until(dtend)
11
+ def default_duration # :nodoc:
12
+ dtend && dtstart.to_ri_cal_date_time_value.duration_until(dtend.to_ri_cal_date_time_value)
13
13
  end
14
14
 
15
15
  def default_start_time # :nodoc:
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.4"
5
+ s.version = "0.0.5"
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"]
@@ -234,6 +234,57 @@ describe RiCal::OccurrenceEnumerator::OccurrenceMerger do
234
234
  end
235
235
  end
236
236
  end
237
+
238
+ context "Bug report from paulsm" do
239
+ before(:each) do
240
+ cals = RiCal.parse_string <<ENDCAL
241
+ BEGIN:VCALENDAR
242
+ X-WR-TIMEZONE:America/New_York
243
+ PRODID:-//Apple Inc.//iCal 3.0//EN
244
+ CALSCALE:GREGORIAN
245
+ X-WR-CALNAME:test
246
+ VERSION:2.0
247
+ X-WR-RELCALID:1884C7F8-BC8E-457F-94AC-297871967D5E
248
+ X-APPLE-CALENDAR-COLOR:#2CA10B
249
+ BEGIN:VTIMEZONE
250
+ TZID:US/Eastern
251
+ BEGIN:DAYLIGHT
252
+ TZOFFSETFROM:-0500
253
+ TZOFFSETTO:-0400
254
+ DTSTART:20070311T020000
255
+ RRULE:FREQ=YEARLY;BYMONTH=3;BYDAY=2SU
256
+ TZNAME:EDT
257
+ END:DAYLIGHT
258
+ BEGIN:STANDARD
259
+ TZOFFSETFROM:-0400
260
+ TZOFFSETTO:-0500
261
+ DTSTART:20071104T020000
262
+ RRULE:FREQ=YEARLY;BYMONTH=11;BYDAY=1SU
263
+ TZNAME:EST
264
+ END:STANDARD
265
+ END:VTIMEZONE
266
+ BEGIN:VEVENT
267
+ SEQUENCE:5
268
+ TRANSP:OPAQUE
269
+ UID:00481E53-9258-4EA7-9F8D-947D3041A3F2
270
+ DTSTART;TZID=US/Eastern:20090224T090000
271
+ DTSTAMP:20090225T000908Z
272
+ SUMMARY:Test Event
273
+ CREATED:20090225T000839Z
274
+ DTEND;TZID=US/Eastern:20090224T100000
275
+ RRULE:FREQ=DAILY;INTERVAL=1;UNTIL=20090228T045959Z
276
+ END:VEVENT
277
+ END:VCALENDAR
278
+ ENDCAL
279
+ @event = cals.first.events.first
280
+ end
281
+
282
+
283
+ it "the event should be enumerable" do
284
+ lambda {@event.occurrences}.should_not raise_error
285
+ end
286
+ end
287
+
237
288
  end
238
289
 
239
290
 
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.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - author=Rick DeNatale