icalendar 1.1.6 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
File without changes
data/COPYING CHANGED
@@ -1,6 +1,10 @@
1
1
  Ruby is copyrighted free software by Yukihiro Matsumoto <matz@netlab.jp>.
2
- You can redistribute it and/or modify it under either the terms of the GPL
3
- (see the file GPL), or the conditions below:
2
+
3
+ As of Ruby 1.9.3, the Ruby Language went from a Dual GPL/Ruby license
4
+ to Dual BSD/Ruby license. The intent of the icalendar license is that
5
+ it is provided under the same terms as Ruby itself. The way we're
6
+ going to interpret this is the software can be redistributed under any
7
+ of the 3 licenses, GPL, BSD, or the conditions below, at your option:
4
8
 
5
9
  1. You may make and give away verbatim copies of the source form of the
6
10
  software without restriction, provided that you duplicate all of the
@@ -44,9 +48,9 @@ You can redistribute it and/or modify it under either the terms of the GPL
44
48
  For the list of those files and their copying conditions, see the
45
49
  file LEGAL.
46
50
 
47
- 5. The scripts and library files supplied as input to or produced as
51
+ 5. The scripts and library files supplied as input to or produced as
48
52
  output from the software do not automatically fall under the
49
- copyright of the software, but belong to whomever generated them,
53
+ copyright of the software, but belong to whomever generated them,
50
54
  and may be sold commercially, and may be aggregated with this
51
55
  software.
52
56
 
@@ -1,3 +1,7 @@
1
+ === 1.2.0 2012-08-30
2
+ * Fix calendar handling for dates < 1000 - Ryan Ahearn
3
+ * Updated license to GPL/BSD/Ruby at users option
4
+
1
5
  === 1.1.6 2011-03-10
2
6
  * Fix todo handling (thanks to Frank Schwarz)
3
7
  * clean up a number of warnings during test runs
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'fileutils'
5
5
  require './lib/icalendar'
6
6
 
7
7
  Hoe.plugin :newgem
8
- # Hoe.plugin :website
8
+ Hoe.plugin :website
9
9
  # Hoe.plugin :cucumberfeatures
10
10
 
11
11
  # Generate all the Rake tasks
@@ -1,55 +1,21 @@
1
- Gem::Specification.new do |s|
2
- s.name = "icalendar"
3
- s.version = "1.1.1"
4
- s.homepage = "http://icalendar.rubyforge.org/"
5
- s.platform = Gem::Platform::RUBY
6
- s.summary = "A ruby implementation of the iCalendar specification (RFC-2445)."
1
+ Gem::Specification.new do |s|
2
+ s.name = "icalendar"
3
+ s.version = "1.2"
4
+ s.homepage = "http://icalendar.rubyforge.org/"
5
+ s.platform = Gem::Platform::RUBY
6
+ s.summary = "A ruby implementation of the iCalendar specification (RFC-2445)."
7
7
  s.description = "Implements the iCalendar specification (RFC-2445) in Ruby. This allows for the generation and parsing of .ics files, which are used by a variety of calendaring applications."
8
8
 
9
- s.files = [
10
- "test/calendar_test.rb", "test/parameter_test.rb",
11
- "test/interactive.rb", "test/conversions_test.rb",
12
- "test/component_test.rb", "test/parser_test.rb",
13
- "test/read_write.rb", "test/fixtures",
14
- "test/fixtures/single_event.ics",
15
- "test/fixtures/folding.ics",
16
- "test/fixtures/simplecal.ics",
17
- "test/fixtures/life.ics", "test/component",
18
- "test/component/timezone_test.rb",
19
- "test/component/todo_test.rb",
20
- "test/component/event_test.rb", "test/coverage",
21
- "test/coverage/STUB", "lib/icalendar",
22
- "lib/icalendar/parameter.rb",
23
- "lib/icalendar/component.rb",
24
- "lib/icalendar/base.rb", "lib/icalendar/parser.rb",
25
- "lib/icalendar/calendar.rb",
26
- "lib/icalendar/component",
27
- "lib/icalendar/component/alarm.rb",
28
- "lib/icalendar/component/todo.rb",
29
- "lib/icalendar/component/event.rb",
30
- "lib/icalendar/component/journal.rb",
31
- "lib/icalendar/component/timezone.rb",
32
- "lib/icalendar/component/freebusy.rb",
33
- "lib/icalendar/conversions.rb",
34
- "lib/icalendar/rrule.rb",
35
- "lib/icalendar/tzinfo.rb",
36
- "lib/icalendar/helpers.rb", "lib/meta.rb",
37
- "lib/icalendar.rb", "lib/hash_attrs.rb", "docs/rfcs",
38
- "docs/rfcs/rfc2446.pdf", "docs/rfcs/rfc2426.pdf",
39
- "docs/rfcs/itip_notes.txt", "docs/rfcs/rfc2447.pdf",
40
- "docs/rfcs/rfc2425.pdf", "docs/rfcs/rfc2445.pdf",
41
- "docs/rfcs/rfc3283.txt", "docs/api", "docs/api/STUB",
42
- "examples/single_event.ics", "examples/parse_cal.rb",
43
- "examples/create_cal.rb"]
44
-
45
- s.files += ["Rakefile", "README", "COPYING", "GPL" ]
46
- s.require_path = "lib"
47
- s.autorequire = "icalendar"
48
- s.has_rdoc = true
9
+ s.files = `git ls-files`.split("\n")
10
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
11
+
12
+ s.require_path = "lib"
13
+ s.autorequire = "icalendar"
14
+ s.has_rdoc = true
49
15
  s.extra_rdoc_files = ["README", "COPYING", "GPL"]
