ical_importer 0.0.13 → 0.0.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/Gemfile.lock
CHANGED
@@ -2,10 +2,8 @@ module IcalImporter
|
|
2
2
|
class DateExclusion
|
3
3
|
attr_accessor :date_exclusion
|
4
4
|
|
5
|
-
def initialize(
|
6
|
-
|
7
|
-
instance_variable_set "@#{name}", value if [:date_exclusion].include? name.to_sym
|
8
|
-
end
|
5
|
+
def initialize(date)
|
6
|
+
@date_exclusion = date
|
9
7
|
end
|
10
8
|
end
|
11
9
|
end
|
@@ -30,7 +30,7 @@ module IcalImporter
|
|
30
30
|
:location => remote_event.location || '',
|
31
31
|
:start_date_time => remote_event.start_date_time,
|
32
32
|
:end_date_time => remote_event.end_date_time,
|
33
|
-
:date_exclusions => [DateExclusion.new(
|
33
|
+
:date_exclusions => [DateExclusion.new(remote_event.recurrence_id)],
|
34
34
|
:recurrence_id => remote_event.recurrence_id,
|
35
35
|
:recurrence => true
|
36
36
|
})
|
@@ -57,7 +57,7 @@ module IcalImporter
|
|
57
57
|
|
58
58
|
def set_date_exclusion
|
59
59
|
# set any date exclusions
|
60
|
-
@local_event.date_exclusions = @event.exdate.flatten.map{|d| DateExclusion.new(
|
60
|
+
@local_event.date_exclusions = @event.exdate.flatten.map{|d| DateExclusion.new(d)}
|
61
61
|
end
|
62
62
|
|
63
63
|
def frequency_set
|
@@ -1,30 +1,22 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
module IcalImporter
|
3
3
|
describe DateExclusion do
|
4
|
-
subject { DateExclusion.new(
|
4
|
+
subject { DateExclusion.new(date) }
|
5
5
|
describe "#initialize" do
|
6
6
|
describe "set the one valid attribute" do
|
7
|
-
let(:
|
7
|
+
let(:date) { "yerp" }
|
8
8
|
it "sets the date exlcusion" do
|
9
9
|
subject.date_exclusion.should == "yerp"
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
13
|
describe "try to set valid/invalid attributes" do
|
14
|
-
let(:
|
14
|
+
let(:date) { "yerp" }
|
15
15
|
it "sets the date exlcusion" do
|
16
16
|
subject.date_exclusion.should == "yerp"
|
17
17
|
expect { subject.not_me }.to raise_error(NoMethodError)
|
18
18
|
end
|
19
19
|
end
|
20
|
-
|
21
|
-
describe "set the one valid attribute" do
|
22
|
-
let(:attributes) { { :not_me => "yerp", :or_me => "nope" } }
|
23
|
-
it "sets the date exlcusion" do
|
24
|
-
expect { subject.not_me }.to raise_error(NoMethodError)
|
25
|
-
expect { subject.or_me }.to raise_error(NoMethodError)
|
26
|
-
end
|
27
|
-
end
|
28
20
|
end
|
29
21
|
end
|
30
22
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ical_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-08-
|
12
|
+
date: 2012-08-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -158,7 +158,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
158
|
version: '0'
|
159
159
|
segments:
|
160
160
|
- 0
|
161
|
-
hash:
|
161
|
+
hash: -3814022261725594651
|
162
162
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
163
163
|
none: false
|
164
164
|
requirements:
|
@@ -167,7 +167,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
segments:
|
169
169
|
- 0
|
170
|
-
hash:
|
170
|
+
hash: -3814022261725594651
|
171
171
|
requirements: []
|
172
172
|
rubyforge_project:
|
173
173
|
rubygems_version: 1.8.24
|