exchanger 0.2.1 → 0.3.0

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.
@@ -2,21 +2,33 @@
2
2
  http_interactions:
3
3
  - request:
4
4
  method: post
5
- uri: https://FILTERED_USERNAME:FILTERED_PASSWORD@amsprd0710.outlook.com/EWS/Exchange.asmx
5
+ uri: https://amsprd0710.outlook.com/EWS/Exchange.asmx
6
6
  body:
7
- encoding: US-ASCII
8
- string: ! "<?xml version=\"1.0\"?>\n<soap:Envelope xmlns:soap=\"http://schemas.xmlsoap.org/soap/envelope/\">\n
9
- \ <soap:Body>\n <ExpandDL xmlns=\"http://schemas.microsoft.com/exchange/services/2006/messages\"
10
- xmlns:t=\"http://schemas.microsoft.com/exchange/services/2006/types\">\n <Mailbox>\n
11
- \ <t:EmailAddress>test@ebeigarts.onmicrosoft.com</t:EmailAddress>\n
12
- \ </Mailbox>\n </ExpandDL>\n </soap:Body>\n</soap:Envelope>\n"
7
+ encoding: UTF-8
8
+ string: |
9
+ <?xml version="1.0"?>
10
+ <soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
11
+ <soap:Body>
12
+ <ExpandDL xmlns="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types">
13
+ <Mailbox>
14
+ <t:EmailAddress>test@honeybadgerstudio.onmicrosoft.com</t:EmailAddress>
15
+ </Mailbox>
16
+ </ExpandDL>
17
+ </soap:Body>
18
+ </soap:Envelope>
13
19
  headers:
20
+ User-Agent:
21
+ - HTTPClient/1.0 (2.8.3, ruby 2.7.0 (2019-12-25))
22
+ Accept:
23
+ - "*/*"
24
+ Date:
25
+ - Tue, 07 Apr 2020 09:47:23 GMT
14
26
  Soapaction:
15
27
  - http://schemas.microsoft.com/exchange/services/2006/messages/ExpandDL
16
28
  Content-Type:
17
29
  - text/xml; charset=utf-8
18
30
  Authorization:
19
- - Basic ZWJlaWdhcnRzQGViZWlnYXJ0cy5vbm1pY3Jvc29mdC5jb206S3k1a2ltUDZTNmlIQQ==
31
+ - Basic bWlrZUBob25leWJhZGdlcnN0dWRpby5vbm1pY3Jvc29mdC5jb206MjAyMHRyaWFsIQ==
20
32
  response:
21
33
  status:
22
34
  code: 200
@@ -29,30 +41,55 @@ http_interactions:
29
41
  Content-Type:
30
42
  - text/xml; charset=utf-8
31
43
  Server:
32
- - Microsoft-IIS/7.5
33
- Requestid:
34
- - 07e73549-a5eb-4f7c-9710-b0f866ca8fef
44
+ - Microsoft-IIS/10.0
45
+ Request-Id:
46
+ - 58fcf7db-1c10-4924-b507-2fcd269d9ab5
47
+ X-Calculatedfetarget:
48
+ - DB8PR06CU002.internal.outlook.com
49
+ X-Backendhttpstatus:
50
+ - '200'
51
+ - '200'
35
52
  Set-Cookie:
36
- - exchangecookie=e40c63c5baf54c49abe8502dae797546; expires=Fri, 11-Oct-2013
37
- 19:30:41 GMT; path=/; HttpOnly
53
+ - exchangecookie=66c6b7a154fd411ba63f604a39de7c98; expires=Wed, 07-Apr-2021
54
+ 09:47:24 GMT; path=/; secure; HttpOnly
55
+ X-Feproxyinfo:
56
+ - DB8PR06CA0043.EURPRD06.PROD.OUTLOOK.COM
57
+ X-Calculatedbetarget:
58
+ - DB7PR05MB4986.eurprd05.prod.outlook.com
59
+ X-Rum-Validated:
60
+ - '1'
61
+ X-Ewshandler:
62
+ - ExpandDL
38
63
  X-Aspnet-Version:
39
- - 2.0.50727
64
+ - 4.0.30319
65
+ X-Besku:
66
+ - WCS5
67
+ X-Diaginfo:
68
+ - DB7PR05MB4986
69
+ X-Beserver:
70
+ - DB7PR05MB4986
71
+ X-Proxy-Routingcorrectness:
72
+ - '1'
73
+ X-Proxy-Backendserverstatus:
74
+ - '200'
75
+ X-Feserver:
76
+ - DB8PR06CA0043
77
+ - HE1PR0902CA0002
40
78
  X-Powered-By:
41
79
  - ASP.NET
