Skip to content

Commit

Permalink
Fix REST pagination URL
Browse files Browse the repository at this point in the history
  • Loading branch information
lpradovera committed Aug 20, 2019
1 parent 0da31a0 commit c9d43e3
Show file tree
Hide file tree
Showing 16 changed files with 33 additions and 32 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ This project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.htm
## [Unreleased]
### Fixed
- Restore the correct parameter for the REST client space URL
- Fix REST pagination URL
### Changed
- SDK now uses `signalwire.receive` to set up contexts

Expand Down
2 changes: 1 addition & 1 deletion lib/signalwire/sdk/twilio_set_fax.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ def initialize(twilio)
'SignalWire Space URL is not configured. Enter your SignalWire Space domain via the '\
'SIGNALWIRE_HOST environment variable, or hostname in the configuration.')

@base_url = "https://#{@host}/api/laml"
@base_url = "https://#{@host}"
@port = 443

# Versions
Expand Down
2 changes: 1 addition & 1 deletion lib/signalwire/sdk/twilio_set_host.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ def initialize(twilio)
'SIGNALWIRE_HOST or SIGNALWIRE_API_HOSTNAME environment variables, '\
'or hostname in the configuration.')

@base_url = "https://#{@host}/api/laml"
@base_url = "https://#{@host}"
@port = 443

# Versions
Expand Down
2 changes: 1 addition & 1 deletion spec/signalwire/rest/client_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ module Signalwire
@client = Signalwire::REST::Client.new 'MYSWPROJECT',
'MYSWTOKEN'

stub = stub_request(:post, 'https://myswspace.signalwire.com/api/laml/2010-04-01/Accounts/MYSWPROJECT/Messages.json')
stub = stub_request(:post, 'https://myswspace.signalwire.com/2010-04-01/Accounts/MYSWPROJECT/Messages.json')
.with(body: { 'Body' => 'This is a message from the Signalwire-Ruby library!',
'From' => '+15556677999', 'To' => '+15558866555' })

Expand Down
2 changes: 1 addition & 1 deletion spec/signalwire/rest/integration_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
VCR.use_cassette('get_fax_media_instance') do
fax_media = @client.fax.faxes('831455c6-574e-4d8b-b6ee-2418140bf4cd').media('aff0684c-3445-49bc-802b-3a0a488139f5').fetch
expect(fax_media.content_type).to eq 'image/tiff'
expect(fax_media.url).to eq '/api/laml/2010-04-01/Accounts/xyz123-xyz123-xyz123/Faxes/831455c6-574e-4d8b-b6ee-2418140bf4cd/Media/aff0684c-3445-49bc-802b-3a0a488139f5.json'
expect(fax_media.url).to eq '/2010-04-01/Accounts/xyz123-xyz123-xyz123/Faxes/831455c6-574e-4d8b-b6ee-2418140bf4cd/Media/aff0684c-3445-49bc-802b-3a0a488139f5.json'
end
end
end
Expand Down
6 changes: 3 additions & 3 deletions spec/vcr_cassettes/accounts.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions spec/vcr_cassettes/applications.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/vcr_cassettes/get_fax.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions spec/vcr_cassettes/get_fax_media_instance.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions spec/vcr_cassettes/get_fax_media_list.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit c9d43e3

Please sign in to comment.