50
16
  s.rdoc_options.concat ['--main', 'README']
51
17
 
52
- s.author = "Sean Dague"
53
- s.email = "sean@dague.net"
54
- end
18
+ s.author = "Sean Dague"
19
+ s.email = "sean@dague.net"
20
+ end
55
21
 
@@ -10,8 +10,8 @@ require 'logger'
10
10
 
11
11
  module Icalendar #:nodoc:
12
12
 
13
- VERSION = '1.1.6'
14
-
13
+ VERSION = '1.2.0'
14
+
15
15
  # A simple error class to differentiate iCalendar library exceptions
16
16
  # from ruby language exceptions or others.
17
17
  class IcalendarError < StandardError #:nodoc:
@@ -69,32 +69,7 @@ class DateTime < Date
69
69
  include Icalendar::TzidSupport
70
70
 
71
71
  def to_ical
72
- s = ""
73
-
74
- # 4 digit year
75
- s << self.year.to_s
76
-
77
- # Double digit month
78
- s << "0" unless self.month > 9
79
- s << self.month.to_s
80
-
81
- # Double digit day
82
- s << "0" unless self.day > 9
83
- s << self.day.to_s
84
-
85
- s << "T"
86
-
87
- # Double digit hour
88
- s << "0" unless self.hour > 9
89
- s << self.hour.to_s
90
-
91
- # Double digit minute
92
- s << "0" unless self.min > 9
93
- s << self.min.to_s
94
-
95
- # Double digit second
96
- s << "0" unless self.sec > 9
97
- s << self.sec.to_s
72
+ s = strftime '%Y%m%dT%H%M%S'
98
73
 
99
74
  # UTC time gets a Z suffix
100
75
  if icalendar_tzid == "UTC"
@@ -108,37 +83,14 @@ end
108
83
  class Date
109
84
  attr_accessor :ical_params
110
85
  def to_ical(utc = false)
111
- s = ""
112
-
113
- # 4 digit year
114
- s << self.year.to_s
115
-
116
- # Double digit month
117
- s << "0" unless self.month > 9
118
- s << self.month.to_s
119
-
120
- # Double digit day
121
- s << "0" unless self.day > 9
122
- s << self.day.to_s
86
+ strftime '%Y%m%d'
123
87
  end
124
88
  end
125
89
 
126
90
  class Time
127
91
  attr_accessor :ical_params
128
92
  def to_ical(utc = false)
129
- s = ""
130
-
131
- # Double digit hour
132
- s << "0" unless self.hour > 9
133
- s << self.hour.to_s
134
-
135
- # Double digit minute
136
- s << "0" unless self.min > 9
137
- s << self.min.to_s
138
-
139
- # Double digit second
140
- s << "0" unless self.sec > 9
141
- s << self.sec.to_s
93
+ s = strftime '%H%M%S'
142
94
 
143
95
  # UTC time gets a Z suffix
144
96
  if utc
@@ -3,29 +3,29 @@ require File.dirname(__FILE__) + '/../test_helper.rb'
3
3
  require 'date'
4
4
 
5
5
  class TestTodo < Test::Unit::TestCase
6
- include Icalendar
6
+ include Icalendar
7
7
 
8
- def test_todo_fields
8
+ def test_todo_fields
9
9
 
10
- cal = Calendar.new
10
+ cal = Calendar.new
11
11
 
12
- t = cal.todo do
13
- summary "Plan next vacations"
14
- description "Let's have a break"
15
- percent 50
16
- seq 1
17
- add_category "TRAVEL"
18
- add_category "SPORTS"
19
- end
12
+ t = cal.todo do
13
+ summary "Plan next vacations"
14
+ description "Let's have a break"
15
+ percent 50
16
+ seq 1
17
+ add_category "TRAVEL"
18
+ add_category "SPORTS"
19
+ end
20
20
 
21
- calString = cal.to_ical
21
+ calString = cal.to_ical
22
22
 
