From 07f76898ddee14b6407774093e6121a340629ba1 Mon Sep 17 00:00:00 2001 From: Alan Ho Date: Wed, 1 Feb 2023 20:12:53 -0800 Subject: [PATCH] modernize gem dependencies Summary: update few gem to more updated versions. fixed missing require issue after using more updated faraday gem Reviewed By: stcheng Differential Revision: D42781435 fbshipit-source-id: 86d8059e23558d10227b434c3b38c70f1eb669d1 --- .github/workflows/ci.yml | 2 +- Gemfile.lock | 99 +++++++++++++++-------------- facebookbusiness.gemspec | 7 +- lib/facebook_ads/videos/video_io.rb | 2 + 4 files changed, 60 insertions(+), 50 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index dcaae7d4..45d2c62d 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -7,7 +7,7 @@ jobs: strategy: matrix: operating-system: [ubuntu-latest] - version: [2.5, 2.6, 2.7, '3.0'] + version: ['3.0'] steps: - name: Checkout uses: actions/checkout@v2 diff --git a/Gemfile.lock b/Gemfile.lock index e6091e9f..66063ce5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,87 +1,94 @@ PATH remote: . specs: - facebookbusiness (0.9.0.1) + facebookbusiness (0.15.0.2) concurrent-ruby (~> 1.1) countries (~> 3.0) - faraday (~> 1.0) - json (~> 2.2) + faraday (~> 2.6) + faraday-multipart (~> 1.0) + json (~> 2.6) money (~> 6.13) GEM remote: https://rubygems.org/ specs: - ast (2.4.1) - awesome_print (1.8.0) + ast (2.4.2) + awesome_print (1.9.2) byebug (11.1.3) coderay (1.1.3) - concurrent-ruby (1.1.7) + concurrent-ruby (1.2.0) coolline (0.5.0) unicode_utils (~> 1.4) - countries (3.0.1) - i18n_data (~> 0.10.0) + countries (3.1.0) + i18n_data (~> 0.11.0) sixarm_ruby_unaccent (~> 1.1) unicode_utils (~> 1.4) - diff-lcs (1.4.4) - dotenv (2.7.6) - faraday (1.0.1) - multipart-post (>= 1.2, < 3) - i18n (1.8.5) + diff-lcs (1.5.0) + dotenv (2.8.1) + faraday (2.7.4) + faraday-net_http (>= 2.0, < 3.1) + ruby2_keywords (>= 0.0.4) + faraday-multipart (1.0.4) + multipart-post (~> 2) + faraday-net_http (3.0.2) + i18n (1.12.0) concurrent-ruby (~> 1.0) - i18n_data (0.10.0) - json (2.3.1) + i18n_data (0.11.0) + json (2.6.3) method_source (1.0.0) minitest (5.14.4) - money (6.13.8) + money (6.16.0) i18n (>= 0.6.4, <= 2) - multipart-post (2.1.1) - parallel (1.19.2) - parser (2.7.1.4) + multipart-post (2.3.0) + parallel (1.22.1) + parser (3.2.0.0) ast (~> 2.4.1) - pry (0.13.1) + pry (0.14.2) coderay (~> 1.1) method_source (~> 1.0) - pry-coolline (0.2.5) + pry-coolline (0.2.6) coolline (~> 0.5) - rainbow (3.0.0) - rake (13.0.1) - regexp_parser (1.7.1) + pry (~> 0.13) + rainbow (3.1.1) + rake (13.0.6) + regexp_parser (2.6.2) rexml (3.2.5) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.0) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.2) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.12.0) + rspec-mocks (3.12.3) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) - rubocop (0.89.1) + rspec-support (~> 3.12.0) + rspec-support (3.12.0) + rubocop (0.93.1) parallel (~> 1.10) - parser (>= 2.7.1.1) + parser (>= 2.7.1.5) rainbow (>= 2.2.2, < 4.0) - regexp_parser (>= 1.7) + regexp_parser (>= 1.8) rexml - rubocop-ast (>= 0.3.0, < 1.0) + rubocop-ast (>= 0.6.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (0.3.0) - parser (>= 2.7.1.4) - ruby-progressbar (1.10.1) + rubocop-ast (1.24.1) + parser (>= 3.1.1.0) + ruby-progressbar (1.11.0) + ruby2_keywords (0.0.5) sixarm_ruby_unaccent (1.2.0) - unicode-display_width (1.7.0) + unicode-display_width (1.8.0) unicode_utils (1.4.0) PLATFORMS - ruby + arm64-darwin-22 DEPENDENCIES awesome_print (~> 1.8) - bundler (~> 1.17) + bundler (~> 2.2) byebug (~> 11.0) countries (~> 3.0) dotenv (~> 2.7) @@ -95,4 +102,4 @@ DEPENDENCIES rubocop (~> 0.71) BUNDLED WITH - 1.17.2 + 2.2.33 diff --git a/facebookbusiness.gemspec b/facebookbusiness.gemspec index 776cc63e..873c1449 100644 --- a/facebookbusiness.gemspec +++ b/facebookbusiness.gemspec @@ -35,13 +35,14 @@ Gem::Specification.new do |s| s.required_ruby_version = '>= 3.0' s.add_dependency 'concurrent-ruby', '~> 1.1' - s.add_dependency 'faraday', '~> 1.0' - s.add_dependency 'json', '~> 2.2' + s.add_dependency 'faraday', '~> 2.6' + s.add_dependency 'faraday-multipart', '~> 1.0' + s.add_dependency 'json', '~> 2.6' s.add_dependency 'countries', '~>3.0' s.add_dependency 'money', '~> 6.13' s.add_development_dependency 'awesome_print', '~> 1.8' - s.add_development_dependency 'bundler', '~> 1.17' + s.add_development_dependency 'bundler', '~> 2.2' s.add_development_dependency 'byebug', '~> 11.0' s.add_development_dependency 'dotenv', '~> 2.7' s.add_development_dependency 'minitest', '~> 5.14.2' diff --git a/lib/facebook_ads/videos/video_io.rb b/lib/facebook_ads/videos/video_io.rb index 00a200f7..a6d0ae47 100644 --- a/lib/facebook_ads/videos/video_io.rb +++ b/lib/facebook_ads/videos/video_io.rb @@ -16,6 +16,8 @@ # IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. +require 'faraday/multipart' + module FacebookAds class VideoIO < ::UploadIO def is_video?