Permalink
Browse files

=== 0.7.1 - 6 July 2007

  * fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/15
      duration validation issues
  * fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/16
      event finish_time loses timezone info when event has a dtstart and duration
  • Loading branch information...
rubyredrick committed Jul 6, 2009
1 parent f7d0c18 commit 66babd7852f4f02871165bf4bac28747cc374eab
View
@@ -1,3 +1,8 @@
+=== 0.7.1 - 6 July 2007
+ * fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/15
+ duration validation issues
+ * fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/16
+ event finish_time loses timezone info when event has a dtstart and duration
=== 0.7.0 - 29 June 2009
* fixed http://rick_denatale.lighthouseapp.com/projects/30941/tickets/14
component without recurrence properties should enumerate just itself only if it is within the period between starting and before
View
@@ -14,7 +14,7 @@ module RiCal
autoload :OccurrenceEnumerator, "#{my_dir}/ri_cal/occurrence_enumerator.rb"
# :stopdoc:
- VERSION = '0.7.0'
+ VERSION = '0.7.1'
LIBPATH = ::File.expand_path(::File.dirname(__FILE__)) + ::File::SEPARATOR
PATH = ::File.dirname(LIBPATH) + ::File::SEPARATOR
@@ -306,7 +306,7 @@ def ruby_value
end
alias_method :to_ri_cal_ruby_value, :to_datetime
- alias_method :to_finish_time, :to_datetime
+ alias_method :to_finish_time, :ruby_value
def to_zulu_time
utc.to_datetime
@@ -62,7 +62,7 @@ def value=(string) # :nodoc:
end
def self.valid_string?(string) #:nodoc:
- string =~ /^[+-]?P((\d+)[DHMSW])+$/
+ string =~ /^[+-]?P((\d+D)(T((\d+)[HMS])+)?)|(T((\d+)[HMS])+)|(\d+W)$/
end
def days # :nodoc:
View
@@ -2,11 +2,11 @@
Gem::Specification.new do |s|
s.name = %q{ri_cal}
- s.version = "0.7.0"
+ s.version = "0.7.1"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["author=Rick DeNatale"]
- s.date = %q{2009-06-29}
+ s.date = %q{2009-07-06}
s.default_executable = %q{ri_cal}
s.description = %q{A new Ruby implementation of RFC2445 iCalendar.
@@ -39,11 +39,18 @@
it "should be the end time for an event with a datetime dtstart and a duration" do
@it = RiCal.Event do |evt|
evt.dtstart = "20090704T120000Z"
- evt.duration = "P1H30M"
+ evt.duration = "PT1H30M"
end
@it.finish_time.should == DateTime.parse("20090704T133000Z")
end
+ it "should uset the timezone of dtstart when event has a duration" do
+ @it = RiCal.Event do |evt|
+ evt.dtstart = "TZID=Australia/Sydney:20090712T200000"
+ evt.duration = "PT1H"
+ end
+ @it.finish_time.should == DateTime.parse("2009-07-12T21:00:00+10:00")
+ end
end
context ".before_range?" do
@@ -317,7 +324,7 @@
context "with no dtend" do
context "and a duration" do
it "should be the dtstart plus the duration" do
- @event.duration = "+P1H"
+ @event.duration = "+PT1H"
@event.finish_time.should == DateTime.civil(2009,5,25,16,19,0,0)
end
end
@@ -394,7 +401,7 @@
context "with no dtend" do
context "and a duration" do
it "should be the dtstart plus the duration" do
- @event.duration = "+P1H"
+ @event.duration = "+PT1H"
@event.zulu_occurrence_range_finish_time.should == DateTime.civil(2009,5,25,20 ,19,0,0)
end
end
@@ -489,12 +496,12 @@
end
it "should reset the dtend property if the duration property is set" do
- @it.duration_property = "P1H".to_ri_cal_duration_value
+ @it.duration_property = "PT1H".to_ri_cal_duration_value
@it.dtend_property.should be_nil
end
it "should reset the dtend property if the duration ruby value is set" do
- @it.duration = "P1H".to_ri_cal_duration_value
+ @it.duration = "PT1H".to_ri_cal_duration_value
@it.dtend_property.should be_nil
end
end
@@ -35,7 +35,7 @@
context "with no due" do
context "and a duration" do
before(:each) do
- @todo.duration = "+P1H"
+ @todo.duration = "+PT1H"
end
it "should be the dtstart plus the duration" do
@@ -100,12 +100,12 @@
end
it "should reset the due property if the duration property is set" do
- @it.duration_property = "P1H".to_ri_cal_duration_value
+ @it.duration_property = "PT1H".to_ri_cal_duration_value
@it.due_property.should be_nil
end
it "should reset the duration property if the dtend ruby value is set" do
- @it.duration = "P1H"
+ @it.duration = "PT1H"
@it.due_property.should == nil
end
end
@@ -21,7 +21,7 @@
context "#to_ri_cal_duration_value" do
it "should produce a Duration property for a valid RFC 2445 duration string" do
- "P1H".to_ri_cal_duration_value.should == RiCal::PropertyValue::Duration.new(nil, :value => "P1H")
+ "PT1H".to_ri_cal_duration_value.should == RiCal::PropertyValue::Duration.new(nil, :value => "PT1H")
end
it "should raise an InvalidPropertyValue error if the string is not a valid RFC 2445 datetime string" do
@@ -68,7 +68,7 @@
end
it "should produce a Period property for a valid RFC 2445 period string (time and duration format)" do
- "20090304T012345/P1H".to_ri_cal_occurrence_list_value.should == RiCal::PropertyValue::Period.new(nil, :value => "20090304T012345/P1H")
+ "20090304T012345/PT1H".to_ri_cal_occurrence_list_value.should == RiCal::PropertyValue::Period.new(nil, :value => "20090304T012345/P1H")
end
it "should raise an InvalidPropertyValue error if the string is not a valid RFC 2445 date or datetime string" do
@@ -157,7 +157,7 @@ def self.describe_named_property(entity_name, prop_text, prop_name, params, valu
describe_property("VEVENT", "DTSTART", {"X-FOO" => "BAR"}, "19970714T235959Z", RiCal::PropertyValue::DateTime)
#RFC 2445 section 4.8.2.5 DURATION p94
- describe_property("VEVENT", "DURATION", {"X-FOO" => "BAR"}, "P1H", RiCal::PropertyValue::Duration)
+ describe_property("VEVENT", "DURATION", {"X-FOO" => "BAR"}, "PT1H", RiCal::PropertyValue::Duration)
#RFC 2445 section 4.8.2.6 FREEBUSY does not apply to Events
View
@@ -34,7 +34,7 @@ <h1>RiCal</h1>
<div class="sidebar">
<div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/ri-cal"; return false'>
<p>Get Version</p>
- <a href="http://rubyforge.org/projects/ri-cal" class="numbers">0.6.3</a>
+ <a href="http://rubyforge.org/projects/ri-cal" class="numbers">0.7.0</a>
<p>
<a href='http://www.pledgie.com/campaigns/4360'><img alt='Click here to lend your support to: ri_cal and make a donation at www.pledgie.com !' src='http://www.pledgie.com/campaigns/4360.png?skin_name=chrome' border='0' /></a>
</p>

0 comments on commit 66babd7

Please sign in to comment.