ri_cal 0.8.7 → 0.8.8

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -1,8 +1,9 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
+ # require 'jeweler'
3
4
 
4
5
  begin
5
- require 'jeweler'
6
+ require 'ad_agency'
6
7
  Jeweler::Tasks.new do |gem|
7
8
  gem.name = "ri_cal"
8
9
  gem.summary = %Q{a new implementation of RFC2445 in Ruby}
@@ -26,8 +27,10 @@ A Google group for discussion of this library has been set up http://groups.goog
26
27
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
27
28
  end
28
29
  Jeweler::GemcutterTasks.new
29
- rescue LoadError
30
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
30
+ Jeweler::AdAgencyTasks.new
31
+ # rescue LoadError => ex
32
+ # puts ex
33
+ # puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
31
34
  end
32
35
 
33
36
  require 'rake/testtask'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.7
1
+ 0.8.8
@@ -155,17 +155,20 @@ module RiCal
155
155
  end
156
156
 
157
157
  # Add a n extended property
158
- def add_x_property(name, prop)
159
- x_properties[name] << prop
158
+ def add_x_property(name, prop, debug=false)
159
+ x_properties[name.gsub("_","-").upcase] << prop.to_ri_cal_text_property
160
160
  end
161
161
 
162
162
  def method_missing(selector, *args, &b) #:nodoc:
163
163
  xprop_candidate = selector.to_s
164
- if (match = /^x_(.+)(=?)$/.match(xprop_candidate))
164
+ if (match = /^(x_.+)(=?)$/.match(xprop_candidate))
165
+ x_property_key = match[1].gsub('_','-').upcase
165
166
  if match[2] == "="
166
- add_x_property("x_#{match[1]}", *args)
167
+ args.each do |val|
168
+ add_x_property(x_property_key, val)
169
+ end
167
170
  else
168
- x_properties[xprop_candidate]
171
+ x_properties[x_property_key].map {|property| property.value}
169
172
  end
170
173
  else
171
174
  super
@@ -31,13 +31,14 @@ module RiCal
31
31
  to_ri_cal_date_time_value.end_of_day.to_datetime
32
32
  end
33
33
 
34
- unless defined? ActiveSupport
34
+ unless Date.instance_methods.map {|selector| selector.to_sym}.include?(:to_date)
35
35
  # A method to keep Time, Date and DateTime instances interchangeable on conversions.
36
36
  # In this case, it simply returns +self+.
37
37
  def to_date
38
38
  self
39
- end if RUBY_VERSION < '1.9'
40
-
39
+ end
40
+ end
41
+ unless Date.instance_methods.map {|selector| selector.to_sym}.include?(:to_datetime)
41
42
  # Converts a Date instance to a DateTime, where the time is set to the beginning of the day
42
43
  # and UTC offset is set to 0.
43
44
  #
@@ -47,7 +48,7 @@ module RiCal
47
48
  # date.to_datetime # => Sat, 10 Nov 2007 00:00:00 0000
48
49
  def to_datetime
49
50
  ::DateTime.civil(year, month, day, 0, 0, 0, 0)
50
- end if RUBY_VERSION < '1.9'
51
+ end
51
52
  end
52
53
  end
53
54
  end
@@ -32,12 +32,13 @@ module RiCal
32
32
  dup.set_tzid(:floating)
33
33
  end
34
34
 
35
- unless defined? ActiveSupport
35
+ unless DateTime.instance_methods.map {|selector| selector.to_sym}.include?(:to_date)
36
36
  # Converts self to a Ruby Date object; time portion is discarded
37
37
  def to_date
38
38
  ::Date.new(year, month, day)
39
39
  end
40
-
40
+ end
41
+ unless DateTime.instance_methods.map {|selector| selector.to_sym}.include?(:to_datetime)
41
42
  # To be able to keep Times, Dates and DateTimes interchangeable on conversions
42
43
  def to_datetime
43
44
  self
@@ -5,6 +5,10 @@ module RiCal
5
5
  #- All rights reserved. Refer to the file README.txt for the license
6
6
  #
