Skip to content

Commit

Permalink
Merge pull request #228 from plivo/farady-upgrade-v1
Browse files Browse the repository at this point in the history
farady version upgrade
  • Loading branch information
narayana-plivo authored Sep 15, 2023
2 parents 730507a + dab7fa2 commit cf5a719
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/unitTests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
ruby-version: [ '2.4', '2.5', '2.6' ,'2.7', '3.0' ]
ruby-version: [ '2.6' ,'2.7', '3.0' ]

steps:
- name: Checkout
Expand Down
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# Change Log
## [4.49.0](https://github.com/plivo/plivo-ruby/tree/v4.49.0) (2023-09-13)
**Removing the faraday_middleware dependency and upgrade to farady latest version

## [4.48.0](https://github.com/plivo/plivo-ruby/tree/v4.48.0) (2023-08-25)
**Feature - Added New Param 'carrier_fees', 'carrier_fees_rate', 'destination_network' in Get Message and List Message APIs**
- Added new params on message get and list response
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Plivo Ruby SDK makes it simpler to integrate communications into your Ruby a
Add this line to your application's Gemfile:

```ruby
gem 'plivo', '>= 4.48.0'
gem 'plivo', '>= 4.49.0'
```

And then execute:
Expand Down
15 changes: 7 additions & 8 deletions lib/plivo/base_client.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'json'
require 'faraday'
require 'faraday_middleware'

require_relative 'exceptions'
require_relative 'utils'
Expand Down Expand Up @@ -137,7 +136,7 @@ def configure_connection
# DANGER: Basic auth should always come after headers, else
# The headers will replace the basic_auth

faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand All @@ -150,7 +149,7 @@ def configure_connection
# DANGER: Basic auth should always come after headers, else
# The headers will replace the basic_auth

faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand All @@ -163,7 +162,7 @@ def configure_connection
# DANGER: Basic auth should always come after headers, else
# The headers will replace the basic_auth

faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand All @@ -176,7 +175,7 @@ def configure_connection
# DANGER: Basic auth should always come after headers, else
# The headers will replace the basic_auth

faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand All @@ -189,7 +188,7 @@ def configure_connection
# DANGER: Basic auth should always come after headers, else
# The headers will replace the basic_auth

faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand All @@ -202,7 +201,7 @@ def configure_connection
# DANGER: Basic auth should always come after headers, else
# The headers will replace the basic_auth

faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand Down Expand Up @@ -255,7 +254,7 @@ def send_post(resource_path, data, timeout, use_multipart_conn, options = nil)

faraday.request :multipart
faraday.request :url_encoded
faraday.request(:basic_auth, auth_id, auth_token)
faraday.headers['Authorization'] = "Basic #{Base64.strict_encode64("#{auth_id}:#{auth_token}")}"

faraday.proxy=@proxy_hash if @proxy_hash
faraday.response :json, content_type: /\bjson$/
Expand Down
1 change: 0 additions & 1 deletion lib/plivo/resources/call_feedback.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require 'json'
require 'faraday'
require 'faraday_middleware'

module Plivo
module Resources
Expand Down
2 changes: 1 addition & 1 deletion lib/plivo/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Plivo
VERSION = "4.48.0".freeze
VERSION = "4.49.0".freeze
end
3 changes: 1 addition & 2 deletions plivo.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,7 @@ Gem::Specification.new do |spec|

spec.required_ruby_version = '>= 2.0.0'

spec.add_dependency 'faraday', '~> 1.0'
spec.add_dependency 'faraday_middleware', '~> 1.0'
spec.add_dependency 'faraday', '~> 2.7'
spec.add_dependency 'htmlentities'
spec.add_dependency 'jwt'

Expand Down

0 comments on commit cf5a719

Please sign in to comment.