sabredav_client 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/sabredav_client/events.rb +8 -1
- data/lib/sabredav_client/version.rb +1 -1
- data/spec/sabredav_client/events_spec.rb +7 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 363ae122753b55ddb7fe3d7897c682f39f86849b
|
4
|
+
data.tar.gz: de214b5738f31a69ece0ec8a7de7aa914031609f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8d4dfdd3e7e5cea5237aafe5063f11ce18d60bbf3477486130b86c5fd2266e538ed471e88889c58c2c407a2e8e6f3b8d076a6826999ca77cac4e6ec9636f8bad
|
7
|
+
data.tar.gz: 3582369abd6dc9117b6c3ab9fdfc5f0c2e7a00082c18443a2da060c2bd39f83f67b643ff134a73068ab5c25e7df5f667446f7fbc4cd09a6e8f48c9f6fdebd420
|
data/Gemfile.lock
CHANGED
@@ -12,7 +12,14 @@ module SabredavClient
|
|
12
12
|
res = req.run
|
13
13
|
|
14
14
|
SabredavClient::Errors::errorhandling(res)
|
15
|
-
|
15
|
+
|
16
|
+
etag = res.header["etag"]
|
17
|
+
etag = %Q/#{etag.gsub(/\A['"]+|['"]+\Z/, "")}/ unless etag.nil?
|
18
|
+
|
19
|
+
{
|
20
|
+
ics: res.body,
|
21
|
+
etag: etag
|
22
|
+
}
|
16
23
|
end
|
17
24
|
|
18
25
|
def find_multiple(starts: "", ends: "")
|
@@ -54,10 +54,15 @@ describe SabredavClient::Events do
|
|
54
54
|
it "one event" do
|
55
55
|
uid = "47732F70-1793-47B3-80FA-57E3C5ECA0E5"
|
56
56
|
uri = "#{uid}.ics"
|
57
|
-
|
57
|
+
|
58
|
+
etag = "6341a7e8f9a1f775dd07c55b17ff27b7"
|
59
|
+
|
60
|
+
expected_result = {etag: etag, ics: File.open("spec/fixtures/event.ics").read}
|
61
|
+
|
62
|
+
FakeWeb.register_uri(:get, "http://user@localhost:5232/user/calendar/#{uri}", body: File.open("spec/fixtures/event.ics"), etag: etag )
|
58
63
|
r = events.find(uri)
|
59
64
|
|
60
|
-
expect(r).to
|
65
|
+
expect(r).to eq(expected_result)
|
61
66
|
end
|
62
67
|
|
63
68
|
it "two events" do
|
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.
|
4
|
+
version: 0.2.0
|
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-
|
11
|
+
date: 2016-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: builder
|