diff --git a/.gitignore b/.gitignore index 19718514..21482310 100644 --- a/.gitignore +++ b/.gitignore @@ -4,4 +4,5 @@ pkg/ profiles/ doc/ \.DS_Store -.ackrc \ No newline at end of file +.ackrc +.idea/ \ No newline at end of file diff --git a/Gemfile b/Gemfile new file mode 100644 index 00000000..814690c9 --- /dev/null +++ b/Gemfile @@ -0,0 +1,2 @@ +source 'http://rubygems.org' +gemspec \ No newline at end of file diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..85fd6a4c --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,28 @@ +PATH + remote: . + specs: + ri_cal (0.8.8p) + +GEM + remote: http://rubygems.org/ + specs: + diff-lcs (1.1.3) + rake (10.0.4) + rspec (2.12.0) + rspec-core (~> 2.12.0) + rspec-expectations (~> 2.12.0) + rspec-mocks (~> 2.12.0) + rspec-core (2.12.2) + rspec-expectations (2.12.1) + diff-lcs (~> 1.1.3) + rspec-mocks (2.12.2) + tzinfo (0.3.37) + +PLATFORMS + ruby + +DEPENDENCIES + rake (~> 10.0.3) + ri_cal! + rspec (~> 2.12.0) + tzinfo (~> 0.3.36) diff --git a/History.txt b/History.txt index 910fe397..ac8c6002 100644 --- a/History.txt +++ b/History.txt @@ -1,3 +1,13 @@ +=== v0.8.8p 2013-8-8 + Merge fixes from PRs: + merge wkst_day fix https://github.com/austincgt/ri_cal/commit/288c9e78bcdef3461c6082abbf592f574c232838 + merge ruby 2.0 fixhttps://github.com/spk/ri_cal/commit/321d722837318c8f6371d36bedb6e4ed5acdae35 + fix \n\r encoding for export +=== v0.8.8o 2012-8-10 + Fix for RRULE DAILY with BYDAY, added test +=== v0.8.8n 2012-6-19 + Regenerate gemspec for verson 0.8.8n + merged in fix for get_zone and X-WR-CALNAME === v0.8.8 2011-02-13 Regenerate gemspec for version 0.8.8 Version bump to 0.8.8 diff --git a/README.txt b/README.txt index 9d25d5c9..3d2c9b6c 100644 --- a/README.txt +++ b/README.txt @@ -379,8 +379,9 @@ or by a recent(>= 2.2) version of the ActiveSupport gem which is part of Ruby on 1. cd to a directory in which you want to install ri_cal as a subdirectory 2. git clone http://github.com/rubyredrick/ri_cal your_install_subdirectory 3. cd your_install_directory - 4. rake spec - 5. rake install_gem + 4. bundle install + 5. bundle exec rspec + 6. gem build ri_cal.gemspec diff --git a/VERSION b/VERSION index 5c5cbb3b..05211192 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.8.8 \ No newline at end of file +0.8.8p \ No newline at end of file diff --git a/copyrights.txt b/copyrights.txt index 2f56b1e8..ce10a561 100644 --- a/copyrights.txt +++ b/copyrights.txt @@ -1 +1 @@ -©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license \ No newline at end of file +c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license \ No newline at end of file diff --git a/lib/ri_cal.rb b/lib/ri_cal.rb index b293668b..966d0027 100644 --- a/lib/ri_cal.rb +++ b/lib/ri_cal.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # The RiCal module provides the outermost namespace, along with several convenience methods for parsing # and building calendars and calendar components. diff --git a/lib/ri_cal/component.rb b/lib/ri_cal/component.rb index 7aeac097..535fff36 100644 --- a/lib/ri_cal/component.rb +++ b/lib/ri_cal/component.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class Component #:nodoc: @@ -214,7 +214,7 @@ def export_prop_to(export_stream, name, prop) #:nodoc: def export_x_properties_to(export_stream) #:nodoc: x_properties.each do |name, props| props.each do | prop | - export_stream.puts("#{name}:#{prop}") + export_stream.puts("#{name}#{prop}") end end end diff --git a/lib/ri_cal/component/alarm.rb b/lib/ri_cal/component/alarm.rb index aa824a1a..a8d68aa5 100644 --- a/lib/ri_cal/component/alarm.rb +++ b/lib/ri_cal/component/alarm.rb @@ -1,7 +1,7 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # An Alarm component groups properties defining a reminder or alarm associated with an event or to-do # TODO: The Alarm component has complex cardinality restrictions depending on the value of the action property diff --git a/lib/ri_cal/component/calendar.rb b/lib/ri_cal/component/calendar.rb index a3276253..d612a085 100644 --- a/lib/ri_cal/component/calendar.rb +++ b/lib/ri_cal/component/calendar.rb @@ -1,6 +1,6 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # to see the property accessing methods for this class see the RiCal::Properties::Calendar module class Calendar < Component @@ -171,7 +171,7 @@ def string #:nodoc: stream.string end - if RUBY_VERSION =~ /^1\.9/ + if RUBY_VERSION >= "1.9" def utf8_safe_split(string, n) if string.bytesize <= n [string, nil] @@ -208,10 +208,10 @@ def utf8_safe_split(string, n) def fold(string) #:nodoc: line, remainder = *utf8_safe_split(string, 73) - stream.puts(line) + stream.puts("#{line}\r") while remainder line, remainder = *utf8_safe_split(remainder, 72) - stream.puts(" #{line}") + stream.puts(" #{line}\r") end end diff --git a/lib/ri_cal/component/event.rb b/lib/ri_cal/component/event.rb index a083cc1e..d1e2302e 100644 --- a/lib/ri_cal/component/event.rb +++ b/lib/ri_cal/component/event.rb @@ -1,6 +1,6 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # An Event (VEVENT) calendar component groups properties describing a scheduled event. # Events may have multiple occurrences diff --git a/lib/ri_cal/component/freebusy.rb b/lib/ri_cal/component/freebusy.rb index 268afebc..da8b49bf 100644 --- a/lib/ri_cal/component/freebusy.rb +++ b/lib/ri_cal/component/freebusy.rb @@ -1,6 +1,6 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # A Freebusy (VFREEBUSY) calendar component groups properties describing either a request for free/busy time, # a response to a request for free/busy time, or a published set of busy time. diff --git a/lib/ri_cal/component/journal.rb b/lib/ri_cal/component/journal.rb index 67d28c8a..8bc719d5 100644 --- a/lib/ri_cal/component/journal.rb +++ b/lib/ri_cal/component/journal.rb @@ -1,6 +1,6 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # A Journal (VJOURNAL) calendar component groups properties describing a journal entry. # Journals may have multiple occurrences diff --git a/lib/ri_cal/component/non_standard.rb b/lib/ri_cal/component/non_standard.rb index ba7bae4d..1d557e98 100644 --- a/lib/ri_cal/component/non_standard.rb +++ b/lib/ri_cal/component/non_standard.rb @@ -1,7 +1,7 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # An NonStandard component represents a component (or subcomponent) not listed in RFC2445. # For example some icalendar data contains VVENUE components, a proposed extension to RFC2445 diff --git a/lib/ri_cal/component/t_z_info_timezone.rb b/lib/ri_cal/component/t_z_info_timezone.rb index d852e242..0f7991dc 100644 --- a/lib/ri_cal/component/t_z_info_timezone.rb +++ b/lib/ri_cal/component/t_z_info_timezone.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # A wrapper class for a Timezone implemented by the TZInfo Gem # (or by Rails) diff --git a/lib/ri_cal/component/timezone.rb b/lib/ri_cal/component/timezone.rb index 35f25aa4..933b7634 100644 --- a/lib/ri_cal/component/timezone.rb +++ b/lib/ri_cal/component/timezone.rb @@ -1,6 +1,6 @@ module RiCal class Component - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # An Timezone (VTIMEZONE) calendar component describes a timezone used within the calendar. # A Timezone has two or more TimezonePeriod subcomponents which describe the transitions between diff --git a/lib/ri_cal/component/timezone/daylight_period.rb b/lib/ri_cal/component/timezone/daylight_period.rb index 91f4f742..ccf085d0 100644 --- a/lib/ri_cal/component/timezone/daylight_period.rb +++ b/lib/ri_cal/component/timezone/daylight_period.rb @@ -1,7 +1,7 @@ module RiCal class Component class Timezone - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # A DaylightPeriod is a TimezonePeriod during which daylight saving time *is* in effect class DaylightPeriod < TimezonePeriod #:nodoc: all diff --git a/lib/ri_cal/component/timezone/standard_period.rb b/lib/ri_cal/component/timezone/standard_period.rb index 3efd30d7..d4f17daa 100644 --- a/lib/ri_cal/component/timezone/standard_period.rb +++ b/lib/ri_cal/component/timezone/standard_period.rb @@ -1,7 +1,7 @@ module RiCal class Component class Timezone - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # A StandardPeriod is a TimezonePeriod during which daylight saving time is *not* in effect class StandardPeriod < TimezonePeriod #:nodoc: all diff --git a/lib/ri_cal/component/timezone/timezone_period.rb b/lib/ri_cal/component/timezone/timezone_period.rb index 132353dc..649a34f2 100644 --- a/lib/ri_cal/component/timezone/timezone_period.rb +++ b/lib/ri_cal/component/timezone/timezone_period.rb @@ -1,7 +1,7 @@ module RiCal class Component class Timezone - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # A TimezonePeriod is a component of a timezone representing a period during which a particular offset from UTC is # in effect. diff --git a/lib/ri_cal/component/todo.rb b/lib/ri_cal/component/todo.rb index 24ce6545..cd483c72 100644 --- a/lib/ri_cal/component/todo.rb +++ b/lib/ri_cal/component/todo.rb @@ -1,6 +1,6 @@ module RiCal class Component - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # A Todo (VTODO) calendar component groups properties describing a to-do diff --git a/lib/ri_cal/core_extensions.rb b/lib/ri_cal/core_extensions.rb index 24b40c6e..72a4a937 100644 --- a/lib/ri_cal/core_extensions.rb +++ b/lib/ri_cal/core_extensions.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale +#- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # diff --git a/lib/ri_cal/core_extensions/array.rb b/lib/ri_cal/core_extensions/array.rb index b3ddd50e..9c72e816 100644 --- a/lib/ri_cal/core_extensions/array.rb +++ b/lib/ri_cal/core_extensions/array.rb @@ -1,6 +1,6 @@ require "ri_cal/core_extensions/array/conversions.rb" class Array #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # include RiCal::CoreExtensions::Array::Conversions diff --git a/lib/ri_cal/core_extensions/array/conversions.rb b/lib/ri_cal/core_extensions/array/conversions.rb index dc947b8d..a9ea3a62 100644 --- a/lib/ri_cal/core_extensions/array/conversions.rb +++ b/lib/ri_cal/core_extensions/array/conversions.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Array #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # module Conversions diff --git a/lib/ri_cal/core_extensions/date.rb b/lib/ri_cal/core_extensions/date.rb index 6186a27b..abbb4e90 100644 --- a/lib/ri_cal/core_extensions/date.rb +++ b/lib/ri_cal/core_extensions/date.rb @@ -4,7 +4,7 @@ require 'date' class Date #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # include RiCal::CoreExtensions::Time::WeekDayPredicates diff --git a/lib/ri_cal/core_extensions/date/conversions.rb b/lib/ri_cal/core_extensions/date/conversions.rb index 5d70a9d6..753d9291 100644 --- a/lib/ri_cal/core_extensions/date/conversions.rb +++ b/lib/ri_cal/core_extensions/date/conversions.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Date #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # module Conversions #:nodoc: diff --git a/lib/ri_cal/core_extensions/date_time.rb b/lib/ri_cal/core_extensions/date_time.rb index e5357c7c..b8a94005 100644 --- a/lib/ri_cal/core_extensions/date_time.rb +++ b/lib/ri_cal/core_extensions/date_time.rb @@ -5,7 +5,7 @@ require 'date' class DateTime #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # include RiCal::CoreExtensions::Time::WeekDayPredicates diff --git a/lib/ri_cal/core_extensions/date_time/conversions.rb b/lib/ri_cal/core_extensions/date_time/conversions.rb index 6f0acf27..234f4479 100644 --- a/lib/ri_cal/core_extensions/date_time/conversions.rb +++ b/lib/ri_cal/core_extensions/date_time/conversions.rb @@ -2,7 +2,7 @@ module RiCal module CoreExtensions #:nodoc: module DateTime #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # module Conversions #:nodoc: diff --git a/lib/ri_cal/core_extensions/object.rb b/lib/ri_cal/core_extensions/object.rb index 7308af67..18f4786c 100644 --- a/lib/ri_cal/core_extensions/object.rb +++ b/lib/ri_cal/core_extensions/object.rb @@ -1,7 +1,7 @@ require "ri_cal/core_extensions/object/conversions.rb" class Object #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # include RiCal::CoreExtensions::Object::Conversions diff --git a/lib/ri_cal/core_extensions/object/conversions.rb b/lib/ri_cal/core_extensions/object/conversions.rb index 011fa685..7798382f 100644 --- a/lib/ri_cal/core_extensions/object/conversions.rb +++ b/lib/ri_cal/core_extensions/object/conversions.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Object #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # module Conversions #:nodoc: diff --git a/lib/ri_cal/core_extensions/string.rb b/lib/ri_cal/core_extensions/string.rb index 65b5b19a..a08b0ec9 100644 --- a/lib/ri_cal/core_extensions/string.rb +++ b/lib/ri_cal/core_extensions/string.rb @@ -1,7 +1,7 @@ require "ri_cal/core_extensions/string/conversions.rb" class String #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # include RiCal::CoreExtensions::String::Conversions diff --git a/lib/ri_cal/core_extensions/string/conversions.rb b/lib/ri_cal/core_extensions/string/conversions.rb index a07f29f1..479fd468 100644 --- a/lib/ri_cal/core_extensions/string/conversions.rb +++ b/lib/ri_cal/core_extensions/string/conversions.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module String #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # module Conversions #:nodoc: diff --git a/lib/ri_cal/core_extensions/time.rb b/lib/ri_cal/core_extensions/time.rb index c7da24ad..f95ca5e9 100644 --- a/lib/ri_cal/core_extensions/time.rb +++ b/lib/ri_cal/core_extensions/time.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale +#- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # require "ri_cal/core_extensions/time/conversions.rb" diff --git a/lib/ri_cal/core_extensions/time/calculations.rb b/lib/ri_cal/core_extensions/time/calculations.rb index dffd096f..f36eeec6 100644 --- a/lib/ri_cal/core_extensions/time/calculations.rb +++ b/lib/ri_cal/core_extensions/time/calculations.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Time #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Provide calculation methods for use by the RiCal gem diff --git a/lib/ri_cal/core_extensions/time/conversions.rb b/lib/ri_cal/core_extensions/time/conversions.rb index 27346070..3114bbf6 100644 --- a/lib/ri_cal/core_extensions/time/conversions.rb +++ b/lib/ri_cal/core_extensions/time/conversions.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Time #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # module Conversions diff --git a/lib/ri_cal/core_extensions/time/tzid_access.rb b/lib/ri_cal/core_extensions/time/tzid_access.rb index 962a448f..5b459af9 100644 --- a/lib/ri_cal/core_extensions/time/tzid_access.rb +++ b/lib/ri_cal/core_extensions/time/tzid_access.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Time #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Provides a tzid attribute for ::Time and ::DateTime diff --git a/lib/ri_cal/core_extensions/time/week_day_predicates.rb b/lib/ri_cal/core_extensions/time/week_day_predicates.rb index 271acd3a..7ea2f1d5 100644 --- a/lib/ri_cal/core_extensions/time/week_day_predicates.rb +++ b/lib/ri_cal/core_extensions/time/week_day_predicates.rb @@ -1,7 +1,7 @@ module RiCal module CoreExtensions #:nodoc: module Time #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Provide predicate and related methods for use by the RiCal gem diff --git a/lib/ri_cal/fast_date_time.rb b/lib/ri_cal/fast_date_time.rb index edea091d..227414d1 100644 --- a/lib/ri_cal/fast_date_time.rb +++ b/lib/ri_cal/fast_date_time.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # FastDateTime mimics the Ruby Standard library DateTime class but avoids the use of Rational diff --git a/lib/ri_cal/floating_timezone.rb b/lib/ri_cal/floating_timezone.rb index b6526450..7827b907 100644 --- a/lib/ri_cal/floating_timezone.rb +++ b/lib/ri_cal/floating_timezone.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # FloatingTimezone represents the 'time zone' for a time or date time with no timezone diff --git a/lib/ri_cal/invalid_property_value.rb b/lib/ri_cal/invalid_property_value.rb index 1849ea05..c5f2a2e2 100644 --- a/lib/ri_cal/invalid_property_value.rb +++ b/lib/ri_cal/invalid_property_value.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # An InvalidPropertyValue error is raised when an improper value is assigned to a property diff --git a/lib/ri_cal/invalid_timezone_identifier.rb b/lib/ri_cal/invalid_timezone_identifier.rb index 20cc08ce..3caeaaa1 100644 --- a/lib/ri_cal/invalid_timezone_identifier.rb +++ b/lib/ri_cal/invalid_timezone_identifier.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # An InvalidTimezoneIdentifier error is raised when a DATETIME property with an invalid timezone is diff --git a/lib/ri_cal/occurrence_enumerator.rb b/lib/ri_cal/occurrence_enumerator.rb index ed3f0e82..0e763c9d 100644 --- a/lib/ri_cal/occurrence_enumerator.rb +++ b/lib/ri_cal/occurrence_enumerator.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # OccurrenceEnumerator provides common methods for CalendarComponents that support recurrence diff --git a/lib/ri_cal/parser.rb b/lib/ri_cal/parser.rb index 99d3dd10..a0a330aa 100644 --- a/lib/ri_cal/parser.rb +++ b/lib/ri_cal/parser.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # class Parser # :nodoc: diff --git a/lib/ri_cal/properties/alarm.rb b/lib/ri_cal/properties/alarm.rb index d2cd16e7..cfaf3e91 100644 --- a/lib/ri_cal/properties/alarm.rb +++ b/lib/ri_cal/properties/alarm.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Alarm provides property accessing methods for the Alarm class diff --git a/lib/ri_cal/properties/calendar.rb b/lib/ri_cal/properties/calendar.rb index dd10e55b..8f525fac 100644 --- a/lib/ri_cal/properties/calendar.rb +++ b/lib/ri_cal/properties/calendar.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Calendar provides property accessing methods for the Calendar class diff --git a/lib/ri_cal/properties/event.rb b/lib/ri_cal/properties/event.rb index c6e43e97..cfe687c4 100644 --- a/lib/ri_cal/properties/event.rb +++ b/lib/ri_cal/properties/event.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Event provides property accessing methods for the Event class diff --git a/lib/ri_cal/properties/freebusy.rb b/lib/ri_cal/properties/freebusy.rb index 04eb2e3e..c0e21648 100644 --- a/lib/ri_cal/properties/freebusy.rb +++ b/lib/ri_cal/properties/freebusy.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Freebusy provides property accessing methods for the Freebusy class diff --git a/lib/ri_cal/properties/journal.rb b/lib/ri_cal/properties/journal.rb index 86e5c288..47c02302 100644 --- a/lib/ri_cal/properties/journal.rb +++ b/lib/ri_cal/properties/journal.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Journal provides property accessing methods for the Journal class diff --git a/lib/ri_cal/properties/timezone.rb b/lib/ri_cal/properties/timezone.rb index aebc5bf6..caa6ca12 100644 --- a/lib/ri_cal/properties/timezone.rb +++ b/lib/ri_cal/properties/timezone.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Timezone provides property accessing methods for the Timezone class diff --git a/lib/ri_cal/properties/timezone_period.rb b/lib/ri_cal/properties/timezone_period.rb index 77d790d1..7241ef32 100644 --- a/lib/ri_cal/properties/timezone_period.rb +++ b/lib/ri_cal/properties/timezone_period.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::TimezonePeriod provides property accessing methods for the TimezonePeriod class diff --git a/lib/ri_cal/properties/todo.rb b/lib/ri_cal/properties/todo.rb index 2ffdb28a..109a071e 100644 --- a/lib/ri_cal/properties/todo.rb +++ b/lib/ri_cal/properties/todo.rb @@ -1,6 +1,6 @@ module RiCal module Properties #:nodoc: - #- ©2009 Rick DeNatale + #- c2009 Rick DeNatale #- All rights reserved. Refer to the file README.txt for the license # # Properties::Todo provides property accessing methods for the Todo class diff --git a/lib/ri_cal/property_value.rb b/lib/ri_cal/property_value.rb index 3ecaed44..f0f376f6 100644 --- a/lib/ri_cal/property_value.rb +++ b/lib/ri_cal/property_value.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # PropertyValue provides common implementation of various RFC 2445 property value types class PropertyValue diff --git a/lib/ri_cal/property_value/array.rb b/lib/ri_cal/property_value/array.rb index 3af86e73..a93e9473 100644 --- a/lib/ri_cal/property_value/array.rb +++ b/lib/ri_cal/property_value/array.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class Array < PropertyValue # :nodoc: diff --git a/lib/ri_cal/property_value/cal_address.rb b/lib/ri_cal/property_value/cal_address.rb index c17db717..06c81b0f 100644 --- a/lib/ri_cal/property_value/cal_address.rb +++ b/lib/ri_cal/property_value/cal_address.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar CalAddress property value # which is defined in diff --git a/lib/ri_cal/property_value/date.rb b/lib/ri_cal/property_value/date.rb index 8bbbf632..80c7c47d 100644 --- a/lib/ri_cal/property_value/date.rb +++ b/lib/ri_cal/property_value/date.rb @@ -1,7 +1,7 @@ require 'date' module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar Date property value # which is defined in diff --git a/lib/ri_cal/property_value/date_time.rb b/lib/ri_cal/property_value/date_time.rb index 88327e68..3a5b06c1 100644 --- a/lib/ri_cal/property_value/date_time.rb +++ b/lib/ri_cal/property_value/date_time.rb @@ -1,7 +1,7 @@ require 'date' module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar CalAddress property value # which is defined in RFC 2445 section 4.3.5 pp 35-37 @@ -307,7 +307,8 @@ def to_datetime #:nodoc: # Returns a ruby DateTime object representing the receiver. def ruby_value if has_valid_tzinfo_tzid? && RiCal::TimeWithZone && tz_info_source? - RiCal::TimeWithZone.new(utc.to_datetime, ::Time.__send__(:get_zone, @tzid)) + time_zone_meth = ::Time.respond_to?(:find_zone!) ? :find_zone! : :get_zone + RiCal::TimeWithZone.new(utc.to_datetime, ::Time.__send__(time_zone_meth, @tzid)) else ::DateTime.civil(year, month, day, hour, min, sec, rational_tz_offset).set_tzid(@tzid) end diff --git a/lib/ri_cal/property_value/date_time/additive_methods.rb b/lib/ri_cal/property_value/date_time/additive_methods.rb index 122bac8f..2ba59888 100644 --- a/lib/ri_cal/property_value/date_time/additive_methods.rb +++ b/lib/ri_cal/property_value/date_time/additive_methods.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class DateTime - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # Methods for DateTime which support adding or subtracting another DateTime or Duration module AdditiveMethods diff --git a/lib/ri_cal/property_value/date_time/time_machine.rb b/lib/ri_cal/property_value/date_time/time_machine.rb index 61082d88..c2bfdf3d 100644 --- a/lib/ri_cal/property_value/date_time/time_machine.rb +++ b/lib/ri_cal/property_value/date_time/time_machine.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class DateTime - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # Methods for DateTime which support getting values at different point in time. module TimeMachine diff --git a/lib/ri_cal/property_value/date_time/timezone_support.rb b/lib/ri_cal/property_value/date_time/timezone_support.rb index ff321a7d..60ca9bce 100644 --- a/lib/ri_cal/property_value/date_time/timezone_support.rb +++ b/lib/ri_cal/property_value/date_time/timezone_support.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class DateTime - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # Time zone related methods for DateTime module TimezoneSupport diff --git a/lib/ri_cal/property_value/duration.rb b/lib/ri_cal/property_value/duration.rb index c9ef70e9..b6c15656 100644 --- a/lib/ri_cal/property_value/duration.rb +++ b/lib/ri_cal/property_value/duration.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar Duration property value # which is defined in diff --git a/lib/ri_cal/property_value/geo.rb b/lib/ri_cal/property_value/geo.rb index 08b4719d..677979a2 100644 --- a/lib/ri_cal/property_value/geo.rb +++ b/lib/ri_cal/property_value/geo.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar Duration property value # which is defined in diff --git a/lib/ri_cal/property_value/integer.rb b/lib/ri_cal/property_value/integer.rb index 53742feb..26884ac4 100644 --- a/lib/ri_cal/property_value/integer.rb +++ b/lib/ri_cal/property_value/integer.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class Integer < PropertyValue # :nodoc: diff --git a/lib/ri_cal/property_value/occurrence_list.rb b/lib/ri_cal/property_value/occurrence_list.rb index f542cb40..17f57257 100644 --- a/lib/ri_cal/property_value/occurrence_list.rb +++ b/lib/ri_cal/property_value/occurrence_list.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue # OccurrenceList is used to represent the value of an RDATE or EXDATE property. - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceList < Array attr_accessor :tzid #:nodoc: diff --git a/lib/ri_cal/property_value/period.rb b/lib/ri_cal/property_value/period.rb index cf0aeb65..a290e72e 100644 --- a/lib/ri_cal/property_value/period.rb +++ b/lib/ri_cal/property_value/period.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar Period property value # which is defined in diff --git a/lib/ri_cal/property_value/recurrence_rule.rb b/lib/ri_cal/property_value/recurrence_rule.rb index e4dbae8d..0c70568a 100644 --- a/lib/ri_cal/property_value/recurrence_rule.rb +++ b/lib/ri_cal/property_value/recurrence_rule.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::RecurrenceRule represents an icalendar Recurrence Rule property value # which is defined in @@ -76,7 +76,7 @@ def wkst end def wkst_day # :nodoc: - @wkst_day ||= (%w{SU MO TU WE FR SA}.index(wkst) || 1) + @wkst_day ||= (%w{SU MO TU WE TH FR SA}.index(wkst) || 1) end # Set the starting week day for the recurrence rule, which should be one of diff --git a/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb b/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb index 7fdfbe59..789b52f2 100644 --- a/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb +++ b/lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # module EnumerationSupportMethods # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/enumerator.rb b/lib/ri_cal/property_value/recurrence_rule/enumerator.rb index 912bfc26..9e9454fc 100644 --- a/lib/ri_cal/property_value/recurrence_rule/enumerator.rb +++ b/lib/ri_cal/property_value/recurrence_rule/enumerator.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class Enumerator # :nodoc: # base_time gets changed everytime the time is updated by the recurrence rule's frequency diff --git a/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb b/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb index 8611d2f3..67e4ae75 100644 --- a/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb +++ b/lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # module InitializationMethods # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb b/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb index b8b660b9..ac37b079 100644 --- a/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb +++ b/lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class NegativeSetposEnumerator < Enumerator # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb b/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb index 1e1fc939..31fc7fd9 100644 --- a/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb +++ b/lib/ri_cal/property_value/recurrence_rule/numbered_span.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class NumberedSpan # :nodoc: attr_reader :source diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb index 8f9b435d..22ce6c70 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb index e11bee24..241ba070 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByDayIncrementer < ListIncrementer #:nodoc: @@ -21,12 +21,12 @@ def initialize(rrule, list, by_monthday_list, by_yearday_list, parent) @cycle_advance_proc = lambda {|date_time| first_day_of_month(advance_month(date_time))} @current_proc = lambda {|date_time| same_month?(current, date_time)} @first_day_proc = lambda {|date_time| first_day_of_month(date_time)} - when :weekly + when :weekly, :daily @cycle_advance_proc = lambda {|date_time| first_day_of_week(rrule.wkst_day, advance_week(date_time))} @current_proc = lambda {|date_time| same_week?(rrule.wkst_day, current, date_time)} @first_day_proc = lambda {|date_time| first_day_of_week(rrule.wkst_day, date_time)} else - raise "Invalid recurrence rule, byday needs to be scoped by month, week or year" + raise "Invalid recurrence rule, byday needs to be scoped by month, week, day or year" end end diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb index fdb0682d..f5e85a71 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByHourIncrementer < ListIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb index eec23ec0..88c40019 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByMinuteIncrementer < ListIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb index fb640373..b9bc7dd3 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByMonthIncrementer < ListIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb index 95e66d7c..843ff592 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByMonthdayIncrementer < ByNumberedDayIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb index 3ac2bc60..cb06360c 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByNumberedDayIncrementer < ListIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb index 2c09e9d2..d9776986 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class BySecondIncrementer < ListIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb index 750171d3..41467e4f 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByWeekNoIncrementer < ListIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb index c0c8bfff..b8813e2e 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class ByYeardayIncrementer < ByNumberedDayIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb index 3783c4f4..27a6c85c 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class DailyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb index 1d38d227..2387cae0 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb index ecf6864d..c2ed023d 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class HourlyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb index db325bfd..0b68d76c 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb index fb57012c..ee177f79 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class MinutelyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb index c7f04b5a..5d5380f7 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class MonthlyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb index e0ce316c..55895cfb 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb @@ -2,7 +2,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue class OccurrenceIncrementer # :nodoc: - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class NullSubCycleIncrementer #:nodoc: def self.next_time(previous) diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb index 9ca5d033..03c1fed1 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class SecondlyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb index 17e819f4..bef27f4a 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class WeeklyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb index 32820c95..f99e95e6 100644 --- a/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb +++ b/lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class OccurrenceIncrementer # :nodoc: class YearlyIncrementer < FrequencyIncrementer #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb b/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb index 8583a41c..ccc07c24 100644 --- a/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb +++ b/lib/ri_cal/property_value/recurrence_rule/recurring_day.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # Instances of RecurringDay are used to represent values in BYDAY recurrence rule parts # @@ -48,7 +48,7 @@ def list_id(time) time.year when :monthly (time.year * 100) + time.month - when :weekly + when :weekly, :daily time.at_start_of_week_with_wkst(rrule.wkst_day).jd end end @@ -60,7 +60,7 @@ def matches_for(time) yearly_matches_for(time) when :monthly monthly_matches_for(time) - when :weekly + when :weekly, :daily weekly_matches_for(time) else walkback = caller.grep(/recurrence/i) diff --git a/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb b/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb index d657dbda..32ab42cd 100644 --- a/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb +++ b/lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # Instances of RecurringMonthDay represent BYMONTHDAY parts in recurrence rules class RecurringMonthDay < NumberedSpan # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb b/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb index cd528dcb..d686296d 100644 --- a/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb +++ b/lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class RecurringNumberedWeek < NumberedSpan # :nodoc: def last diff --git a/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb b/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb index f19e37ff..9f6966bd 100644 --- a/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb +++ b/lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class RecurringYearDay < NumberedSpan # :nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb b/lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb index 331c8e62..a7c48049 100644 --- a/lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb +++ b/lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # module TimeManipulation #:nodoc: diff --git a/lib/ri_cal/property_value/recurrence_rule/validations.rb b/lib/ri_cal/property_value/recurrence_rule/validations.rb index 9105789a..66773640 100644 --- a/lib/ri_cal/property_value/recurrence_rule/validations.rb +++ b/lib/ri_cal/property_value/recurrence_rule/validations.rb @@ -1,7 +1,7 @@ module RiCal class PropertyValue class RecurrenceRule < PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # module Validations #:nodoc: # Validate that the parameters of the reciever conform to RFC 2445 diff --git a/lib/ri_cal/property_value/text.rb b/lib/ri_cal/property_value/text.rb index 3abeb444..54bfafdb 100644 --- a/lib/ri_cal/property_value/text.rb +++ b/lib/ri_cal/property_value/text.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::Text represents an icalendar Text property value # which is defined in diff --git a/lib/ri_cal/property_value/uri.rb b/lib/ri_cal/property_value/uri.rb index 19a6b6a2..1e0f37db 100644 --- a/lib/ri_cal/property_value/uri.rb +++ b/lib/ri_cal/property_value/uri.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::Uri represents an icalendar Uri property value # which is defined in diff --git a/lib/ri_cal/property_value/utc_offset.rb b/lib/ri_cal/property_value/utc_offset.rb index ef62a125..e4022ac2 100644 --- a/lib/ri_cal/property_value/utc_offset.rb +++ b/lib/ri_cal/property_value/utc_offset.rb @@ -1,6 +1,6 @@ module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # class UtcOffset < PropertyValue # :nodoc: attr_accessor :sign, :hours, :minutes, :seconds diff --git a/lib/ri_cal/property_value/zulu_date_time.rb b/lib/ri_cal/property_value/zulu_date_time.rb index 037fe7fd..a0034592 100644 --- a/lib/ri_cal/property_value/zulu_date_time.rb +++ b/lib/ri_cal/property_value/zulu_date_time.rb @@ -1,7 +1,7 @@ require 'date' module RiCal class PropertyValue - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RiCal::PropertyValue::CalAddress represents an icalendar CalAddress property value # which is defined in RFC 2445 section 4.3.5 pp 35-37 diff --git a/lib/ri_cal/required_timezones.rb b/lib/ri_cal/required_timezones.rb index 511262e3..d8e0b360 100644 --- a/lib/ri_cal/required_timezones.rb +++ b/lib/ri_cal/required_timezones.rb @@ -1,5 +1,5 @@ module RiCal - #- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license + #- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # RequireTimezones collects the timezones used by a given calendar component or set of calendar components # For each timezone we collect it's id, and the earliest and latest times which reference the zone diff --git a/parked_specs/ri_cal/claudio_a_bug_spec.rb b/parked_specs/ri_cal/claudio_a_bug_spec.rb index 75526e67..1ad2567b 100644 --- a/parked_specs/ri_cal/claudio_a_bug_spec.rb +++ b/parked_specs/ri_cal/claudio_a_bug_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require 'rubygems' require File.join(File.dirname(__FILE__), %w[.. spec_helper]) diff --git a/ri_cal.gemspec b/ri_cal.gemspec index 18417506..0d9493a4 100644 --- a/ri_cal.gemspec +++ b/ri_cal.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |s| s.name = %q{ri_cal} - s.version = "0.8.8" + s.version = "0.8.8p" s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= s.authors = ["Rick DeNatale"] @@ -235,6 +235,10 @@ A Google group for discussion of this library has been set up http://groups.goog current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION s.specification_version = 3 + s.add_development_dependency 'rake', '~>10.0.3' + s.add_development_dependency 'rspec', '~> 2.12.0' + s.add_development_dependency 'tzinfo', '~> 0.3.36' + if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then else end diff --git a/spec/ri_cal/bugreports_spec.rb b/spec/ri_cal/bugreports_spec.rb index 91ba7df1..eaa82b38 100644 --- a/spec/ri_cal/bugreports_spec.rb +++ b/spec/ri_cal/bugreports_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper]) @@ -203,6 +203,7 @@ END:VVENUE END:VCALENDAR ENDCAL + @cal_string.gsub!(/\n/, "\r\n") @venue_str = < [twelfth, twelfth]).size.should eql 2 + end end diff --git a/spec/ri_cal/component/alarm_spec.rb b/spec/ri_cal/component/alarm_spec.rb index e48097d0..9c1f56e8 100644 --- a/spec/ri_cal/component/alarm_spec.rb +++ b/spec/ri_cal/component/alarm_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::Component::Alarm do diff --git a/spec/ri_cal/component/calendar_spec.rb b/spec/ri_cal/component/calendar_spec.rb index 4d3ca946..72abec56 100644 --- a/spec/ri_cal/component/calendar_spec.rb +++ b/spec/ri_cal/component/calendar_spec.rb @@ -1,7 +1,7 @@ # encoding: utf-8 -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::Component::Calendar do @@ -21,7 +21,7 @@ end it "should export a product id with an X-RICAL-TZSOURCE parameter of TZINFO" do - @it.export.should match(%r{\nPRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN\n}) + @it.export.should match(%r{\r\nPRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN\r\n}) end end @@ -35,7 +35,7 @@ end it "should export a product id with an X-RICAL-TZSOURCE parameter of TZINFO" do - @it.export.should match(%r{\nPRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN\n}) + @it.export.should match(%r{\r\nPRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN\r\n}) end end diff --git a/spec/ri_cal/component/event_spec.rb b/spec/ri_cal/component/event_spec.rb index 9c7ac2d7..2de1858c 100644 --- a/spec/ri_cal/component/event_spec.rb +++ b/spec/ri_cal/component/event_spec.rb @@ -1,7 +1,7 @@ # encoding: utf-8 -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::Component::Event do @@ -557,42 +557,42 @@ def unfold(string) it "should cause a VTIMEZONE to be included for a dtstart with a local timezone" do @it.dtstart = date_time_with_tzinfo_zone(DateTime.parse("April 22, 2009 17:55"), "America/New_York") - unfold(@it.export).should match(/BEGIN:VTIMEZONE\nTZID;X-RICAL-TZSOURCE=TZINFO:America\/New_York\n/) + unfold(@it.export).should match(/BEGIN:VTIMEZONE\r\nTZID;X-RICAL-TZSOURCE=TZINFO:America\/New_York\r\n/) end it "should properly format dtstart with a UTC date-time" do @it.dtstart = DateTime.parse("April 22, 2009 1:23:45").set_tzid("UTC") - unfold(@it.export).should match(/^DTSTART;VALUE=DATE-TIME:20090422T012345Z$/) + unfold(@it.export).should match(/^DTSTART;VALUE=DATE-TIME:20090422T012345Z\r$/) end it "should properly format dtstart with a floating date-time" do @it.dtstart = DateTime.parse("April 22, 2009 1:23:45").with_floating_timezone - unfold(@it.export).should match(/^DTSTART;VALUE=DATE-TIME:20090422T012345$/) + unfold(@it.export).should match(/^DTSTART;VALUE=DATE-TIME:20090422T012345\r$/) end it "should properly format dtstart with a local time zone" do @it.dtstart = date_time_with_tzinfo_zone(DateTime.parse("April 22, 2009 17:55"), "America/New_York") - unfold(@it.export).should match(/^DTSTART;TZID=America\/New_York;VALUE=DATE-TIME:20090422T175500$/) + unfold(@it.export).should match(/^DTSTART;TZID=America\/New_York;VALUE=DATE-TIME:20090422T175500\r$/) end it "should properly format dtstart with a date" do @it.dtstart = Date.parse("April 22, 2009") - unfold(@it.export).should match(/^DTSTART;VALUE=DATE:20090422$/) + unfold(@it.export).should match(/^DTSTART;VALUE=DATE:20090422\r$/) end it "should properly fold on export when the description contains a carriage return" do @it.description = "Weather report looks nice, 80 degrees and partly cloudy, so following Michael's suggestion, let's meet at the food court at Crossroads:\n\rhttp://www.shopcrossroadsplaza.c...\n" export_string = @it.export - export_string.should match(%r(^DESCRIPTION:Weather report looks nice\\, 80 degrees and partly cloudy\\, so$)) - export_string.should match(%r(^ following Michael's suggestion\\, let's meet at the food court at Crossr$)) - export_string.should match(%r(^ oads:\\nhttp://www\.shopcrossroadsplaza.c\.\.\.\\n$)) + export_string.should match(%r(^DESCRIPTION:Weather report looks nice\\, 80 degrees and partly cloudy\\, so\r$)) + export_string.should match(%r(^ following Michael's suggestion\\, let's meet at the food court at Crossr\r$)) + export_string.should match(%r(^ oads:\\nhttp://www\.shopcrossroadsplaza.c\.\.\.\\n\r$)) end it "should properly fold on export when the description contains multi-byte UTF-8 Characters" do @it.description = "Juin 2009 <> lieu Café périferôl" export_string = @it.export - export_string.should match(%r(^DESCRIPTION:Juin 2009 <> lieu Café périfer$)) - export_string.should match(%r(^ ôl$)) + export_string.should match(%r(^DESCRIPTION:Juin 2009 <> lieu Café périfer\r$)) + export_string.should match(%r(^ ôl\r$)) end end diff --git a/spec/ri_cal/component/freebusy_spec.rb b/spec/ri_cal/component/freebusy_spec.rb index fa2c44b1..f9a21b1c 100644 --- a/spec/ri_cal/component/freebusy_spec.rb +++ b/spec/ri_cal/component/freebusy_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::Component::Freebusy do diff --git a/spec/ri_cal/component/journal_spec.rb b/spec/ri_cal/component/journal_spec.rb index d30e35d1..64829a74 100644 --- a/spec/ri_cal/component/journal_spec.rb +++ b/spec/ri_cal/component/journal_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::Component::Journal do diff --git a/spec/ri_cal/component/t_z_info_timezone_spec.rb b/spec/ri_cal/component/t_z_info_timezone_spec.rb index 0f709280..969df08a 100644 --- a/spec/ri_cal/component/t_z_info_timezone_spec.rb +++ b/spec/ri_cal/component/t_z_info_timezone_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' # Uncomment the next two lines to run this spec in textmate # require 'rubygems' # require 'tzinfo' diff --git a/spec/ri_cal/component/timezone_spec.rb b/spec/ri_cal/component/timezone_spec.rb index 92c2c5c8..cd5972cd 100644 --- a/spec/ri_cal/component/timezone_spec.rb +++ b/spec/ri_cal/component/timezone_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' require 'tzinfo' describe RiCal::Component::Timezone do diff --git a/spec/ri_cal/component/todo_spec.rb b/spec/ri_cal/component/todo_spec.rb index 1ba259a8..0f1e784d 100644 --- a/spec/ri_cal/component/todo_spec.rb +++ b/spec/ri_cal/component/todo_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::Component::Todo do diff --git a/spec/ri_cal/component_spec.rb b/spec/ri_cal/component_spec.rb index 93fe2b93..54ca75f9 100644 --- a/spec/ri_cal/component_spec.rb +++ b/spec/ri_cal/component_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper]) require 'tzinfo' @@ -13,15 +13,15 @@ end it "should have the default prodid" do - @it.should match(%r{^PRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN$}) + @it.should match(%r{^PRODID;X-RICAL-TZSOURCE=TZINFO:-//com.denhaven2/NONSGML ri_cal gem//EN\r$}) end it "should have the default calscale" do - @it.should match(%r{^CALSCALE:GREGORIAN$}) + @it.should match(%r{^CALSCALE:GREGORIAN\r$}) end it "should have the default icalendar version" do - @it.should match(%r{^VERSION:2\.0$}) + @it.should match(%r{^VERSION:2\.0\r$}) end end @@ -190,6 +190,10 @@ it 'should have an x_wr_calname property with the value "My Personal Calendar"' do @it.x_wr_calname.first.should == "My Personal Calendar" end + + it 'should write out the x_wr_calname with the value "My Personal Calendar"' do + @it.to_s.should =~ /X-WR-CALNAME:My Personal Calendar/ + end context "event with a long description and a dsl built recurence rule" do before(:each) do diff --git a/spec/ri_cal/core_extensions/string/conversions_spec.rb b/spec/ri_cal/core_extensions/string/conversions_spec.rb index d40d64f1..27ac1f10 100644 --- a/spec/ri_cal/core_extensions/string/conversions_spec.rb +++ b/spec/ri_cal/core_extensions/string/conversions_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. .. .. spec_helper]) diff --git a/spec/ri_cal/core_extensions/time/calculations_spec.rb b/spec/ri_cal/core_extensions/time/calculations_spec.rb index fd9e705c..d04f8027 100644 --- a/spec/ri_cal/core_extensions/time/calculations_spec.rb +++ b/spec/ri_cal/core_extensions/time/calculations_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. .. .. spec_helper]) diff --git a/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb b/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb index dd7a2ac0..9142a9bd 100644 --- a/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb +++ b/spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. .. .. spec_helper]) diff --git a/spec/ri_cal/fast_date_time_spec.rb b/spec/ri_cal/fast_date_time_spec.rb index 18c0a0a0..c28b791f 100644 --- a/spec/ri_cal/fast_date_time_spec.rb +++ b/spec/ri_cal/fast_date_time_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper]) diff --git a/spec/ri_cal/inf_loop_spec.rb b/spec/ri_cal/inf_loop_spec.rb index 31d954cf..aa555242 100644 --- a/spec/ri_cal/inf_loop_spec.rb +++ b/spec/ri_cal/inf_loop_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require 'rubygems' require File.join(File.dirname(__FILE__), %w[.. spec_helper]) diff --git a/spec/ri_cal/occurrence_enumerator_spec.rb b/spec/ri_cal/occurrence_enumerator_spec.rb index 7ff7a6b9..05f5ebf4 100644 --- a/spec/ri_cal/occurrence_enumerator_spec.rb +++ b/spec/ri_cal/occurrence_enumerator_spec.rb @@ -1,5 +1,5 @@ # encoding: utf-8 -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper.rb]) diff --git a/spec/ri_cal/parser_spec.rb b/spec/ri_cal/parser_spec.rb index dd8656d3..a0bb356d 100644 --- a/spec/ri_cal/parser_spec.rb +++ b/spec/ri_cal/parser_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper]) diff --git a/spec/ri_cal/property_value/date_spec.rb b/spec/ri_cal/property_value/date_spec.rb index 08eb07c1..87cb328a 100644 --- a/spec/ri_cal/property_value/date_spec.rb +++ b/spec/ri_cal/property_value/date_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::PropertyValue::Date do context ".advance" do diff --git a/spec/ri_cal/property_value/date_time_spec.rb b/spec/ri_cal/property_value/date_time_spec.rb index 750b4566..8b3db137 100644 --- a/spec/ri_cal/property_value/date_time_spec.rb +++ b/spec/ri_cal/property_value/date_time_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' require 'tzinfo' describe RiCal::PropertyValue::DateTime do diff --git a/spec/ri_cal/property_value/duration_spec.rb b/spec/ri_cal/property_value/duration_spec.rb index 16ddf5e3..9bcce3ae 100644 --- a/spec/ri_cal/property_value/duration_spec.rb +++ b/spec/ri_cal/property_value/duration_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' require 'date' describe RiCal::PropertyValue::Duration do diff --git a/spec/ri_cal/property_value/occurrence_list_spec.rb b/spec/ri_cal/property_value/occurrence_list_spec.rb index 76f02ac7..9ba4a2ea 100644 --- a/spec/ri_cal/property_value/occurrence_list_spec.rb +++ b/spec/ri_cal/property_value/occurrence_list_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::PropertyValue::OccurrenceList do diff --git a/spec/ri_cal/property_value/period_spec.rb b/spec/ri_cal/property_value/period_spec.rb index fab51226..f8ee36b3 100644 --- a/spec/ri_cal/property_value/period_spec.rb +++ b/spec/ri_cal/property_value/period_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' # RFC 2445 Section 4.3.9 pp 39-40 describe RiCal::PropertyValue::Period do diff --git a/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb b/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb index 9ebb4308..257e4343 100644 --- a/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb +++ b/spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. .. .. spec_helper]) diff --git a/spec/ri_cal/property_value/recurrence_rule_spec.rb b/spec/ri_cal/property_value/recurrence_rule_spec.rb index ff1b3090..99fe55d4 100644 --- a/spec/ri_cal/property_value/recurrence_rule_spec.rb +++ b/spec/ri_cal/property_value/recurrence_rule_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' require 'rubygems' diff --git a/spec/ri_cal/property_value/text_spec.rb b/spec/ri_cal/property_value/text_spec.rb index 64336f9b..e9934743 100644 --- a/spec/ri_cal/property_value/text_spec.rb +++ b/spec/ri_cal/property_value/text_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::PropertyValue::Text do diff --git a/spec/ri_cal/property_value/utc_offset_spec.rb b/spec/ri_cal/property_value/utc_offset_spec.rb index b6120168..4cd7d0b7 100644 --- a/spec/ri_cal/property_value/utc_offset_spec.rb +++ b/spec/ri_cal/property_value/utc_offset_spec.rb @@ -1,6 +1,6 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license -require File.join(File.dirname(__FILE__), %w[.. .. spec_helper]) +require 'spec_helper' describe RiCal::PropertyValue::UtcOffset do diff --git a/spec/ri_cal/property_value_spec.rb b/spec/ri_cal/property_value_spec.rb index ea96543f..9b8380d6 100644 --- a/spec/ri_cal/property_value_spec.rb +++ b/spec/ri_cal/property_value_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper]) require 'tzinfo' diff --git a/spec/ri_cal/required_timezones_spec.rb b/spec/ri_cal/required_timezones_spec.rb index 3403696f..ccbd9bd4 100644 --- a/spec/ri_cal/required_timezones_spec.rb +++ b/spec/ri_cal/required_timezones_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[.. spec_helper]) diff --git a/spec/ri_cal_spec.rb b/spec/ri_cal_spec.rb index b063aa5f..38020437 100644 --- a/spec/ri_cal_spec.rb +++ b/spec/ri_cal_spec.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.join(File.dirname(__FILE__), %w[spec_helper]) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f61548df..6d0ece4c 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,4 +1,4 @@ -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license require File.expand_path(File.join(File.dirname(__FILE__), %w[.. lib ri_cal])) require 'cgi' diff --git a/tasks/ri_cal.rake b/tasks/ri_cal.rake index 0fcb9eff..00e78788 100644 --- a/tasks/ri_cal.rake +++ b/tasks/ri_cal.rake @@ -1,6 +1,6 @@ #require 'active_support' require 'yaml' -#- ©2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license +#- c2009 Rick DeNatale, All rights reserved. Refer to the file README.txt for the license # # code stolen from ActiveSupport Gem unless String.instance_methods.include?("camelize") @@ -360,7 +360,7 @@ class VEntityUpdater ruby_out_file.puts("module RiCal") ruby_out_file.puts(" module Properties #:nodoc:") @indent = " " - ruby_out_file.puts(" #- ©2009 Rick DeNatale") + ruby_out_file.puts(" #- c2009 Rick DeNatale") ruby_out_file.puts(" #- All rights reserved. Refer to the file README.txt for the license") ruby_out_file.puts(" #") ruby_out_file.puts(" # Properties::#{module_name} provides property accessing methods for the #{class_name} class")