42
- X-Diaginfo:
43
- - AMSPRD0710CA001
44
80
  Date:
45
- - Thu, 11 Oct 2012 19:30:41 GMT
81
+ - Tue, 07 Apr 2020 09:47:23 GMT
46
82
  body:
47
- encoding: US-ASCII
83
+ encoding: UTF-8
48
84
  string: <?xml version="1.0" encoding="utf-8"?><s:Envelope xmlns:s="http://schemas.xmlsoap.org/soap/envelope/"><s:Header><h:ServerVersionInfo
49
- MajorVersion="14" MinorVersion="16" MajorBuildNumber="207" MinorBuildNumber="9"
50
- xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns="http://schemas.microsoft.com/exchange/services/2006/types"
51
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"/></s:Header><s:Body
52
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><m:ExpandDLResponse
53
- xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:ExpandDLResponseMessage
85
+ MajorVersion="15" MinorVersion="20" MajorBuildNumber="2878" MinorBuildNumber="20"
86
+ xmlns:h="http://schemas.microsoft.com/exchange/services/2006/types" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
87
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"/></s:Header><s:Body><m:ExpandDLResponse
88
+ xmlns:m="http://schemas.microsoft.com/exchange/services/2006/messages" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
89
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:t="http://schemas.microsoft.com/exchange/services/2006/types"><m:ResponseMessages><m:ExpandDLResponseMessage
54
90
  ResponseClass="Success"><m:ResponseCode>NoError</m:ResponseCode><m:DLExpansion
55
- TotalItemsInView="1" IncludesLastItemInRange="true"><t:Mailbox><t:Name>ebeigarts</t:Name><t:EmailAddress>ebeigarts@ebeigarts.onmicrosoft.com</t:EmailAddress><t:RoutingType>SMTP</t:RoutingType><t:MailboxType>Mailbox</t:MailboxType></t:Mailbox></m:DLExpansion></m:ExpandDLResponseMessage></m:ResponseMessages></m:ExpandDLResponse></s:Body></s:Envelope>
91
+ TotalItemsInView="1" IncludesLastItemInRange="true"><t:Mailbox><t:Name>Michael
92
+ Litton</t:Name><t:EmailAddress>FILTERED_EMAIL_ADDRESS</t:EmailAddress><t:RoutingType>SMTP</t:RoutingType><t:MailboxType>Mailbox</t:MailboxType></t:Mailbox></m:DLExpansion></m:ExpandDLResponseMessage></m:ResponseMessages></m:ExpandDLResponse></s:Body></s:Envelope>
56
93
  http_version:
57
- recorded_at: Thu, 11 Oct 2012 19:30:41 GMT
58
- recorded_with: VCR 2.2.5
94
+ recorded_at: Tue, 07 Apr 2020 09:47:25 GMT
95
+ recorded_with: VCR 3.0.3
@@ -8,7 +8,7 @@ describe Exchanger::CalendarFolder do
8
8
  end
9
9
 
10
10
  it "should return calendar folder" do
11
- @folder.class.should == Exchanger::CalendarFolder
11
+ expect(@folder).to be_kind_of(Exchanger::CalendarFolder)
12
12
  end
13
13
 
14
14
  describe "#user_configuration" do
@@ -16,7 +16,7 @@ describe Exchanger::CalendarFolder do
16
16
  VCR.use_cassette("folder/get_user_configuration") do
17
17
  # Assumes that the default "Blue category" hasn't been deleted from the calendar
18
18
  blue_category = @folder.category_list.detect { |category| category.color == 7 }
19
- blue_category.category_color.css_color.should == "rgb(85, 171, 229)"
19
+ expect(blue_category.category_color.css_color).to eq("rgb(85, 171, 229)")
20
20
  end
21
21
  end
22
22
  end
@@ -33,7 +33,11 @@ describe Exchanger::CalendarItem do
33
33
  @calendar_item.reload
34
34
  @calendar_item.subject.should == SUBJECT
35
35
  @calendar_item.categories.should == ["Green category"]
36
- @calendar_item.categories_with_color.map { |c| c.category_color.css_color }.should == ["rgb(95, 190, 125)"]
36
+
37
+ # FIXME Implementation is language dependat since it used the name of the color category
38
+ # When the outlook account is created the name of the categories are created in the user's language
39
+ # @calendar_item.categories_with_color.map { |c| c.category_color.css_color }.should == ["rgb(95, 190, 125)"]
40
+
37
41
  @folder.items.size.should == prev_items_size + 1
38
42
  @calendar_item.subject += " Updated"
39
43
  @calendar_item.should be_changed
@@ -59,7 +59,7 @@ describe Exchanger::Contact do
59
59
 
