omnievent-outlook 0.1.0.pre4 → 0.1.0.pre5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 138cb638b2dfc9a9635e20bac17a645095aeac7f419147126fc59683efdd8d67
4
- data.tar.gz: 17492542afa5f360b917e582b80a0e397e0f62f6412fe9a5c28221f6acc62845
3
+ metadata.gz: d854e155be65942ba10f083f8ce99c2b445ce2633dfb3bb86e929b3d11212855
4
+ data.tar.gz: 21d135106721c9afb1cb3eeef7330e246d644211d6c3fef46a3aa265fad5dd85
5
5
  SHA512:
6
- metadata.gz: 9639f0ecc1bfee5f9215e453c0fe123bab75eec7c4d095488ea5b3d007f9c62a09d94be88a450abf6de9a63dda8d20656d10e5e1c2482623e07a672d637559bd
7
- data.tar.gz: d06050e3398e079e39e8b0ccd409e6f35a704ade1c9d87b5f988fa06bff4e1f9d2a50eed8c91c1a89cfcb7da4244cf65aed85a5f18c89cabc32d2882a0e0a88f
6
+ metadata.gz: 258d8096e13f0b452257ff51d6ff67e3a8416f55d2e584cdfa52d93879c3dff3adc112e6c25bf62af227674a9a5f3fe8061add0a67512e848a8f3ab05bf75ae7
7
+ data.tar.gz: 9ba47485eb53d99f8e2a603632e87f6884111ea4c517d7fa6bd5e462c7970eb03f7d04f8908379b1533f7d8e3fcf7a7dcbc286f600012e100b88460204bb24b4
@@ -2,6 +2,6 @@
2
2
 
3
3
  module OmniEvent
4
4
  module Outlook
5
- VERSION = "0.1.0.pre4"
5
+ VERSION = "0.1.0.pre5"
6
6
  end
7
7
  end
@@ -35,10 +35,12 @@ module OmniEvent
35
35
  response = perform_request(
36
36
  method: "POST",
37
37
  path: "#{request_path}/events",
38
- content_type: "application/json",
38
+ headers: {
39
+ "Content-Type": "application/json"
40
+ },
39
41
  body: request_body.to_json
40
42
  )
41
- return false unless response
43
+ return false if !response || response["error"]
42
44
 
43
45
  event = event_hash(response)
44
46
  return false unless event.valid?
@@ -54,10 +56,12 @@ module OmniEvent
54
56
  response = perform_request(
55
57
  method: "PATCH",
56
58
  path: "#{request_path}/events/#{options.event.metadata.uid}",
57
- content_type: "application/json",
59
+ headers: {
60
+ "Content-Type": "application/json"
61
+ },
58
62
  body: request_body.to_json
59
63
  )
60
- return false unless response
64
+ return false if !response || response["error"]
61
65
 
62
66
  event_hash(response)
63
67
  end
@@ -70,7 +74,7 @@ module OmniEvent
70
74
  method: "DELETE",
71
75
  path: "#{request_path}/events/#{options.event.metadata.uid}"
72
76
  )
73
- !!response
77
+ response && !response["error"]
74
78
  end
75
79
 
76
80
  def event_hash(raw_event)
@@ -157,7 +161,7 @@ module OmniEvent
157
161
  # See https://learn.microsoft.com/en-us/graph/api/resources/datetimetimezone?view=graph-rest-1.0
158
162
  def format_omnievent_datetime_for_outlook(datetime)
159
163
  {
160
- "dateTime": DateTime.parse(datetime),
164
+ "dateTime": Time.parse(datetime).utc.iso8601,
161
165
  "timeZone": "UTC"
162
166
  }
163
167
  end
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.pre4
4
+ version: 0.1.0.pre5
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-04 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omnievent