calfilter 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,10 @@
1
+ === 1.1.3 / 2008-05-04
2
+
3
+ * Bug fixes:
4
+
5
+ * Monkey-patched Icalendar to deal with Dates (as opposed to
6
+ DateTimes) correctly.
7
+
1
8
  === 1.1.2 / 2008-05-04
2
9
 
3
10
  * Bug fix in calfilter.rb
data/Manifest.txt CHANGED
@@ -2,9 +2,13 @@ History.txt
2
2
  Manifest.txt
3
3
  README.txt
4
4
  Rakefile
5
+ ToDo.txt
5
6
  example.rb
6
7
  lib/calfilter.rb
7
8
  lib/calfilter/cgi.rb
9
+ lib/calfilter/datetime_extensions.rb
10
+ lib/calfilter/icalendar_extensions.rb
11
+ lib/calfilter/time_extensions.rb
8
12
  lib/calfilter/tripit.rb
9
13
  test/test_calfilter.rb
10
14
  test/test_calfilter_cgi.rb
data/ToDo.txt ADDED
@@ -0,0 +1,17 @@
1
+ * Greatly improve (i.e., existing) RDocs
2
+
3
+ * Ensure timezone information is retained
4
+
5
+ * Improved set of TripIt methods
6
+
7
+ * Other specialized methods (say, for GCalendar or ICal feeds)
8
+
9
+ * Higher-level methods (say, "privatize" to replace all information with
10
+ a "Private" or "Busy" description)
11
+
12
+ * Some date manipulation methods (e.g., my calendar might have the actual
13
+ appointment time for some events, but for display to others I might want
14
+ to enlarge it to incorporate travel time to and from)
15
+
16
+ * Similar to the cgi module, it should be easy to require modules
17
+ to turn a filter into a camping app, a webrick service, etc.
@@ -0,0 +1,12 @@
1
+ class DateTime
2
+ attr_writer :utc
3
+
4
+ def utc?
5
+ @utc
6
+ end
7
+
8
+ def to_ical(unused_utc = false)
9
+ strftime('%Y%m%dT%H%M%S') + (utc? ? 'Z' : '')
10
+ end
11
+
12
+ end
@@ -0,0 +1,18 @@
1
+ class Icalendar::Parser
2
+ def parse_datetime_with_date_check(name, params, value)
3
+ if /\d{8}T/ =~ value
4
+ dt = parse_datetime_without_date_check(name, params, value)
5
+ dt.utc = true if /Z/ =~ value
6
+ dt
7
+ else
8
+ begin
9
+ Date.parse(value)
10
+ rescue Exception
11
+ value
12
+ end
13
+ end
14
+ end
15
+
16
+ alias :parse_datetime_without_date_check :parse_datetime
17
+ alias :parse_datetime :parse_datetime_with_date_check
18
+ end
@@ -0,0 +1,12 @@
1
+ class Time
2
+ attr_writer :utc
3
+
4
+ def utc?
5
+ @utc
6
+ end
7
+
8
+ def to_ical(unused_utc = false)
9
+ strftime('%H%M%S') + (utc? ? 'Z' : '')
10
+ end
11
+
12
+ end
data/lib/calfilter.rb CHANGED
@@ -1,7 +1,10 @@
1
+ $:.unshift(File.dirname(__FILE__))
2
+
1
3
  %w{rubygems icalendar date open-uri}.each{|l| require l}
4
+ %w{datetime icalendar time}.each{|l| require "calfilter/#{l}_extensions"}
2
5
 
3
6
  module CalFilter
4
- VERSION = '1.1.2'
7
+ VERSION = '1.1.3'
5
8
 
6
9
  def self.output_stream
7
10
  @output_stream
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: calfilter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Glenn Vanderburg
@@ -53,14 +53,19 @@ extra_rdoc_files:
53
53
  - History.txt
54
54
  - Manifest.txt
55
55
  - README.txt
56
+ - ToDo.txt
56
57
  files:
57
58
  - History.txt
58
59
  - Manifest.txt
59
60
  - README.txt
60
61
  - Rakefile
62
+ - ToDo.txt
61
63
  - example.rb
62
64
  - lib/calfilter.rb
63
65
  - lib/calfilter/cgi.rb
66
+ - lib/calfilter/datetime_extensions.rb
67
+ - lib/calfilter/icalendar_extensions.rb
68
+ - lib/calfilter/time_extensions.rb
64
69
  - lib/calfilter/tripit.rb
65
70
  - test/test_calfilter.rb
66
71
  - test/test_calfilter_cgi.rb
metadata.gz.sig CHANGED
Binary file