actic 0.0.2.1.1 → 0.0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/app/models/component.rb +13 -17
- data/lib/app/models/pattern.rb +2 -2
- metadata +5 -6
data/lib/app/models/component.rb
CHANGED
@@ -4,19 +4,15 @@ class Component < ActiveRecord::Base
|
|
4
4
|
|
5
5
|
def set_component
|
6
6
|
@component = self.ical if (self.ical != nil)
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
@component ||= RiCal.Alarm
|
17
|
-
elsif self.is_a? FreeBusy
|
18
|
-
@component ||= RiCal.Freebusy
|
19
|
-
end
|
7
|
+
|
8
|
+
[[Calendar, RiCal.Calendar], [Event, RiCal.Event], [Todo, RiCal.Todo],
|
9
|
+
[Journal, RiCal.Journal], [Alarm, RiCal.Alarm], [FreeBusy, RiCal.Freebusy]].each {|comp|
|
10
|
+
|
11
|
+
if self.is_a? comp[0]
|
12
|
+
@component ||= comp[1]
|
13
|
+
break
|
14
|
+
end
|
15
|
+
}
|
20
16
|
self.ical = @component.to_rfc2445_string if self.ical.nil?
|
21
17
|
@component
|
22
18
|
end
|
@@ -24,13 +20,13 @@ class Component < ActiveRecord::Base
|
|
24
20
|
def add_component(sub_component)
|
25
21
|
if sub_component.is_a? Event
|
26
22
|
self.component.events << sub_component.component
|
27
|
-
elsif
|
23
|
+
elsif sub_component.is_a? Todo
|
28
24
|
self.component.todos << sub_component.component
|
29
|
-
elsif
|
25
|
+
elsif sub_component.is_a? Journal
|
30
26
|
self.component.journals << sub_component.component
|
31
|
-
elsif
|
27
|
+
elsif sub_component.is_a? Alarm
|
32
28
|
self.component.alarms << sub_component.component
|
33
|
-
elsif
|
29
|
+
elsif sub_component.is_a? FreeBusy
|
34
30
|
self.component.freebusys << sub_component.component
|
35
31
|
end
|
36
32
|
self.ical = self.component.to_rfc2445_string
|
data/lib/app/models/pattern.rb
CHANGED
metadata
CHANGED
@@ -6,9 +6,8 @@ version: !ruby/object:Gem::Version
|
|
6
6
|
- 0
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
|
11
|
-
version: 0.0.2.1.1
|
9
|
+
- 2
|
10
|
+
version: 0.0.2.2
|
12
11
|
platform: ruby
|
13
12
|
authors: []
|
14
13
|
|
@@ -47,7 +46,7 @@ dependencies:
|
|
47
46
|
type: :runtime
|
48
47
|
prerelease: false
|
49
48
|
version_requirements: *id002
|
50
|
-
description: Actic is a calendaring engine for Rails3, it combines an iCal with ORM
|
49
|
+
description: Actic is a calendaring engine for Rails3, it combines an iCal interface with ORM. It acts as a wrapper around the RiCal library
|
51
50
|
email:
|
52
51
|
executables: []
|
53
52
|
|
@@ -91,7 +90,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
91
90
|
requirements:
|
92
91
|
- - ">="
|
93
92
|
- !ruby/object:Gem::Version
|
94
|
-
hash:
|
93
|
+
hash: 4058765439295397492
|
95
94
|
segments:
|
96
95
|
- 0
|
97
96
|
version: "0"
|
@@ -100,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
100
99
|
requirements:
|
101
100
|
- - ">="
|
102
101
|
- !ruby/object:Gem::Version
|
103
|
-
hash:
|
102
|
+
hash: 4058765439295397492
|
104
103
|
segments:
|
105
104
|
- 0
|
106
105
|
version: "0"
|