sabredav_client 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +3 -3
- data/.rspec +1 -1
- data/CHANGELOG.rdoc +8 -8
- data/Gemfile +3 -3
- data/Gemfile.lock +38 -39
- data/README.md +49 -49
- data/Rakefile +5 -5
- data/lib/sabredav_client.rb +10 -10
- data/lib/sabredav_client/calendar.rb +174 -171
- data/lib/sabredav_client/client.rb +57 -57
- data/lib/sabredav_client/errors/errors.rb +41 -41
- data/lib/sabredav_client/events.rb +106 -106
- data/lib/sabredav_client/net.rb +15 -15
- data/lib/sabredav_client/principal.rb +51 -51
- data/lib/sabredav_client/request.rb +97 -97
- data/lib/sabredav_client/version.rb +3 -3
- data/lib/sabredav_client/xml_request_builder.rb +7 -7
- data/lib/sabredav_client/xml_request_builder/base.rb +17 -17
- data/lib/sabredav_client/xml_request_builder/mkcalendar.rb +25 -25
- data/lib/sabredav_client/xml_request_builder/mkcol_principal.rb +28 -28
- data/lib/sabredav_client/xml_request_builder/post_sharing.rb +41 -41
- data/lib/sabredav_client/xml_request_builder/propfind_calendar.rb +41 -41
- data/lib/sabredav_client/xml_request_builder/propfind_invite.rb +19 -19
- data/lib/sabredav_client/xml_request_builder/propfind_owner.rb +19 -19
- data/lib/sabredav_client/xml_request_builder/proppatch_calendar.rb +25 -25
- data/lib/sabredav_client/xml_request_builder/proppatch_events_owner.rb +23 -23
- data/lib/sabredav_client/xml_request_builder/proppatch_principal.rb +25 -25
- data/lib/sabredav_client/xml_request_builder/report_event_changes.rb +22 -22
- data/lib/sabredav_client/xml_request_builder/report_vevent.rb +30 -30
- data/lib/sabredav_client/xml_request_builder/report_vtodo.rb +20 -20
- data/sabredav_client.gemspec +31 -31
- data/spec/fixtures/calendar_fetch_changes.xml +26 -26
- data/spec/fixtures/calendar_info.xml +14 -14
- data/spec/fixtures/calendar_sharees.xml +35 -35
- data/spec/fixtures/calendar_sharees_without_common_name.xml +26 -26
- data/spec/fixtures/event.ics +23 -23
- data/spec/fixtures/events_find_multiple.xml +51 -51
- data/spec/fixtures/events_owner.xml +12 -12
- data/spec/fixtures/xml_request_builder/mkcalendar.xml +9 -9
- data/spec/fixtures/xml_request_builder/mkcol_principal.xml +12 -12
- data/spec/fixtures/xml_request_builder/post_sharing.xml +18 -18
- data/spec/fixtures/xml_request_builder/propfind_calendar/all_properties.xml +8 -8
- data/spec/fixtures/xml_request_builder/propfind_invite.xml +6 -6
- data/spec/fixtures/xml_request_builder/propfind_owner.xml +6 -6
- data/spec/fixtures/xml_request_builder/proppatch_calendar.xml +9 -9
- data/spec/fixtures/xml_request_builder/proppatch_events_owner.xml +8 -8
- data/spec/fixtures/xml_request_builder/proppatch_principal.xml +9 -9
- data/spec/fixtures/xml_request_builder/report_event_changes.xml +8 -8
- data/spec/sabredav_client/calendar_spec.rb +142 -142
- data/spec/sabredav_client/client_spec.rb +41 -41
- data/spec/sabredav_client/events_spec.rb +119 -119
- data/spec/sabredav_client/principal_spec.rb +51 -51
- data/spec/sabredav_client/request_spec.rb +55 -55
- data/spec/sabredav_client/xml_request_builder_specs/base_spec.rb +30 -30
- data/spec/sabredav_client/xml_request_builder_specs/mkcalendar_spec.rb +13 -13
- data/spec/sabredav_client/xml_request_builder_specs/mkcol_principal_spec.rb +13 -13
- data/spec/sabredav_client/xml_request_builder_specs/post_sharing_spec.rb +15 -15
- data/spec/sabredav_client/xml_request_builder_specs/propfind_calendar_spec.rb +24 -24
- data/spec/sabredav_client/xml_request_builder_specs/propfind_invite_spec.rb +14 -14
- data/spec/sabredav_client/xml_request_builder_specs/propfind_owner_spec.rb +14 -14
- data/spec/sabredav_client/xml_request_builder_specs/proppatch_calendar.rb +15 -15
- data/spec/sabredav_client/xml_request_builder_specs/proppatch_events_owner_spec.rb +14 -14
- data/spec/sabredav_client/xml_request_builder_specs/proppatch_principal_spec.rb +24 -24
- data/spec/sabredav_client/xml_request_builder_specs/report_event_changes_spec.rb +15 -15
- data/spec/spec.opts +4 -4
- data/spec/spec_helper.rb +8 -8
- metadata +6 -5
@@ -1,15 +1,15 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe SabredavClient::XmlRequestBuilder::ProppatchCalendar do
|
4
|
-
|
5
|
-
let(:proppatch) { described_class.new(displayname = "name", description = "description") }
|
6
|
-
|
7
|
-
describe "#to_xml" do
|
8
|
-
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/proppatch_calendar.xml') }
|
9
|
-
|
10
|
-
it "returns a valid xml" do
|
11
|
-
expect(proppatch.to_xml).to eq(expected_xml)
|
12
|
-
end
|
13
|
-
|
14
|
-
end
|
15
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe SabredavClient::XmlRequestBuilder::ProppatchCalendar do
|
4
|
+
|
5
|
+
let(:proppatch) { described_class.new(displayname = "name", description = "description") }
|
6
|
+
|
7
|
+
describe "#to_xml" do
|
8
|
+
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/proppatch_calendar.xml') }
|
9
|
+
|
10
|
+
it "returns a valid xml" do
|
11
|
+
expect(proppatch.to_xml).to eq(expected_xml)
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
end
|
@@ -1,14 +1,14 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe SabredavClient::XmlRequestBuilder::ProppatchEventsOwner do
|
4
|
-
|
5
|
-
let(:proppatch) { described_class.new(owner = "principals/usertest") }
|
6
|
-
|
7
|
-
describe "#to_xml" do
|
8
|
-
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/proppatch_events_owner.xml') }
|
9
|
-
|
10
|
-
it "returns a valid xml" do
|
11
|
-
expect(proppatch.to_xml).to eq(expected_xml)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe SabredavClient::XmlRequestBuilder::ProppatchEventsOwner do
|
4
|
+
|
5
|
+
let(:proppatch) { described_class.new(owner = "principals/usertest") }
|
6
|
+
|
7
|
+
describe "#to_xml" do
|
8
|
+
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/proppatch_events_owner.xml') }
|
9
|
+
|
10
|
+
it "returns a valid xml" do
|
11
|
+
expect(proppatch.to_xml).to eq(expected_xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -1,24 +1,24 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
RSpec.describe SabredavClient::XmlRequestBuilder::ProppatchPrincipal do
|
4
|
-
|
5
|
-
let(:proppatch) { described_class.new(email = "update@test.de", diplayname = "David B." ) }
|
6
|
-
|
7
|
-
describe "#to_xml" do
|
8
|
-
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/proppatch_principal.xml') }
|
9
|
-
|
10
|
-
it "returns a valid xml" do
|
11
|
-
expect(proppatch.to_xml).to eq(expected_xml)
|
12
|
-
end
|
13
|
-
|
14
|
-
it "returns a valid xml without email address" do
|
15
|
-
proppatch.email = ""
|
16
|
-
expect(proppatch.to_xml).not_to include("sb:email-address")
|
17
|
-
end
|
18
|
-
|
19
|
-
it "returns a valid xml without displayname" do
|
20
|
-
proppatch.displayname = ""
|
21
|
-
expect(proppatch.to_xml).not_to include("d:displayname")
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
RSpec.describe SabredavClient::XmlRequestBuilder::ProppatchPrincipal do
|
4
|
+
|
5
|
+
let(:proppatch) { described_class.new(email = "update@test.de", diplayname = "David B." ) }
|
6
|
+
|
7
|
+
describe "#to_xml" do
|
8
|
+
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/proppatch_principal.xml') }
|
9
|
+
|
10
|
+
it "returns a valid xml" do
|
11
|
+
expect(proppatch.to_xml).to eq(expected_xml)
|
12
|
+
end
|
13
|
+
|
14
|
+
it "returns a valid xml without email address" do
|
15
|
+
proppatch.email = ""
|
16
|
+
expect(proppatch.to_xml).not_to include("sb:email-address")
|
17
|
+
end
|
18
|
+
|
19
|
+
it "returns a valid xml without displayname" do
|
20
|
+
proppatch.displayname = ""
|
21
|
+
expect(proppatch.to_xml).not_to include("d:displayname")
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -1,15 +1,15 @@
|
|
1
|
-
require 'spec_helper'
|
2
|
-
|
3
|
-
describe SabredavClient::XmlRequestBuilder::ReportEventChanges do
|
4
|
-
|
5
|
-
let(:report) { described_class.new(sync_token = "token-1234") }
|
6
|
-
|
7
|
-
describe "#to_xml" do
|
8
|
-
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/report_event_changes.xml') }
|
9
|
-
|
10
|
-
it "returns a valid xml with displayname" do
|
11
|
-
expect(report.to_xml).to eq(expected_xml)
|
12
|
-
end
|
13
|
-
end
|
14
|
-
|
15
|
-
end
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe SabredavClient::XmlRequestBuilder::ReportEventChanges do
|
4
|
+
|
5
|
+
let(:report) { described_class.new(sync_token = "token-1234") }
|
6
|
+
|
7
|
+
describe "#to_xml" do
|
8
|
+
let(:expected_xml) { File.read('spec/fixtures/xml_request_builder/report_event_changes.xml') }
|
9
|
+
|
10
|
+
it "returns a valid xml with displayname" do
|
11
|
+
expect(report.to_xml).to eq(expected_xml)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
end
|
data/spec/spec.opts
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
--colour
|
2
|
-
--format
|
3
|
-
progress
|
4
|
-
--loadby
|
1
|
+
--colour
|
2
|
+
--format
|
3
|
+
progress
|
4
|
+
--loadby
|
5
5
|
mtime
|
data/spec/spec_helper.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'rspec'
|
2
|
-
require 'rubygems'
|
3
|
-
require 'sabredav_client'
|
4
|
-
require 'fakeweb'
|
5
|
-
|
6
|
-
RSpec.configure do |config|
|
7
|
-
FakeWeb.allow_net_connect = false
|
8
|
-
end
|
1
|
+
require 'rspec'
|
2
|
+
require 'rubygems'
|
3
|
+
require 'sabredav_client'
|
4
|
+
require 'fakeweb'
|
5
|
+
|
6
|
+
RSpec.configure do |config|
|
7
|
+
FakeWeb.allow_net_connect = false
|
8
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sabredav_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nicolas Schwartau
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|
@@ -66,8 +66,8 @@ dependencies:
|
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '1.3'
|
69
|
-
description:
|
70
|
-
|
69
|
+
description: " sabredav_client is a great Ruby client for SabreDAV servers. It is
|
70
|
+
based on the agcaldav gem.\n"
|
71
71
|
email:
|
72
72
|
- n.schwartau@gmail.com
|
73
73
|
executables: []
|
@@ -160,8 +160,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
requirements: []
|
162
162
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.
|
163
|
+
rubygems_version: 2.5.1
|
164
164
|
signing_key:
|
165
165
|
specification_version: 4
|
166
166
|
summary: Ruby SabreDAV client
|
167
167
|
test_files: []
|
168
|
+
has_rdoc:
|