7
7
  module Conversions #:nodoc:
8
+ def to_ri_cal_text_property
9
+ PropertyValue::Text.new(nil, :value => self)
10
+ end
11
+
8
12
  # Parse the receiver as an RiCal::PropertyValue::DateTime
9
13
  def to_ri_cal_date_time_value(timezone_finder = nil)
10
14
  params, value = *Parser.params_and_value(self, :no_leading_semicolon)
@@ -32,7 +32,7 @@ module RiCal
32
32
  dup.set_tzid(:floating)
33
33
  end
34
34
 
35
- unless defined? ActiveSupport
35
+ unless Time.instance_methods.map {|selector| selector.to_sym}.include?(:to_datetime)
36
36
  require 'date'
37
37
  ::Time.send(:public, :to_datetime)
38
38
  end
@@ -25,6 +25,10 @@ module RiCal
25
25
  end
26
26
  end
27
27
 
28
+ def to_ri_cal_text_property
29
+ self
30
+ end
31
+
28
32
  def self.convert(parent, string) #:nodoc:
29
33
  ical_str = string.gsub(/\n\r?|\r\n?|,|;|\\/) {|match|
30
34
  if ["\n", "\r", "\n\r", "\r\n"].include?(match)
@@ -1,15 +1,15 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in RakeFile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{ri_cal}
8
- s.version = "0.8.7"
8
+ s.version = "0.8.8"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Rick DeNatale"]
12
- s.date = %q{2010-04-16}
12
+ s.date = %q{2011-02-13}
13
13
  s.default_executable = %q{ri_cal}
14
14
  s.description = %q{A new Ruby implementation of RFC2445 iCalendar.
15
15
 
@@ -24,219 +24,218 @@ A Google group for discussion of this library has been set up http://groups.goog
24
24
  s.executables = ["ri_cal"]
25
25
  s.extra_rdoc_files = [
26
26
  "History.txt",
27
- "README.txt",
28
- "copyrights.txt"
27
+ "README.txt",
28
+ "copyrights.txt"
29
29
  ]
30
30
  s.files = [
31
31
  "History.txt",
32
- "Manifest.txt",
33
- "README.txt",
34
- "Rakefile",
35
- "VERSION",
36
- "bin/ri_cal",
37
- "component_attributes/alarm.yml",
38
- "component_attributes/calendar.yml",
39
- "component_attributes/component_property_defs.yml",
40
- "component_attributes/event.yml",
41
- "component_attributes/freebusy.yml",
42
- "component_attributes/journal.yml",
43
- "component_attributes/timezone.yml",
44
- "component_attributes/timezone_period.yml",
45
- "component_attributes/todo.yml",
46
- "copyrights.txt",
47
- "docs/draft-ietf-calsify-2446bis-08.txt",
48
- "docs/draft-ietf-calsify-rfc2445bis-09.txt",
49
- "docs/incrementers.txt",
50
- "docs/rfc2445.pdf",
51
- "lib/ri_cal.rb",
52
- "lib/ri_cal/component.rb",
53
- "lib/ri_cal/component/alarm.rb",
54
- "lib/ri_cal/component/calendar.rb",
55
- "lib/ri_cal/component/event.rb",
56
- "lib/ri_cal/component/freebusy.rb",
57
- "lib/ri_cal/component/journal.rb",
58
- "lib/ri_cal/component/non_standard.rb",
59
- "lib/ri_cal/component/t_z_info_timezone.rb",
60
- "lib/ri_cal/component/timezone.rb",
61
- "lib/ri_cal/component/timezone/daylight_period.rb",
62
- "lib/ri_cal/component/timezone/standard_period.rb",
63
- "lib/ri_cal/component/timezone/timezone_period.rb",
64
- "lib/ri_cal/component/todo.rb",
65
- "lib/ri_cal/core_extensions.rb",
66
- "lib/ri_cal/core_extensions/array.rb",
67
- "lib/ri_cal/core_extensions/array/conversions.rb",
68
- "lib/ri_cal/core_extensions/date.rb",
69
- "lib/ri_cal/core_extensions/date/conversions.rb",
70
- "lib/ri_cal/core_extensions/date_time.rb",
71
- "lib/ri_cal/core_extensions/date_time/conversions.rb",
72
- "lib/ri_cal/core_extensions/object.rb",
73
- "lib/ri_cal/core_extensions/object/conversions.rb",
74
- "lib/ri_cal/core_extensions/string.rb",
75
- "lib/ri_cal/core_extensions/string/conversions.rb",
76
- "lib/ri_cal/core_extensions/time.rb",
77
- "lib/ri_cal/core_extensions/time/calculations.rb",
78
- "lib/ri_cal/core_extensions/time/conversions.rb",
79
- "lib/ri_cal/core_extensions/time/tzid_access.rb",
80
- "lib/ri_cal/core_extensions/time/week_day_predicates.rb",
81
- "lib/ri_cal/fast_date_time.rb",
82
- "lib/ri_cal/floating_timezone.rb",
83
- "lib/ri_cal/invalid_property_value.rb",
84
- "lib/ri_cal/invalid_timezone_identifier.rb",
85
- "lib/ri_cal/occurrence_enumerator.rb",
86
- "lib/ri_cal/occurrence_period.rb",
87
- "lib/ri_cal/parser.rb",
88
- "lib/ri_cal/properties.rb",
89
- "lib/ri_cal/properties/alarm.rb",
90
- "lib/ri_cal/properties/calendar.rb",
91
- "lib/ri_cal/properties/event.rb",
92
- "lib/ri_cal/properties/freebusy.rb",
93
- "lib/ri_cal/properties/journal.rb",
94
- "lib/ri_cal/properties/timezone.rb",
95
- "lib/ri_cal/properties/timezone_period.rb",
96
- "lib/ri_cal/properties/todo.rb",
97
- "lib/ri_cal/property_value.rb",
98
- "lib/ri_cal/property_value/array.rb",
99
- "lib/ri_cal/property_value/cal_address.rb",
100
- "lib/ri_cal/property_value/date.rb",
101
- "lib/ri_cal/property_value/date_time.rb",
102
- "lib/ri_cal/property_value/date_time/additive_methods.rb",
103
- "lib/ri_cal/property_value/date_time/time_machine.rb",
104
- "lib/ri_cal/property_value/date_time/timezone_support.rb",
105
- "lib/ri_cal/property_value/duration.rb",
106
- "lib/ri_cal/property_value/geo.rb",
107
- "lib/ri_cal/property_value/integer.rb",
108
- "lib/ri_cal/property_value/occurrence_list.rb",
109
- "lib/ri_cal/property_value/period.rb",
110
- "lib/ri_cal/property_value/recurrence_rule.rb",
111
- "lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb",
112
- "lib/ri_cal/property_value/recurrence_rule/enumerator.rb",
113
- "lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb",
114
- "lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb",
115
- "lib/ri_cal/property_value/recurrence_rule/numbered_span.rb",
116
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb",
117
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb",
118
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb",
119
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb",
120
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb",
121
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb",
122
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb",
123
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb",
124
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb",
125
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb",
126
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb",
127
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb",
128
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb",
129
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb",
130
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb",
131
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb",
132
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb",
133
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb",
134
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb",
135
- "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb",
136
- "lib/ri_cal/property_value/recurrence_rule/recurring_day.rb",
137
- "lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb",
138
- "lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb",
139
- "lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb",
140
- "lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb",
141
- "lib/ri_cal/property_value/recurrence_rule/validations.rb",
142
- "lib/ri_cal/property_value/text.rb",
143
- "lib/ri_cal/property_value/uri.rb",
144
- "lib/ri_cal/property_value/utc_offset.rb",
145
- "lib/ri_cal/property_value/zulu_date_time.rb",
146
- "lib/ri_cal/required_timezones.rb",
147
- "parked_specs/ri_cal/claudio_a_bug_spec.rb",
148
- "performance/empty_propval/subject.rb",
149
- "performance/paris_eastern/subject.rb",
150
- "performance/penultimate_weekday/subject.rb",
151
- "performance/psm_big_enum/ical.ics",
152
- "performance/psm_big_enum/subject.rb",
153
- "performance/utah_cycling/subject.rb",
154
- "ri_cal.gemspec",
155
- "script/benchmark_subject",
156
- "script/console",
157
- "script/destroy",
158
- "script/generate",
159
- "script/profile_subject",
160
- "script/txt2html",
161
- "spec/ri_cal/bugreports_spec.rb",
162
- "spec/ri_cal/component/alarm_spec.rb",
163
- "spec/ri_cal/component/calendar_spec.rb",
164
- "spec/ri_cal/component/event_spec.rb",
165
- "spec/ri_cal/component/freebusy_spec.rb",
166
- "spec/ri_cal/component/journal_spec.rb",
167
- "spec/ri_cal/component/t_z_info_timezone_spec.rb",
168
- "spec/ri_cal/component/timezone_spec.rb",
169
- "spec/ri_cal/component/todo_spec.rb",
170
- "spec/ri_cal/component_spec.rb",
171
- "spec/ri_cal/core_extensions/string/conversions_spec.rb",
172
- "spec/ri_cal/core_extensions/time/calculations_spec.rb",
173
- "spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
174
- "spec/ri_cal/fast_date_time_spec.rb",
175
- "spec/ri_cal/inf_loop_spec.rb",
176
- "spec/ri_cal/occurrence_enumerator_spec.rb",
177
- "spec/ri_cal/parser_spec.rb",
178
- "spec/ri_cal/property_value/date_spec.rb",
179
- "spec/ri_cal/property_value/date_time_spec.rb",
180
- "spec/ri_cal/property_value/duration_spec.rb",
181
- "spec/ri_cal/property_value/occurrence_list_spec.rb",
182
- "spec/ri_cal/property_value/period_spec.rb",
183
- "spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
184
- "spec/ri_cal/property_value/recurrence_rule_spec.rb",
185
- "spec/ri_cal/property_value/text_spec.rb",
186
- "spec/ri_cal/property_value/utc_offset_spec.rb",
187
- "spec/ri_cal/property_value_spec.rb",
188
- "spec/ri_cal/required_timezones_spec.rb",
189
- "spec/ri_cal_spec.rb",
190
- "spec/spec.opts",
191
- "spec/spec_helper.rb",
192
- "tasks/gem_loader/load_active_support.rb",
193
- "tasks/gem_loader/load_tzinfo_gem.rb",
194
- "tasks/ri_cal.rake",
195
- "tasks/spec.rake"
32
+ "Manifest.txt",
33
+ "README.txt",
34
+ "Rakefile",
35
+ "VERSION",
36
+ "bin/ri_cal",
37
+ "component_attributes/alarm.yml",
38
+ "component_attributes/calendar.yml",
39
+ "component_attributes/component_property_defs.yml",
40
+ "component_attributes/event.yml",
41
+ "component_attributes/freebusy.yml",
42
+ "component_attributes/journal.yml",
43
+ "component_attributes/timezone.yml",
44
+ "component_attributes/timezone_period.yml",
45
+ "component_attributes/todo.yml",
46
+ "copyrights.txt",
47
+ "docs/draft-ietf-calsify-2446bis-08.txt",
48
+ "docs/draft-ietf-calsify-rfc2445bis-09.txt",
49
+ "docs/incrementers.txt",
50
+ "docs/rfc2445.pdf",
51
+ "lib/ri_cal.rb",
52
+ "lib/ri_cal/component.rb",
53
+ "lib/ri_cal/component/alarm.rb",
54
+ "lib/ri_cal/component/calendar.rb",
55
+ "lib/ri_cal/component/event.rb",
56
+ "lib/ri_cal/component/freebusy.rb",
57
+ "lib/ri_cal/component/journal.rb",
58
+ "lib/ri_cal/component/non_standard.rb",
59
+ "lib/ri_cal/component/t_z_info_timezone.rb",
60
+ "lib/ri_cal/component/timezone.rb",
61
+ "lib/ri_cal/component/timezone/daylight_period.rb",
62
+ "lib/ri_cal/component/timezone/standard_period.rb",
63
+ "lib/ri_cal/component/timezone/timezone_period.rb",
64
+ "lib/ri_cal/component/todo.rb",
65
+ "lib/ri_cal/core_extensions.rb",
66
+ "lib/ri_cal/core_extensions/array.rb",
67
+ "lib/ri_cal/core_extensions/array/conversions.rb",
68
+ "lib/ri_cal/core_extensions/date.rb",
69
+ "lib/ri_cal/core_extensions/date/conversions.rb",
70
+ "lib/ri_cal/core_extensions/date_time.rb",
71
+ "lib/ri_cal/core_extensions/date_time/conversions.rb",
72
+ "lib/ri_cal/core_extensions/object.rb",
73
+ "lib/ri_cal/core_extensions/object/conversions.rb",
74
+ "lib/ri_cal/core_extensions/string.rb",
75
+ "lib/ri_cal/core_extensions/string/conversions.rb",
76
+ "lib/ri_cal/core_extensions/time.rb",
77
+ "lib/ri_cal/core_extensions/time/calculations.rb",
78
+ "lib/ri_cal/core_extensions/time/conversions.rb",
79
+ "lib/ri_cal/core_extensions/time/tzid_access.rb",
80
+ "lib/ri_cal/core_extensions/time/week_day_predicates.rb",
81
+ "lib/ri_cal/fast_date_time.rb",
82
+ "lib/ri_cal/floating_timezone.rb",
83
+ "lib/ri_cal/invalid_property_value.rb",
84
+ "lib/ri_cal/invalid_timezone_identifier.rb",
85
+ "lib/ri_cal/occurrence_enumerator.rb",
86
+ "lib/ri_cal/occurrence_period.rb",
87
+ "lib/ri_cal/parser.rb",
88
+ "lib/ri_cal/properties.rb",
89
+ "lib/ri_cal/properties/alarm.rb",
90
+ "lib/ri_cal/properties/calendar.rb",
91
+ "lib/ri_cal/properties/event.rb",
92
+ "lib/ri_cal/properties/freebusy.rb",
93
+ "lib/ri_cal/properties/journal.rb",
94
+ "lib/ri_cal/properties/timezone.rb",
95
+ "lib/ri_cal/properties/timezone_period.rb",
96
+ "lib/ri_cal/properties/todo.rb",
97
+ "lib/ri_cal/property_value.rb",
98
+ "lib/ri_cal/property_value/array.rb",
99
+ "lib/ri_cal/property_value/cal_address.rb",
100
+ "lib/ri_cal/property_value/date.rb",
101
+ "lib/ri_cal/property_value/date_time.rb",
102
+ "lib/ri_cal/property_value/date_time/additive_methods.rb",
103
+ "lib/ri_cal/property_value/date_time/time_machine.rb",
104
+ "lib/ri_cal/property_value/date_time/timezone_support.rb",
105
+ "lib/ri_cal/property_value/duration.rb",
106
+ "lib/ri_cal/property_value/geo.rb",
107
+ "lib/ri_cal/property_value/integer.rb",
108
+ "lib/ri_cal/property_value/occurrence_list.rb",
109
+ "lib/ri_cal/property_value/period.rb",
110
+ "lib/ri_cal/property_value/recurrence_rule.rb",
111
+ "lib/ri_cal/property_value/recurrence_rule/enumeration_support_methods.rb",
112
+ "lib/ri_cal/property_value/recurrence_rule/enumerator.rb",
113
+ "lib/ri_cal/property_value/recurrence_rule/initialization_methods.rb",
114
+ "lib/ri_cal/property_value/recurrence_rule/negative_setpos_enumerator.rb",
115
+ "lib/ri_cal/property_value/recurrence_rule/numbered_span.rb",
116
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer.rb",
117
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_day_incrementer.rb",
118
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_hour_incrementer.rb",
119
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_minute_incrementer.rb",
120
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_month_incrementer.rb",
121
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_monthday_incrementer.rb",
122
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_numbered_day_incrementer.rb",
123
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_second_incrementer.rb",
124
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_weekno_incrementer.rb",
125
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/by_yearday_incrementer.rb",
126
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/daily_incrementer.rb",
127
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/frequency_incrementer.rb",
128
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/hourly_incrementer.rb",
129
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/list_incrementer.rb",
130
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/minutely_incrementer.rb",
131
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/monthly_incrementer.rb",
132
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/null_sub_cycle_incrementer.rb",
133
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/secondly_incrementer.rb",
134
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/weekly_incrementer.rb",
135
+ "lib/ri_cal/property_value/recurrence_rule/occurrence_incrementer/yearly_incrementer.rb",
136
+ "lib/ri_cal/property_value/recurrence_rule/recurring_day.rb",
137
+ "lib/ri_cal/property_value/recurrence_rule/recurring_month_day.rb",
138
+ "lib/ri_cal/property_value/recurrence_rule/recurring_numbered_week.rb",
139
+ "lib/ri_cal/property_value/recurrence_rule/recurring_year_day.rb",
140
+ "lib/ri_cal/property_value/recurrence_rule/time_manipulation.rb",
141
+ "lib/ri_cal/property_value/recurrence_rule/validations.rb",
142
+ "lib/ri_cal/property_value/text.rb",
143
+ "lib/ri_cal/property_value/uri.rb",
144
+ "lib/ri_cal/property_value/utc_offset.rb",
145
+ "lib/ri_cal/property_value/zulu_date_time.rb",
146
+ "lib/ri_cal/required_timezones.rb",
147
+ "parked_specs/ri_cal/claudio_a_bug_spec.rb",
148
+ "performance/empty_propval/subject.rb",
149
+ "performance/paris_eastern/subject.rb",
150
+ "performance/penultimate_weekday/subject.rb",
151
+ "performance/psm_big_enum/ical.ics",
152
+ "performance/psm_big_enum/subject.rb",
153
+ "performance/utah_cycling/subject.rb",
154
+ "ri_cal.gemspec",
155
+ "script/benchmark_subject",
156
+ "script/console",
157
+ "script/destroy",
158
+ "script/generate",
159
+ "script/profile_subject",
160
+ "script/txt2html",
161
+ "spec/ri_cal/bugreports_spec.rb",
162
+ "spec/ri_cal/component/alarm_spec.rb",
163
+ "spec/ri_cal/component/calendar_spec.rb",
164
+ "spec/ri_cal/component/event_spec.rb",
165
+ "spec/ri_cal/component/freebusy_spec.rb",
166
+ "spec/ri_cal/component/journal_spec.rb",
167
+ "spec/ri_cal/component/t_z_info_timezone_spec.rb",
168
+ "spec/ri_cal/component/timezone_spec.rb",
169
+ "spec/ri_cal/component/todo_spec.rb",
170
+ "spec/ri_cal/component_spec.rb",
171
+ "spec/ri_cal/core_extensions/string/conversions_spec.rb",
172
+ "spec/ri_cal/core_extensions/time/calculations_spec.rb",
173
+ "spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
174
+ "spec/ri_cal/fast_date_time_spec.rb",
175
+ "spec/ri_cal/inf_loop_spec.rb",
176
+ "spec/ri_cal/occurrence_enumerator_spec.rb",
177
+ "spec/ri_cal/parser_spec.rb",
178
+ "spec/ri_cal/property_value/date_spec.rb",
179
+ "spec/ri_cal/property_value/date_time_spec.rb",
180
+ "spec/ri_cal/property_value/duration_spec.rb",
181
+ "spec/ri_cal/property_value/occurrence_list_spec.rb",
182
+ "spec/ri_cal/property_value/period_spec.rb",
183
+ "spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
184
+ "spec/ri_cal/property_value/recurrence_rule_spec.rb",
185
+ "spec/ri_cal/property_value/text_spec.rb",
186
+ "spec/ri_cal/property_value/utc_offset_spec.rb",
187
+ "spec/ri_cal/property_value_spec.rb",
188
+ "spec/ri_cal/required_timezones_spec.rb",
189
+ "spec/ri_cal_spec.rb",
190
+ "spec/spec.opts",
191
+ "spec/spec_helper.rb",
192
+ "tasks/gem_loader/load_active_support.rb",
193
+ "tasks/gem_loader/load_tzinfo_gem.rb",
194
+ "tasks/ri_cal.rake",
195
+ "tasks/spec.rake"
196
196
  ]
197
197
  s.homepage = %q{http://github.com/rubyredrick/ri_cal}
198
- s.rdoc_options = ["--charset=UTF-8"]
199
198
  s.require_paths = ["lib"]
200
- s.rubygems_version = %q{1.3.6}
199
+ s.rubygems_version = %q{1.3.7}
201
200
  s.summary = %q{a new implementation of RFC2445 in Ruby}
202
201
  s.test_files = [
203
202
  "spec/ri_cal/bugreports_spec.rb",
204
- "spec/ri_cal/component/alarm_spec.rb",
205
- "spec/ri_cal/component/calendar_spec.rb",
206
- "spec/ri_cal/component/event_spec.rb",
207
- "spec/ri_cal/component/freebusy_spec.rb",
208
- "spec/ri_cal/component/journal_spec.rb",
209
- "spec/ri_cal/component/t_z_info_timezone_spec.rb",
210
- "spec/ri_cal/component/timezone_spec.rb",
211
- "spec/ri_cal/component/todo_spec.rb",
212
- "spec/ri_cal/component_spec.rb",
213
- "spec/ri_cal/core_extensions/string/conversions_spec.rb",
214
- "spec/ri_cal/core_extensions/time/calculations_spec.rb",
215
- "spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
216
- "spec/ri_cal/fast_date_time_spec.rb",
217
- "spec/ri_cal/inf_loop_spec.rb",
218
- "spec/ri_cal/occurrence_enumerator_spec.rb",
219
- "spec/ri_cal/parser_spec.rb",
220
- "spec/ri_cal/property_value/date_spec.rb",
221
- "spec/ri_cal/property_value/date_time_spec.rb",
222
- "spec/ri_cal/property_value/duration_spec.rb",
223
- "spec/ri_cal/property_value/occurrence_list_spec.rb",
224
- "spec/ri_cal/property_value/period_spec.rb",
225
- "spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
226
- "spec/ri_cal/property_value/recurrence_rule_spec.rb",
227
- "spec/ri_cal/property_value/text_spec.rb",
228
- "spec/ri_cal/property_value/utc_offset_spec.rb",
229
- "spec/ri_cal/property_value_spec.rb",
230
- "spec/ri_cal/required_timezones_spec.rb",
231
- "spec/ri_cal_spec.rb",
232
- "spec/spec_helper.rb"
203
+ "spec/ri_cal/component/alarm_spec.rb",
204
+ "spec/ri_cal/component/calendar_spec.rb",
205
+ "spec/ri_cal/component/event_spec.rb",
206
+ "spec/ri_cal/component/freebusy_spec.rb",
207
+ "spec/ri_cal/component/journal_spec.rb",
208
+ "spec/ri_cal/component/t_z_info_timezone_spec.rb",
209
+ "spec/ri_cal/component/timezone_spec.rb",
210
+ "spec/ri_cal/component/todo_spec.rb",
211
+ "spec/ri_cal/component_spec.rb",
212
+ "spec/ri_cal/core_extensions/string/conversions_spec.rb",
213
+ "spec/ri_cal/core_extensions/time/calculations_spec.rb",
214
+ "spec/ri_cal/core_extensions/time/week_day_predicates_spec.rb",
215
+ "spec/ri_cal/fast_date_time_spec.rb",
216
+ "spec/ri_cal/inf_loop_spec.rb",
217
+ "spec/ri_cal/occurrence_enumerator_spec.rb",
218
+ "spec/ri_cal/parser_spec.rb",
219
+ "spec/ri_cal/property_value/date_spec.rb",
220
+ "spec/ri_cal/property_value/date_time_spec.rb",
221
+ "spec/ri_cal/property_value/duration_spec.rb",
222
+ "spec/ri_cal/property_value/occurrence_list_spec.rb",
223
+ "spec/ri_cal/property_value/period_spec.rb",
224
+ "spec/ri_cal/property_value/recurrence_rule/recurring_year_day_spec.rb",
225
+ "spec/ri_cal/property_value/recurrence_rule_spec.rb",
226
+ "spec/ri_cal/property_value/text_spec.rb",
227
+ "spec/ri_cal/property_value/utc_offset_spec.rb",
228
+ "spec/ri_cal/property_value_spec.rb",
229
+ "spec/ri_cal/required_timezones_spec.rb",
230
+ "spec/ri_cal_spec.rb",
231
+ "spec/spec_helper.rb"
233
232
  ]
234
233
 
235
234
  if s.respond_to? :specification_version then
236
235
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
237
236
  s.specification_version = 3
238
237
 
239
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
238
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
240
239
  else
241
240
  end
242
241
  else
@@ -260,4 +260,17 @@ END:VCALENDAR)
260
260
  end
261
261
  end
262
262
 
263
+ context "X-properties" do
264
+ it "should round-trip the X-WR-CALNAME property" do
265
+ cal_string = %Q(BEGIN:VCALENDAR
266
+ PRODID:-//Markthisdate.com\,0.7
267
+ VERSION:2.0
268
+ CALSCALE:GREGORIAN
269
+ METHOD:PUBLISH
270
+ X-WR-CALNAME: AFC Ajax Eredivisie wedstrijden 2010 - 2011
271
+ END:VCALENDAR)
272
+ cal = RiCal.parse_string(cal_string).first
273
+ cal.x_wr_calname.first.should == " AFC Ajax Eredivisie wedstrijden 2010 - 2011"
274
+ end
275
+ end
263
276
 
@@ -174,7 +174,7 @@ describe RiCal::Component do
174
174
 
175
175
  before(:each) do
176
176
  @it = RiCal.Calendar do
177
- add_x_property 'x_wr_calname', 'My Personal Calendar'
177
+ add_x_property 'x_wr_calname', 'My Personal Calendar', true
178
178
  event do
179
179
  summary 'A Recurring Event'
180
180
  description "This is some really long note content. It should be appropriately folded in the generated file.\nCarriage returns should work, too."
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ri_cal
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 47
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
8
  - 8
8
- - 7
9
- version: 0.8.7
9
+ - 8
10
+ version: 0.8.8
10
11
  platform: ruby
11
12
  authors:
12
13
  - Rick DeNatale
@@ -14,7 +15,7 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-04-16 00:00:00 -04:00
18
+ date: 2011-02-13 00:00:00 -05:00
18
19
  default_executable: ri_cal
19
20
  dependencies: []
20
21
 
@@ -203,28 +204,32 @@ homepage: http://github.com/rubyredrick/ri_cal
203
204
  licenses: []
204
205
 
205
206
  post_install_message:
206
- rdoc_options:
207
- - --charset=UTF-8
207
+ rdoc_options: []
208
+
208
209
  require_paths:
209
210
  - lib
210
211
  required_ruby_version: !ruby/object:Gem::Requirement
212
+ none: false
211
213
  requirements:
212
214
  - - ">="
213
215
  - !ruby/object:Gem::Version
216
+ hash: 3
214
217
  segments:
215
218
  - 0
216
219
  version: "0"
217
220
  required_rubygems_version: !ruby/object:Gem::Requirement
221
+ none: false
218
222
  requirements:
219
223
  - - ">="
220
224
  - !ruby/object:Gem::Version
225
+ hash: 3
221
226
  segments:
222
227
  - 0
223
228
  version: "0"
224
229
  requirements: []
225
230
 
226
231
  rubyforge_project:
227
- rubygems_version: 1.3.6
232
+ rubygems_version: 1.3.7
228
233
  signing_key:
229
234
  specification_version: 3
230
235
  summary: a new implementation of RFC2445 in Ruby