ri_cal 0.7.5 → 0.7.6
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +27 -24
- data/lib/ri_cal.rb +1 -1
- data/lib/ri_cal/property_value/period.rb +4 -0
- data/ri_cal.gemspec +2 -2
- data/spec/ri_cal/bugreports_spec.rb +30 -1
- data/spec/ri_cal/core_extensions/string/conversions_spec.rb +1 -1
- data/spec/ri_cal/property_value/period_spec.rb +16 -2
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,38 +1,41 @@
|
|
1
|
+
=== 0.7.6 - 6 August 2009
|
2
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/20
|
3
|
+
RiCal::PropertyValue::Period was returning a nil ruby value.
|
1
4
|
=== 0.7.5 - 3 August 2009
|
2
|
-
-
|
5
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/19
|
3
6
|
Microsoft ical exports double quote tzid values in parameters, which caused a failure to find VTIMEZONES
|
4
7
|
This exposed an issue with parameter parsing. Did the simplest thing which could work which was to
|
5
8
|
strip the quotes. Need to BOLO for other pathological cases showing up in future, which may require
|
6
9
|
smarter parameter parsing.
|
7
10
|
|
8
11
|
=== 0.7.4 - 21 July 2009
|
9
|
-
-
|
12
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/17
|
10
13
|
Problem with Alarm trigger property value
|
11
|
-
-
|
14
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/18
|
12
15
|
Problem with exporting components with sub-components
|
13
16
|
=== 0.7.3 - 13 July 2009
|
14
17
|
Added pointers to rdoc in README
|
15
18
|
=== 0.7.2 - 6 July 2009
|
16
19
|
updated to use newest versions of newgem and hoe, in order to make run-code-run work again
|
17
20
|
=== 0.7.1 - 6 July 2009
|
18
|
-
-
|
21
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/15
|
19
22
|
duration validation issues
|
20
|
-
-
|
23
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/16
|
21
24
|
event finish_time loses timezone info when event has a dtstart and duration
|
22
25
|
=== 0.7.0 - 29 June 2009
|
23
|
-
-
|
26
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/14
|
24
27
|
component without recurrence properties should enumerate just itself only if it is within the period between starting and before
|
25
28
|
- added the :overlapping option to OccurrenceEnumerator#occurrences - Allows the enumeration of occurrences which are either partiall or completely within a timespan given by a pair of Dates/Times/DateTimes
|
26
|
-
-
|
29
|
+
- Fixes some Ruby 1.9 incompatibilities
|
27
30
|
- Added some new rake tasks to run specs under multi-ruby
|
28
31
|
=== 0.6.3 - 14 June 2009
|
29
|
-
-
|
32
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941-ri_cal/tickets/13
|
30
33
|
tzinfotimezones-with-no-transitions-fail-on-export
|
31
34
|
=== 0.6.2 - 11 June 2009
|
32
|
-
-
|
35
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941-ri_cal/tickets/12
|
33
36
|
export-failure-for-unbounded-tzinfo-timezone
|
34
37
|
=== 0.6.1 - 6 June 2009
|
35
|
-
-
|
38
|
+
- Fixes problem with file which loads activesupport for the rake spec:with_activesupport task, it now
|
36
39
|
requires >=2.2 instead of <=2.2 - Thanks to Paul Scott-Murphy for finding this.
|
37
40
|
=== 0.6.0 - 5 June 2009
|
38
41
|
Time for a minor version bump.
|
@@ -49,41 +52,41 @@
|
|
49
52
|
- Improved performance of time zone enumeration, TimeZonePeriod now caches occurrences
|
50
53
|
- Added a profiling directory which contains ruby programs which benchmark and/or profile performance
|
51
54
|
=== 0.5.2
|
52
|
-
-
|
55
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/11
|
53
56
|
Export folding is not UTF-8 Safe
|
54
57
|
=== 0.5.1
|
55
|
-
-
|
58
|
+
- Fixes README to acknowledge release on RubyForge
|
56
59
|
=== 0.5.0 rubyforge release candidate Tue May 26 10:26:43 2009 -0400
|
57
60
|
- Added OccurrenceEnumerator#zulu_occurrence_range
|
58
61
|
=== 0.0.11 Sat May 23 18:24:57 2009 -0400
|
59
|
-
-
|
60
|
-
-
|
62
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/5
|
63
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/9
|
61
64
|
=== 0.0.10
|
62
|
-
-
|
65
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/8
|
63
66
|
=== 0.0.9
|
64
|
-
-
|
67
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/4
|
65
68
|
Missing comparison methods in PropertyValue::Date
|
66
|
-
-
|
69
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/6
|
67
70
|
Type of dtstart and dtend (DATE or DATETIME) now preserved on enumeration
|
68
71
|
=== 0.0.8
|
69
|
-
-
|
72
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941-ri_cal/tickets/1
|
70
73
|
EXDATE and RDATE now pick up the timezone from DateTime, Time, and TimeWithZone values
|
71
|
-
-
|
74
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/2
|
72
75
|
Missing arithmetic methods in PropertyValue::Date
|
73
|
-
-
|
76
|
+
- Fixes http://rick_denatale.lighthouseapp.com/projects/30941/tickets/3
|
74
77
|
Components with no recurrence rules or rdate properties failed on enumeration, they now
|
75
78
|
will enumerate a single occurrence
|
76
79
|
=== 0.0.7
|
77
|
-
-
|
80
|
+
- Fixes a bug relating to properly recognizing ActiveRecord::TimeWithZone
|
78
81
|
- DATETIME propertyvalues will now return an instance of TimeWithZone instead of DateTime when
|
79
82
|
activesupport is present, and it is appropriate. See the README for details
|
80
83
|
=== 0.0.6
|
81
84
|
- Added rake tasks to run specs with either the tzinfo gem or activesupport (<=2.2)
|
82
85
|
- Default rake task now runs both of these
|
83
86
|
=== 0.0.5
|
84
|
-
-
|
87
|
+
- Fixes a bug in occurrence enumeration reported by paulsm on github
|
85
88
|
=== 0.0.4
|
86
|
-
-
|
89
|
+
- Fixes a bug in imported timezones reported by paulsm on github
|
87
90
|
=== 0.0.3
|
88
91
|
- Added tzid method to Ruby Time and DateTime instances, and to ActiveRecord::TimeWithZone if it is defined this method is used to determine the desired
|
89
92
|
timezone when an instance of one of these classes is given as the value of a datetime property. If the tzid is nil then the default tzid is used,
|
@@ -100,6 +103,6 @@ for the DateTime property class.
|
|
100
103
|
-- http://github.com/wesmaldonado/ri_cal
|
101
104
|
|
102
105
|
=== 0.0.2
|
103
|
-
-
|
106
|
+
- Fixes gemspec
|
104
107
|
== 0.0.1
|
105
108
|
- Initial public release
|
data/lib/ri_cal.rb
CHANGED
@@ -14,7 +14,7 @@ module RiCal
|
|
14
14
|
autoload :OccurrenceEnumerator, "#{my_dir}/ri_cal/occurrence_enumerator.rb"
|
15
15
|
|
16
16
|
# :stopdoc:
|
17
|
-
VERSION = '0.7.
|
17
|
+
VERSION = '0.7.6'
|
18
18
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
19
19
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
20
20
|
|
@@ -26,8 +26,12 @@ module RiCal
|
|
26
26
|
self.dtend = PropertyValue::DateTime.new(self, :value => terminator)
|
27
27
|
self.duration = PropertyValue::Duration.from_datetimes(self, dtstart.to_datetime, dtend.to_datetime)
|
28
28
|
end
|
29
|
+
@value = string
|
29
30
|
end
|
30
31
|
|
32
|
+
def ruby_value
|
33
|
+
self
|
34
|
+
end
|
31
35
|
|
32
36
|
def self.valid_string?(string) # :nodoc:
|
33
37
|
return false unless string.include?("/")
|
data/ri_cal.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{ri_cal}
|
5
|
-
s.version = "0.7.
|
5
|
+
s.version = "0.7.6"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["author=Rick DeNatale"]
|
9
|
-
s.date = %q{2009-08-
|
9
|
+
s.date = %q{2009-08-06}
|
10
10
|
s.default_executable = %q{ri_cal}
|
11
11
|
s.description = %q{A new Ruby implementation of RFC2445 iCalendar.
|
12
12
|
|
@@ -134,4 +134,33 @@ ENDCAL
|
|
134
134
|
it "not raise an error accessing DTSTART" do
|
135
135
|
lambda {@event.dtstart}.should_not raise_error
|
136
136
|
end
|
137
|
-
end
|
137
|
+
end
|
138
|
+
|
139
|
+
describe "freebusy problem" do
|
140
|
+
before(:each) do
|
141
|
+
cal = RiCal.parse_string(<<ENDCAL)
|
142
|
+
BEGIN:VCALENDAR
|
143
|
+
METHOD:PUBLISH
|
144
|
+
VERSION:2.0
|
145
|
+
PRODID:Zimbra-Calendar-Provider
|
146
|
+
BEGIN:VFREEBUSY
|
147
|
+
ORGANIZER:mailto:bj-wagoner@wiu.edu
|
148
|
+
DTSTAMP:20090805T200417Z
|
149
|
+
DTSTART:20090705T200417Z
|
150
|
+
DTEND:20091006T200417Z
|
151
|
+
URL:https://zimbra9.wiu.edu/service/home/bjw101/calendar.ifb?null
|
152
|
+
FREEBUSY;FBTYPE=BUSY:20090705T200417Z/20090707T050000Z
|
153
|
+
FREEBUSY;FBTYPE=BUSY-TENTATIVE:20090711T050000Z/20090712T050000Z
|
154
|
+
END:VFREEBUSY
|
155
|
+
END:VCALENDAR
|
156
|
+
ENDCAL
|
157
|
+
@free_busy = cal.first.freebusys.first
|
158
|
+
end
|
159
|
+
|
160
|
+
it "should have two periods" do
|
161
|
+
@free_busy.freebusy.map {|fb| fb.to_s}.should == [
|
162
|
+
";FBTYPE=BUSY:20090705T200417Z/20090707T050000Z",
|
163
|
+
";FBTYPE=BUSY-TENTATIVE:20090711T050000Z/20090712T050000Z"
|
164
|
+
]
|
165
|
+
end
|
166
|
+
end
|
@@ -68,7 +68,7 @@ describe RiCal::CoreExtensions::String::Conversions do
|
|
68
68
|
end
|
69
69
|
|
70
70
|
it "should produce a Period property for a valid RFC 2445 period string (time and duration format)" do
|
71
|
-
"20090304T012345/PT1H".to_ri_cal_occurrence_list_value.should == RiCal::PropertyValue::Period.new(nil, :value => "20090304T012345/
|
71
|
+
"20090304T012345/PT1H".to_ri_cal_occurrence_list_value.should == RiCal::PropertyValue::Period.new(nil, :value => "20090304T012345/PT1H")
|
72
72
|
end
|
73
73
|
|
74
74
|
it "should raise an InvalidPropertyValue error if the string is not a valid RFC 2445 date or datetime string" do
|
@@ -13,7 +13,8 @@ describe RiCal::PropertyValue::Period do
|
|
13
13
|
|
14
14
|
describe "with an explicit period" do
|
15
15
|
before(:each) do
|
16
|
-
@
|
16
|
+
@value_string = "#{@start_dt.value}/#{@end_dt.value}"
|
17
|
+
@it = RiCal::PropertyValue::Period.new(nil, :value => @value_string)
|
17
18
|
end
|
18
19
|
|
19
20
|
it "should have the correct dtstart value" do
|
@@ -27,11 +28,20 @@ describe RiCal::PropertyValue::Period do
|
|
27
28
|
it "should have the correct duration value" do
|
28
29
|
@it.duration.should == @duration
|
29
30
|
end
|
31
|
+
|
32
|
+
it "should have the correct string value" do
|
33
|
+
@it.to_s.should == ":#{@value_string}"
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should be its own ruby_value" do
|
37
|
+
@it.ruby_value.should == @it
|
38
|
+
end
|
30
39
|
end
|
31
40
|
|
32
41
|
describe "with a start time and period" do
|
33
42
|
before(:each) do
|
34
|
-
@
|
43
|
+
@value_string = "#{@start_dt.value}/#{@duration.value}"
|
44
|
+
@it = RiCal::PropertyValue::Period.new(nil, :value => @value_string)
|
35
45
|
end
|
36
46
|
|
37
47
|
it "should have the correct dtstart value" do
|
@@ -45,5 +55,9 @@ describe RiCal::PropertyValue::Period do
|
|
45
55
|
it "should have the correct duration value" do
|
46
56
|
@it.duration.should == @duration
|
47
57
|
end
|
58
|
+
|
59
|
+
it "should have the correct string value" do
|
60
|
+
@it.to_s.should == ":#{@value_string}"
|
61
|
+
end
|
48
62
|
end
|
49
63
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ri_cal
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- author=Rick DeNatale
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-08-
|
12
|
+
date: 2009-08-06 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|