Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Export to use CRLF per http://tools.ietf.org/html/rfc2445#section-4.1 #16

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@ pkg/
profiles/
doc/
\.DS_Store
.ackrc
.ackrc
.idea/
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'http://rubygems.org'
gemspec
28 changes: 28 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -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)
10 changes: 10 additions & 0 deletions History.txt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
5 changes: 3 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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



Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
0.8.8
0.8.8p
2 changes: 1 addition & 1 deletion copyrights.txt
Original file line number Diff line number Diff line change
@@ -1 +1 @@
©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
2 changes: 1 addition & 1 deletion lib/ri_cal.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
4 changes: 2 additions & 2 deletions lib/ri_cal/component.rb
Original file line number Diff line number Diff line change
@@ -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:

Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/alarm.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
8 changes: 4 additions & 4 deletions lib/ri_cal/component/calendar.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down Expand Up @@ -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]
Expand Down Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/event.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/freebusy.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/journal.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/non_standard.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/t_z_info_timezone.rb
Original file line number Diff line number Diff line change
@@ -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)
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/timezone.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/timezone/daylight_period.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/timezone/standard_period.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/timezone/timezone_period.rb
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/component/todo.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#- ©2009 Rick DeNatale
#- c2009 Rick DeNatale
#- All rights reserved. Refer to the file README.txt for the license
#

Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/array.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/array/conversions.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/date.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/date/conversions.rb
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/date_time.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/date_time/conversions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/object.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/object/conversions.rb
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/string.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/string/conversions.rb
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/time.rb
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/time/calculations.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/time/conversions.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/time/tzid_access.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/core_extensions/time/week_day_predicates.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/fast_date_time.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/floating_timezone.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/invalid_property_value.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/invalid_timezone_identifier.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/occurrence_enumerator.rb
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/ri_cal/parser.rb
Original file line number Diff line number Diff line change
@@ -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:
Expand Down
Loading