omnievent-outlook 0.1.0.pre3 → 0.1.0.pre4
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/omnievent/outlook/version.rb +1 -1
- data/lib/omnievent/strategies/outlook.rb +20 -25
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 138cb638b2dfc9a9635e20bac17a645095aeac7f419147126fc59683efdd8d67
|
4
|
+
data.tar.gz: 17492542afa5f360b917e582b80a0e397e0f62f6412fe9a5c28221f6acc62845
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9639f0ecc1bfee5f9215e453c0fe123bab75eec7c4d095488ea5b3d007f9c62a09d94be88a450abf6de9a63dda8d20656d10e5e1c2482623e07a672d637559bd
|
7
|
+
data.tar.gz: d06050e3398e079e39e8b0ccd409e6f35a704ade1c9d87b5f988fa06bff4e1f9d2a50eed8c91c1a89cfcb7da4244cf65aed85a5f18c89cabc32d2882a0e0a88f
|
data/Gemfile.lock
CHANGED
@@ -28,13 +28,15 @@ module OmniEvent
|
|
28
28
|
end
|
29
29
|
|
30
30
|
def create_event
|
31
|
-
|
31
|
+
%w[subject start].each do |attr|
|
32
|
+
raise ArgumentError, "Event #{attr} is required." unless request_body[attr]
|
33
|
+
end
|
32
34
|
|
33
35
|
response = perform_request(
|
34
36
|
method: "POST",
|
35
37
|
path: "#{request_path}/events",
|
36
38
|
content_type: "application/json",
|
37
|
-
body:
|
39
|
+
body: request_body.to_json
|
38
40
|
)
|
39
41
|
return false unless response
|
40
42
|
|
@@ -47,15 +49,13 @@ module OmniEvent
|
|
47
49
|
def update_event
|
48
50
|
event_id = options.event.metadata&.uid
|
49
51
|
raise ArgumentError, "Event id is required." unless event_id
|
50
|
-
|
51
|
-
body = update_event_body
|
52
|
-
raise ArgumentError, "Evend data is required." if body.empty?
|
52
|
+
raise ArgumentError, "Event body is required." if request_body.empty?
|
53
53
|
|
54
54
|
response = perform_request(
|
55
55
|
method: "PATCH",
|
56
56
|
path: "#{request_path}/events/#{options.event.metadata.uid}",
|
57
57
|
content_type: "application/json",
|
58
|
-
body:
|
58
|
+
body: request_body.to_json
|
59
59
|
)
|
60
60
|
return false unless response
|
61
61
|
|
@@ -101,26 +101,21 @@ module OmniEvent
|
|
101
101
|
)
|
102
102
|
end
|
103
103
|
|
104
|
-
def
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
117
|
-
body
|
118
|
-
end
|
119
|
-
if options.event.data.start_time
|
120
|
-
body["start"] = format_omnievent_datetime_for_outlook(options.event.data.start_time)
|
104
|
+
def request_body
|
105
|
+
@request_body ||= begin
|
106
|
+
body = {}
|
107
|
+
body["subject"] = options.event.data.name if options.event.data.name
|
108
|
+
if options.event.data.description
|
109
|
+
body["body"] = format_omnievent_description_for_outlook(options.event.data.description)
|
110
|
+
end
|
111
|
+
if options.event.data.start_time
|
112
|
+
body["start"] = format_omnievent_datetime_for_outlook(options.event.data.start_time)
|
113
|
+
end
|
114
|
+
if options.event.data.end_time
|
115
|
+
body["end"] = format_omnievent_datetime_for_outlook(options.event.data.end_time)
|
116
|
+
end
|
117
|
+
body
|
121
118
|
end
|
122
|
-
body["end"] = format_omnievent_datetime_for_outlook(options.event.data.end_time) if options.event.data.end_time
|
123
|
-
body
|
124
119
|
end
|
125
120
|
|
126
121
|
def request_url
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omnievent-outlook
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Angus McLeod
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omnievent
|