23
- assert_match(/PERCENT-COMPLETE:50/, calString)
24
- assert_match(/DESCRIPTION:Let's have a break/, calString)
25
- assert_match(/CATEGORIES:TRAVEL,SPORTS/, calString)
26
- assert_match(/SEQUENCE:1/, calString)
23
+ assert_match(/PERCENT-COMPLETE:50/, calString)
24
+ assert_match(/DESCRIPTION:Let's have a break/, calString)
25
+ assert_match(/CATEGORIES:TRAVEL,SPORTS/, calString)
26
+ assert_match(/SEQUENCE:1/, calString)
27
27
 
28
- end
28
+ end
29
29
  end
30
30
 
31
31
 
@@ -1,11 +1,83 @@
1
- <html>
2
- <head>
3
- <meta http-equiv="Content-type" content="text/html; charset=utf-8">
4
- <title>icalendar</title>
5
-
6
- </head>
7
- <body id="body">
8
- <p>This page has not yet been created for RubyGem <code>icalendar</code></p>
9
- <p>To the developer: To generate it, update website/index.txt and run the rake task <code>website</code> to generate this <code>index.html</code> file.</p>
10
- </body>
11
- </html>
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
3
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
4
+ <head>
5
+ <link rel="stylesheet" href="stylesheets/screen.css" type="text/css" media="screen" />
6
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
7
+ <title>
8
+ icalendar
9
+ </title>
10
+ <script src="javascripts/rounded_corners_lite.inc.js" type="text/javascript"></script>
11
+ <style>
12
+
13
+ </style>
14
+ <script type="text/javascript">
15
+ window.onload = function() {
16
+ settings = {
17
+ tl: { radius: 10 },
18
+ tr: { radius: 10 },
19
+ bl: { radius: 10 },
20
+ br: { radius: 10 },
21
+ antiAlias: true,
22
+ autoPad: true,
23
+ validTags: ["div"]
24
+ }
25
+ var versionBox = new curvyCorners(settings, document.getElementById("version"));
26
+ versionBox.applyCornersToAll();
27
+ }
28
+ </script>
29
+ </head>
30
+ <body>
31
+ <div id="main">
32
+
33
+ <h1>icalendar</h1>
34
+ <div class="sidebar">
35
+ <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/icalendar"; return false'>
36
+ <p>Get Version</p>
37
+ <a href="http://rubyforge.org/projects/icalendar" class="numbers">1.1.6</a>
38
+ </div>
39
+ </div>
40
+ <h2>What</h2>
41
+ <h2>Installing</h2>
42
+ <p><pre class='syntax'><span class="ident">sudo</span> <span class="ident">gem</span> <span class="ident">install</span> <span class="ident">icalendar</span></pre></p>
43
+ <h2>The basics</h2>
44
+ <h2>Demonstration of usage</h2>
45
+ <h2>Forum</h2>
46
+ <p><a href="http://groups.google.com/group/icalendar">http://groups.google.com/group/icalendar</a></p>
47
+ <p><span class="caps">TODO</span> &#8211; create Google Group &#8211; icalendar</p>
48
+ <h2>How to submit patches</h2>
49
+ <p>Read the <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/">8 steps for fixing other people&#8217;s code</a> and for section <a href="http://drnicwilliams.com/2007/06/01/8-steps-for-fixing-other-peoples-code/#8b-google-groups">8b: Submit patch to Google Groups</a>, use the Google Group above.</p>
50
+ <p><span class="caps">TODO</span> &#8211; pick <span class="caps">SVN</span> or Git instructions</p>
51
+ <p>The trunk repository is <code>svn://rubyforge.org/var/svn/icalendar/trunk</code> for anonymous access.</p>
52
+ <p><span class="caps">OOOORRRR</span></p>
53
+ <p>You can fetch the source from either:</p>
54
+ <ul>
55
+ <li>rubyforge: <a href="http://rubyforge.org/scm/?group_id=540">http://rubyforge.org/scm/?group_id=540</a></li>
56
+ </ul>
57
+ <pre>git clone git://rubyforge.org/icalendar.git</pre>
58
+ <ul>
59
+ <li>github: <a href="http://github.com/sdague/icalendar/tree/master">http://github.com/sdague/icalendar/tree/master</a></li>
60
+ </ul>
61
+ <pre>git clone git://github.com/sdague/icalendar.git</pre>
62
+ <ul>
63
+ <li>gitorious: <a href="git://gitorious.org/icalendar/mainline.git">git://gitorious.org/icalendar/mainline.git</a></li>
64
+ </ul>
65
+ <pre>git clone git://gitorious.org/icalendar/mainline.git</pre>
66
+ <h3>Build and test instructions</h3>
67
+ <pre>cd icalendar
68
+ rake test
69
+ rake install_gem</pre>
70
+ <h2>License</h2>
71
+ <p>This code is free to use under the terms of the <span class="caps">MIT</span> license.</p>
72
+ <h2>Contact</h2>
73
+ <p>Comments are welcome. Send an email to <a href="mailto:FIXME"><span class="caps">FIXME</span> full name</a> email via the <a href="http://groups.google.com/group/icalendar">forum</a></p>
74
+ <p class="coda">
75
+ <a href="FIXME email">FIXME full name</a>, 10th March 2010<br>
76
+ Theme extended from <a href="http://rb2js.rubyforge.org/">Paul Battley</a>
77
+ </p>
78
+ </div>
79
+
80
+ <!-- insert site tracking codes here, like Google Urchin -->
81
+
82
+ </body>
83
+ </html>
metadata CHANGED
@@ -2,12 +2,12 @@
2
2
  name: icalendar
3
3
  version: !ruby/object:Gem::Version
4
4
  hash: 31
5
- prerelease: false
5
+ prerelease:
6
6
  segments:
7
7
  - 1
8
- - 1
9
- - 6
10
- version: 1.1.6
8
+ - 2
9
+ - 0
10
+ version: 1.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Sean Dague
@@ -15,39 +15,37 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-03-10 00:00:00 -05:00
19
- default_executable:
18
+ date: 2012-08-31 00:00:00 Z
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency
22
- name: rubyforge
21
+ name: rdoc
23
22
  prerelease: false
24
23
  requirement: &id001 !ruby/object:Gem::Requirement
25
24
  none: false
26
25
  requirements:
27
- - - ">="
26
+ - - ~>
28
27
  - !ruby/object:Gem::Version
29
- hash: 9
28
+ hash: 19
30
29
  segments:
31
- - 2
32
- - 0
33
30
  - 3
34
- version: 2.0.3
31
+ - 10
32
+ version: "3.10"
35
33
  type: :development
36
34
  version_requirements: *id001
37
35
  - !ruby/object:Gem::Dependency
38
- name: gemcutter
36
+ name: newgem
39
37
  prerelease: false
40
38
  requirement: &id002 !ruby/object:Gem::Requirement
41
39
  none: false
42
40
  requirements:
43
41
  - - ">="
44
42
  - !ruby/object:Gem::Version
45
- hash: 19
43
+ hash: 5
46
44
  segments:
47
- - 0
45
+ - 1
46
+ - 5
48
47
  - 3
49
- - 0
50
- version: 0.3.0
48
+ version: 1.5.3
51
49
  type: :development
52
50
  version_requirements: *id002
53
51
  - !ruby/object:Gem::Dependency
@@ -56,14 +54,13 @@ dependencies:
56
54
  requirement: &id003 !ruby/object:Gem::Requirement
57
55
  none: false
58
56
  requirements:
59
- - - ">="
57
+ - - ~>
60
58
  - !ruby/object:Gem::Version
61
- hash: 27
59
+ hash: 7
62
60
  segments:
63
- - 2
64
- - 5
61
+ - 3
65
62
  - 0
66
- version: 2.5.0
63
+ version: "3.0"
67
64
  type: :development
68
65
  version_requirements: *id003
69
66
  description: |-
@@ -104,8 +101,8 @@ extra_rdoc_files:
104
101
  - History.txt
105
102
  - Manifest.txt
106
103
  - PostInstall.txt
107
- - website/index.txt
108
104
  - README.rdoc
105
+ - website/index.txt
109
106
  files:
110
107
  - COPYING
111
108
  - GPL
@@ -168,7 +165,7 @@ files:
168
165
  - website/javascripts/rounded_corners_lite.inc.js
169
166
  - website/stylesheets/screen.css
170
167
  - website/template.html.erb
171
- has_rdoc: true
168
+ - .gemtest
172
169
  homepage: http://github.com/sdague/icalendar
173
170
  licenses: []
174
171
 
@@ -199,17 +196,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
196
  requirements: []
200
197
 
201
198
  rubyforge_project: icalendar
202
- rubygems_version: 1.3.7
199
+ rubygems_version: 1.8.15
203
200
  signing_key:
204
201
  specification_version: 3
205
202
  summary: This is a Ruby library for dealing with iCalendar files
206
203
  test_files:
207
- - test/test_parameter.rb
208
- - test/test_conversions.rb
209
- - test/test_parser.rb
210
- - test/component/test_todo.rb
204
+ - test/test_component.rb
211
205
  - test/component/test_timezone.rb
206
+ - test/component/test_todo.rb
212
207
  - test/component/test_event.rb
213
- - test/test_helper.rb
214
208
  - test/test_calendar.rb
215
- - test/test_component.rb
209
+ - test/test_helper.rb
210
+ - test/test_conversions.rb
211
+ - test/test_parser.rb
212
+ - test/test_parameter.rb