ri_cal 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- data/History.txt +5 -0
- data/lib/ri_cal.rb +1 -1
- data/lib/ri_cal/property_value/date_time.rb +1 -1
- data/lib/ri_cal/property_value/duration.rb +1 -1
- data/ri_cal.gemspec +2 -2
- data/spec/ri_cal/component/event_spec.rb +12 -5
- data/spec/ri_cal/component/todo_spec.rb +3 -3
- data/spec/ri_cal/core_extensions/string/conversions_spec.rb +2 -2
- data/spec/ri_cal/parser_spec.rb +1 -1
- metadata +2 -2
data/History.txt
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
=== 0.7.1 - 6 July 2007
|
2
|
+
* fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/15
|
3
|
+
duration validation issues
|
4
|
+
* fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/16
|
5
|
+
event finish_time loses timezone info when event has a dtstart and duration
|
1
6
|
=== 0.7.0 - 29 June 2009
|
2
7
|
* fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/14
|
3
8
|
component without recurrence properties should enumerate just itself only if it is within the period between starting and before
|
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.1'
|
18
18
|
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
|
19
19
|
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
|
20
20
|
|
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.1"
|
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-06
|
9
|
+
s.date = %q{2009-07-06}
|
10
10
|
s.default_executable = %q{ri_cal}
|
11
11
|
s.description = %q{A new Ruby implementation of RFC2445 iCalendar.
|
12
12
|
|
@@ -39,11 +39,18 @@ describe RiCal::Component::Event do
|
|
39
39
|
it "should be the end time for an event with a datetime dtstart and a duration" do
|
40
40
|
@it = RiCal.Event do |evt|
|
41
41
|
evt.dtstart = "20090704T120000Z"
|
42
|
-
evt.duration = "
|
42
|
+
evt.duration = "PT1H30M"
|
43
43
|
end
|
44
44
|
@it.finish_time.should == DateTime.parse("20090704T133000Z")
|
45
45
|
end
|
46
46
|
|
47
|
+
it "should uset the timezone of dtstart when event has a duration" do
|
48
|
+
@it = RiCal.Event do |evt|
|
49
|
+
evt.dtstart = "TZID=Australia/Sydney:20090712T200000"
|
50
|
+
evt.duration = "PT1H"
|
51
|
+
end
|
52
|
+
@it.finish_time.should == DateTime.parse("2009-07-12T21:00:00+10:00")
|
53
|
+
end
|
47
54
|
end
|
48
55
|
|
49
56
|
context ".before_range?" do
|
@@ -317,7 +324,7 @@ describe RiCal::Component::Event do
|
|
317
324
|
context "with no dtend" do
|
318
325
|
context "and a duration" do
|
319
326
|
it "should be the dtstart plus the duration" do
|
320
|
-
@event.duration = "+
|
327
|
+
@event.duration = "+PT1H"
|
321
328
|
@event.finish_time.should == DateTime.civil(2009,5,25,16,19,0,0)
|
322
329
|
end
|
323
330
|
end
|
@@ -394,7 +401,7 @@ describe RiCal::Component::Event do
|
|
394
401
|
context "with no dtend" do
|
395
402
|
context "and a duration" do
|
396
403
|
it "should be the dtstart plus the duration" do
|
397
|
-
@event.duration = "+
|
404
|
+
@event.duration = "+PT1H"
|
398
405
|
@event.zulu_occurrence_range_finish_time.should == DateTime.civil(2009,5,25,20 ,19,0,0)
|
399
406
|
end
|
400
407
|
end
|
@@ -489,12 +496,12 @@ describe RiCal::Component::Event do
|
|
489
496
|
end
|
490
497
|
|
491
498
|
it "should reset the dtend property if the duration property is set" do
|
492
|
-
@it.duration_property = "
|
499
|
+
@it.duration_property = "PT1H".to_ri_cal_duration_value
|
493
500
|
@it.dtend_property.should be_nil
|
494
501
|
end
|
495
502
|
|
496
503
|
it "should reset the dtend property if the duration ruby value is set" do
|
497
|
-
@it.duration = "
|
504
|
+
@it.duration = "PT1H".to_ri_cal_duration_value
|
498
505
|
@it.dtend_property.should be_nil
|
499
506
|
end
|
500
507
|
end
|
@@ -35,7 +35,7 @@ describe RiCal::Component::Todo do
|
|
35
35
|
context "with no due" do
|
36
36
|
context "and a duration" do
|
37
37
|
before(:each) do
|
38
|
-
@todo.duration = "+
|
38
|
+
@todo.duration = "+PT1H"
|
39
39
|
end
|
40
40
|
|
41
41
|
it "should be the dtstart plus the duration" do
|
@@ -100,12 +100,12 @@ describe RiCal::Component::Todo do
|
|
100
100
|
end
|
101
101
|
|
102
102
|
it "should reset the due property if the duration property is set" do
|
103
|
-
@it.duration_property = "
|
103
|
+
@it.duration_property = "PT1H".to_ri_cal_duration_value
|
104
104
|
@it.due_property.should be_nil
|
105
105
|
end
|
106
106
|
|
107
107
|
it "should reset the duration property if the dtend ruby value is set" do
|
108
|
-
@it.duration = "
|
108
|
+
@it.duration = "PT1H"
|
109
109
|
@it.due_property.should == nil
|
110
110
|
end
|
111
111
|
end
|
@@ -21,7 +21,7 @@ describe RiCal::CoreExtensions::String::Conversions do
|
|
21
21
|
context "#to_ri_cal_duration_value" do
|
22
22
|
|
23
23
|
it "should produce a Duration property for a valid RFC 2445 duration string" do
|
24
|
-
"
|
24
|
+
"PT1H".to_ri_cal_duration_value.should == RiCal::PropertyValue::Duration.new(nil, :value => "PT1H")
|
25
25
|
end
|
26
26
|
|
27
27
|
it "should raise an InvalidPropertyValue error if the string is not a valid RFC 2445 datetime string" do
|
@@ -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/
|
71
|
+
"20090304T012345/PT1H".to_ri_cal_occurrence_list_value.should == RiCal::PropertyValue::Period.new(nil, :value => "20090304T012345/P1H")
|
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
|
data/spec/ri_cal/parser_spec.rb
CHANGED
@@ -157,7 +157,7 @@ describe RiCal::Parser do
|
|
157
157
|
describe_property("VEVENT", "DTSTART", {"X-FOO" => "BAR"}, "19970714T235959Z", RiCal::PropertyValue::DateTime)
|
158
158
|
|
159
159
|
#RFC 2445 section 4.8.2.5 DURATION p94
|
160
|
-
describe_property("VEVENT", "DURATION", {"X-FOO" => "BAR"}, "
|
160
|
+
describe_property("VEVENT", "DURATION", {"X-FOO" => "BAR"}, "PT1H", RiCal::PropertyValue::Duration)
|
161
161
|
|
162
162
|
#RFC 2445 section 4.8.2.6 FREEBUSY does not apply to Events
|
163
163
|
|
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.1
|
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-06
|
12
|
+
date: 2009-07-06 00:00:00 -04:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|