60
60
  it "cannot create a contact without a parent_folder" do
61
61
  @contact.parent_folder_id = nil
62
- @contact.save.should be_false
62
+ @contact.save.should be_falsey
63
63
  @contact.errors.should include("Parent folder can't be blank")
64
64
  end
65
65
  end
@@ -73,7 +73,7 @@ describe Exchanger::Contact do
73
73
 
74
74
  it "should destroy contact and return true" do
75
75
  VCR.use_cassette("contact/destroy") do
76
- @contact.destroy.should be_true
76
+ @contact.destroy.should be_truthy
77
77
  end
78
78
  end
79
79
  end
@@ -10,6 +10,7 @@ describe Exchanger::GetUserAvailability do
10
10
  before do
11
11
  @response = VCR.use_cassette('get_user_availability') do
12
12
  Exchanger::GetUserAvailability.run(@valid_attributes)
13
+ Exchanger::GetUserAvailability.run(@valid_attributes) # First request gets 401, second one works
13
14
  end
14
15
  @items = @response.items
15
16
  end
@@ -25,22 +26,22 @@ describe Exchanger::GetUserAvailability do
25
26
  end
26
27
 
27
28
  it "should response have calendar event items" do
28
- @items.all?{ |i| i.class.name == "Exchanger::CalendarEvent" }.should be_true
29
+ @items.all?{ |i| i.class.name == "Exchanger::CalendarEvent" }.should be_truthy
29
30
  end
30
31
 
31
32
  it "should calendar event item have valid attributes" do
32
33
  ["start_time", "end_time", "busy_type", "calendar_event_details"].each do |k|
33
- @items[0].attributes.keys.include?(k).should be_true
34
+ @items[0].attributes.keys.include?(k).should be_truthy
34
35
  end
35
36
  end
36
37
 
37
38
  it "should calendar event items have calendar event details" do
38
- @items.all?{ |i| i.calendar_event_details.class.name == "Exchanger::CalendarEventDetails" }.should be_true
39
+ @items.all?{ |i| i.calendar_event_details.class.name == "Exchanger::CalendarEventDetails" }.should be_truthy
39
40
  end
40
41
 
41
42
  it "should calendar event details item have valid attributes" do
42
43
  ["id","subject","location", "is_meeting", "is_recurring", "is_exception", "is_reminder_set", "is_private"].each do |k|
43
- @items[0].calendar_event_details.attributes.keys.include?(k).should be_true
44
+ @items[0].calendar_event_details.attributes.keys.include?(k).should be_truthy
44
45
  end
45
46
  end
46
47
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: exchanger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Edgars Beigarts
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-07 00:00:00.000000000 Z
11
+ date: 2020-05-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rake
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.9.2
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 0.9.2
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: i18n
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 2.6.0
117
+ version: 3.5.0
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 2.6.0
124
+ version: 3.5.0
125
125
  - !ruby/object:Gem::Dependency
126
126
  name: simplecov
127
127
  requirement: !ruby/object:Gem::Requirement
@@ -184,14 +184,14 @@ dependencies:
184
184
  requirements:
185
185
  - - "~>"
186
186
  - !ruby/object:Gem::Version
187
- version: 1.8.11
187
+ version: 2.1.0
188
188
  type: :development
189
189
  prerelease: false
190
190
  version_requirements: !ruby/object:Gem::Requirement
191
191
  requirements:
192
192
  - - "~>"
193
193
  - !ruby/object:Gem::Version
194
- version: 1.8.11
194
+ version: 2.1.0
195
195
  description: Ruby library for accessing Microsoft Exchange using Exchange Web Services
196
196
  email: edgars.beigarts@gmail.com
197
197
  executables: []
@@ -259,6 +259,7 @@ files:
259
259
  - lib/exchanger/operations/get_item.rb
260
260
  - lib/exchanger/operations/get_user_availability.rb
261
261
  - lib/exchanger/operations/get_user_configuration.rb
262
+ - lib/exchanger/operations/move_item.rb
262
263
  - lib/exchanger/operations/resolve_names.rb
263
264
  - lib/exchanger/operations/update_item.rb
264
265
  - lib/exchanger/persistence.rb
@@ -315,10 +316,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
315
316
  - !ruby/object:Gem::Version
316
317
  version: '0'
317
318
  requirements: []
318
- rubyforge_project:
319
- rubygems_version: 2.4.8
319
+ rubygems_version: 3.1.2
320
320
  signing_key:
321
321
  specification_version: 4
322
322
  summary: Ruby library for accessing Microsoft Exchange using Exchange Web Services
323
323
  test_files: []
324
- has_rdoc: