Added files

This commit is contained in:
Toastie 2024-11-23 17:10:41 +13:00
parent 83d506bf90
commit 61c006118a
Signed by: toastie_t0ast
GPG key ID: 27F3B6855AFD40A4
15 changed files with 166 additions and 36 deletions

View file

@ -1,11 +0,0 @@
#!/usr/bin/env ruby
# frozen_string_literal: true
require "bundler/setup"
require "autodiscover"
# You can add fixtures and/or initialization code here to make experimenting
# with your gem easier. You can also use a different console, if you like.
require "irb"
IRB.start(__FILE__)

View file

@ -1,8 +0,0 @@
#!/usr/bin/env bash
set -euo pipefail
IFS=$'\n\t'
set -vx
bundle install
# Do any other automated setup that you need to do here

View file

@ -0,0 +1,4 @@
# frozen_string_literal: true
class Client
end

View file

@ -0,0 +1,2 @@
# frozen_string_literal: true

View file

View file

@ -0,0 +1,4 @@
# frozen_string_literal: true
module PoxRequest
end

View file

@ -0,0 +1,4 @@
# frozen_string_literal: true
class PoxResponse
end

View file

@ -0,0 +1,4 @@
# frozen_string_literal: true
class ServerVersionParser
end

View file

@ -1,4 +0,0 @@
module Autodiscover
VERSION: String
# See the writing guide of rbs: https://github.com/ruby/rbs#guides
end

93
test/fixtures/pox_response.xml vendored Normal file
View file

@ -0,0 +1,93 @@
<?xml version="1.0" encoding="utf-8"?>
<Autodiscover xmlns="http://schemas.microsoft.com/exchange/autodiscover/responseschema/2006">
<Response xmlns="http://schemas.microsoft.com/exchange/autodiscover/outlook/responseschema/2006a">
<User>
<DisplayName>Bill Lumbergh</DisplayName>
<LegacyDN>/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Recipients/cn=asdfasdfasdfasdfasdfadf-Bill Lumb</LegacyDN>
<AutoDiscoverSMTPAddress>blumbergh@initech.local</AutoDiscoverSMTPAddress>
<DeploymentId>33333333-3333-3333-3333-3333333333333</DeploymentId>
</User>
<Account>
<AccountType>email</AccountType>
<Action>settings</Action>
<MicrosoftOnline>True</MicrosoftOnline>
<Protocol>
<Type>EXCH</Type>
<Server>22222222-2222-2222-2222-222222222222@initech.local</Server>
<ServerDN>/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=22222222-2222-2222-2222-222222222222@initech.local</ServerDN>
<ServerVersion>73C1809A</ServerVersion>
<MdbDN>/o=ExchangeLabs/ou=Exchange Administrative Group (FYDIBOHF23SPDLT)/cn=Configuration/cn=Servers/cn=22222222-2222-2222-2222-222222222222@initech.local/cn=Microsoft Private MDB</MdbDN>
<PublicFolderServer>outlook.office365.com</PublicFolderServer>
<AuthPackage>Anonymous</AuthPackage>
<ASUrl>https://outlook.office365.com/EWS/Exchange.asmx</ASUrl>
<EwsUrl>https://outlook.office365.com/EWS/Exchange.asmx</EwsUrl>
<EmwsUrl>https://outlook.office365.com/EWS/Exchange.asmx</EmwsUrl>
<SharingUrl>https://outlook.office365.com/EWS/Exchange.asmx</SharingUrl>
<EcpUrl>https://outlook.office365.com/ecp/</EcpUrl>
<EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-um>
<EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-aggr>
<EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=initech.local</EcpUrl-mt>
<EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-ret>
<EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-sms>
<EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=initech.local</EcpUrl-publish>
<EcpUrl-photo>PersonalSettings/EditAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-photo>
<EcpUrl-connect>Connect/Main.aspx?rfr=olk&amp;exsvurl=1&amp;Provider=&lt;Provider&gt;&amp;Action=&lt;Action&gt;&amp;realm=initech.local</EcpUrl-connect>
<EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-tm>
<EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;Title=&lt;Title&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-tmCreating>
<EcpUrl-tmEditing>?rfr=olk&amp;ftr=TeamMailboxEditing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-tmEditing>
<EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-extinstall>
<OOFUrl>https://outlook.office365.com/EWS/Exchange.asmx</OOFUrl>
<UMUrl>https://outlook.office365.com/EWS/UM2007Legacy.asmx</UMUrl>
<OABUrl>https://outlook.office365.com/OAB/99999999-9999-9999-9999-999999999999/</OABUrl>
<ServerExclusiveConnect>off</ServerExclusiveConnect>
</Protocol>
<Protocol>
<Type>EXPR</Type>
<Server>outlook.office365.com</Server>
<SSL>On</SSL>
<AuthPackage>Basic</AuthPackage>
<ASUrl>https://outlook.office365.com/EWS/Exchange.asmx</ASUrl>
<EwsUrl>https://outlook.office365.com/EWS/Exchange.asmx</EwsUrl>
<EmwsUrl>https://outlook.office365.com/EWS/Exchange.asmx</EmwsUrl>
<SharingUrl>https://outlook.office365.com/EWS/Exchange.asmx</SharingUrl>
<EcpUrl>https://outlook.office365.com/ecp/</EcpUrl>
<EcpUrl-um>?rfr=olk&amp;p=customize/voicemail.aspx&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-um>
<EcpUrl-aggr>?rfr=olk&amp;p=personalsettings/EmailSubscriptions.slab&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-aggr>
<EcpUrl-mt>PersonalSettings/DeliveryReport.aspx?rfr=olk&amp;exsvurl=1&amp;IsOWA=&lt;IsOWA&gt;&amp;MsgID=&lt;MsgID&gt;&amp;Mbx=&lt;Mbx&gt;&amp;realm=initech.local</EcpUrl-mt>
<EcpUrl-ret>?rfr=olk&amp;p=organize/retentionpolicytags.slab&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-ret>
<EcpUrl-sms>?rfr=olk&amp;p=sms/textmessaging.slab&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-sms>
<EcpUrl-publish>customize/calendarpublishing.slab?rfr=olk&amp;exsvurl=1&amp;FldID=&lt;FldID&gt;&amp;realm=initech.local</EcpUrl-publish>
<EcpUrl-photo>PersonalSettings/EditAccount.aspx?rfr=olk&amp;chgPhoto=1&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-photo>
<EcpUrl-connect>Connect/Main.aspx?rfr=olk&amp;exsvurl=1&amp;Provider=&lt;Provider&gt;&amp;Action=&lt;Action&gt;&amp;realm=initech.local</EcpUrl-connect>
<EcpUrl-tm>?rfr=olk&amp;ftr=TeamMailbox&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-tm>
<EcpUrl-tmCreating>?rfr=olk&amp;ftr=TeamMailboxCreating&amp;SPUrl=&lt;SPUrl&gt;&amp;Title=&lt;Title&gt;&amp;SPTMAppUrl=&lt;SPTMAppUrl&gt;&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-tmCreating>
<EcpUrl-tmEditing>?rfr=olk&amp;ftr=TeamMailboxEditing&amp;Id=&lt;Id&gt;&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-tmEditing>
<EcpUrl-extinstall>Extension/InstalledExtensions.slab?rfr=olk&amp;exsvurl=1&amp;realm=initech.local</EcpUrl-extinstall>
<OOFUrl>https://outlook.office365.com/EWS/Exchange.asmx</OOFUrl>
<UMUrl>https://outlook.office365.com/EWS/UM2007Legacy.asmx</UMUrl>
<OABUrl>https://outlook.office365.com/OAB/99999999-9999-9999-9999-999999999999/</OABUrl>
<ServerExclusiveConnect>on</ServerExclusiveConnect>
<CertPrincipalName>msstd:outlook.com</CertPrincipalName>
<EwsPartnerUrl>https://outlook.office365.com/EWS/Exchange.asmx</EwsPartnerUrl>
<GroupingInformation>ZC4PR14</GroupingInformation>
</Protocol>
<Protocol>
<Type>WEB</Type>
<Internal>
<OWAUrl AuthenticationMethod="LiveIdFba, OAuth">https://outlook.office365.com/owa/</OWAUrl>
<Protocol>
<Type>EXCH</Type>
<ASUrl>https://outlook.office365.com/EWS/Exchange.asmx</ASUrl>
</Protocol>
</Internal>
<External>
<OWAUrl AuthenticationMethod="Fba">https://outlook.office365.com/owa/initech.local/</OWAUrl>
<Protocol>
<Type>EXPR</Type>
<ASUrl>https://outlook.office365.com/EWS/Exchange.asmx</ASUrl>
</Protocol>
</External>
</Protocol>
</Account>
</Response>
</Autodiscover>

View file

@ -1,13 +0,0 @@
# frozen_string_literal: true
require "test_helper"
class TestAutodiscover < Minitest::Test
def test_that_it_has_a_version_number
refute_nil ::Autodiscover::VERSION
end
def test_it_does_something_useful
assert false
end
end

17
test/units/client_test.rb Normal file
View file

@ -0,0 +1,17 @@
# frozen_string_literal: true
require 'minitest/autorun'
class ClientTest < Minitest::Test
def setup
# Do nothing
end
def teardown
# Do nothing
end
def test
skip 'Not implemented'
end
end

View file

@ -0,0 +1,4 @@
# frozen_string_literal: true
class PoxRequestTest
end

View file

@ -0,0 +1,17 @@
# frozen_string_literal: true
require 'minitest/autorun'
class PoxResponseTest < Minitest::Test
def setup
# Do nothing
end
def teardown
# Do nothing
end
def test
skip 'Not implemented'
end
end

View file

@ -0,0 +1,17 @@
# frozen_string_literal: true
require 'minitest/autorun'
class ServerVersionParserTest < Minitest::Test
def setup
# Do nothing
end
def teardown
# Do nothing
end
def test
skip 'Not implemented'
end
end