icalendar2 0.1.1 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.md +3 -0
- data/lib/icalendar2/component/base.rb +1 -1
- data/lib/icalendar2/property/base.rb +5 -1
- data/lib/icalendar2/property/created.rb +9 -0
- data/lib/icalendar2/version.rb +1 -1
- data/lib/icalendar2.rb +1 -5
- metadata +36 -55
- data/lib/icalendar2/component/alarm.rb +0 -9
- data/lib/icalendar2/component/freebusy.rb +0 -16
- data/lib/icalendar2/component/journal.rb +0 -18
- data/lib/icalendar2/component/timezone.rb +0 -9
- data/lib/icalendar2/component/todo.rb +0 -19
data/CHANGELOG.md
CHANGED
@@ -45,10 +45,14 @@ module Icalendar2
|
|
45
45
|
@valid
|
46
46
|
end
|
47
47
|
|
48
|
+
def value_str
|
49
|
+
Array(value).map { |v| v.to_s.respond_to?(:strip) ? v.to_s.strip : v }.join(",")
|
50
|
+
end
|
51
|
+
|
48
52
|
def to_ical
|
49
53
|
parameters_str = @parameters.map { |k, v| "#{k}=#{v}" }.join(";")
|
50
54
|
parameters_str = ";#{parameters_str}" if parameters_str != ""
|
51
|
-
str = fold("#{name}#{parameters_str}:#{
|
55
|
+
str = fold("#{name}#{parameters_str}:#{value_str}")
|
52
56
|
str << Tokens::CRLF
|
53
57
|
end
|
54
58
|
|
data/lib/icalendar2/version.rb
CHANGED
data/lib/icalendar2.rb
CHANGED
@@ -8,11 +8,6 @@ module Icalendar2
|
|
8
8
|
|
9
9
|
autoload :Component, "icalendar2/component"
|
10
10
|
autoload :Event, "icalendar2/component/event"
|
11
|
-
autoload :Todo, "icalendar2/component/todo"
|
12
|
-
autoload :Journal, "icalendar2/component/journal"
|
13
|
-
autoload :Freebusy, "icalendar2/component/freebusy"
|
14
|
-
autoload :Timezone, "icalendar2/component/timezone"
|
15
|
-
autoload :Alarm, "icalendar2/component/alarm"
|
16
11
|
module Component
|
17
12
|
autoload :Base, "icalendar2/component/base"
|
18
13
|
end
|
@@ -58,6 +53,7 @@ module Icalendar2
|
|
58
53
|
autoload :Comment, "icalendar2/property/comment"
|
59
54
|
autoload :Contact, "icalendar2/property/contact"
|
60
55
|
autoload :Description, "icalendar2/property/description"
|
56
|
+
autoload :Created, "icalendar2/property/created"
|
61
57
|
autoload :Dtend, "icalendar2/property/dtend"
|
62
58
|
autoload :Dtstamp, "icalendar2/property/dtstamp"
|
63
59
|
autoload :Dtstart, "icalendar2/property/dtstart"
|
metadata
CHANGED
@@ -1,60 +1,50 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: icalendar2
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
- 1
|
10
|
-
version: 0.1.1
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Eric Carty-Fickes
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-02-05 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rspec
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 2
|
31
|
-
version: "2"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2'
|
32
22
|
type: :development
|
33
|
-
|
34
|
-
|
35
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '2'
|
30
|
+
description: Borrows fromt the API used by the icalendar Ruby gem. Outputs iCalendar
|
31
|
+
(RFC 5545) formatted text.
|
32
|
+
email:
|
36
33
|
- ericcf@northwestern.edu
|
37
34
|
executables: []
|
38
|
-
|
39
35
|
extensions: []
|
40
|
-
|
41
|
-
extra_rdoc_files:
|
36
|
+
extra_rdoc_files:
|
42
37
|
- CHANGELOG.md
|
43
38
|
- README.md
|
44
|
-
files:
|
39
|
+
files:
|
45
40
|
- lib/icalendar2/calendar.rb
|
46
41
|
- lib/icalendar2/calendar_property/calscale.rb
|
47
42
|
- lib/icalendar2/calendar_property/method.rb
|
48
43
|
- lib/icalendar2/calendar_property/prodid.rb
|
49
44
|
- lib/icalendar2/calendar_property/version.rb
|
50
45
|
- lib/icalendar2/calendar_property.rb
|
51
|
-
- lib/icalendar2/component/alarm.rb
|
52
46
|
- lib/icalendar2/component/base.rb
|
53
47
|
- lib/icalendar2/component/event.rb
|
54
|
-
- lib/icalendar2/component/freebusy.rb
|
55
|
-
- lib/icalendar2/component/journal.rb
|
56
|
-
- lib/icalendar2/component/timezone.rb
|
57
|
-
- lib/icalendar2/component/todo.rb
|
58
48
|
- lib/icalendar2/component.rb
|
59
49
|
- lib/icalendar2/parameter/altrep.rb
|
60
50
|
- lib/icalendar2/parameter/base.rb
|
@@ -74,6 +64,7 @@ files:
|
|
74
64
|
- lib/icalendar2/property/class.rb
|
75
65
|
- lib/icalendar2/property/comment.rb
|
76
66
|
- lib/icalendar2/property/contact.rb
|
67
|
+
- lib/icalendar2/property/created.rb
|
77
68
|
- lib/icalendar2/property/description.rb
|
78
69
|
- lib/icalendar2/property/dtend.rb
|
79
70
|
- lib/icalendar2/property/dtstamp.rb
|
@@ -116,36 +107,26 @@ files:
|
|
116
107
|
- README.md
|
117
108
|
homepage: https://github.com/ericcf/icalendar2
|
118
109
|
licenses: []
|
119
|
-
|
120
110
|
post_install_message:
|
121
111
|
rdoc_options: []
|
122
|
-
|
123
|
-
require_paths:
|
112
|
+
require_paths:
|
124
113
|
- lib
|
125
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
114
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
126
115
|
none: false
|
127
|
-
requirements:
|
128
|
-
- -
|
129
|
-
- !ruby/object:Gem::Version
|
130
|
-
|
131
|
-
|
132
|
-
- 0
|
133
|
-
version: "0"
|
134
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ! '>='
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: '0'
|
120
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
121
|
none: false
|
136
|
-
requirements:
|
137
|
-
- -
|
138
|
-
- !ruby/object:Gem::Version
|
139
|
-
|
140
|
-
segments:
|
141
|
-
- 0
|
142
|
-
version: "0"
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
143
126
|
requirements: []
|
144
|
-
|
145
127
|
rubyforge_project:
|
146
|
-
rubygems_version: 1.8.
|
128
|
+
rubygems_version: 1.8.25
|
147
129
|
signing_key:
|
148
130
|
specification_version: 3
|
149
131
|
summary: iCalendar (RFC 5545) Ruby library
|
150
132
|
test_files: []
|
151
|
-
|
@@ -1,16 +0,0 @@
|
|
1
|
-
module Icalendar2
|
2
|
-
# See http://tools.ietf.org/html/rfc5545#section-3.6.4
|
3
|
-
class Freebusy < Component::Base
|
4
|
-
VALUE = "VFREEBUSY"
|
5
|
-
|
6
|
-
requires :exactly_one => [:dtstamp, :uid]
|
7
|
-
accepts :exactly_one => [:contact, :dtstart, :dtend, :organizer, :url],
|
8
|
-
:one_or_more => [:attendee, :comment, :freebusy, :rstatus]
|
9
|
-
|
10
|
-
def initialize
|
11
|
-
super
|
12
|
-
self.uid = new_uid
|
13
|
-
self.dtstamp = new_timestamp
|
14
|
-
end
|
15
|
-
end
|
16
|
-
end
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Icalendar2
|
2
|
-
# See http://tools.ietf.org/html/rfc5545#section-3.6.3
|
3
|
-
class Journal < Component::Base
|
4
|
-
VALUE = "VJOURNAL"
|
5
|
-
|
6
|
-
requires :exactly_one => [:dtstamp, :uid]
|
7
|
-
accepts :exactly_one => [:klass, :created, :dtstart, :last_mod, :organizer,
|
8
|
-
:recurid, :seq, :status, :summary, :url],
|
9
|
-
:one_or_more => [:rrule, :attach, :attendee, :categories, :comment,
|
10
|
-
:contact, :description, :exdate, :related_to, :rdate, :rstatus]
|
11
|
-
|
12
|
-
def initialize
|
13
|
-
super
|
14
|
-
self.uid = new_uid
|
15
|
-
self.dtstamp = new_timestamp
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,19 +0,0 @@
|
|
1
|
-
module Icalendar2
|
2
|
-
# See http://tools.ietf.org/html/rfc5545#section-3.6.2
|
3
|
-
class Todo < Component::Base
|
4
|
-
VALUE = "VTODO"
|
5
|
-
|
6
|
-
requires :exactly_one => [:dtstamp, :uid]
|
7
|
-
accepts :exactly_one => [:klass, :completed, :created, :description,
|
8
|
-
:dtstart, :geo, :last_mod, :location, :organizer, :percent, :priority,
|
9
|
-
:recurid, :seq, :status, :summary, :url, :due, :duration],
|
10
|
-
:one_or_more => [:rrule, :attach, :attendee, :categories, :comment,
|
11
|
-
:contact, :exdate, :rstatus, :related_to, :resources, :rdate]
|
12
|
-
|
13
|
-
def initialize
|
14
|
-
super
|
15
|
-
self.uid = new_uid
|
16
|
-
self.dtstamp = new_timestamp
|
17
|
-
end
|
18
|
-
end
|
19
|
-
end
|