From 1099e2a49593b49372b6804855f8c19dd3fd55eb Mon Sep 17 00:00:00 2001 From: Thomas Dutreuilh <102948575+tdutreui-solocal@users.noreply.github.com> Date: Thu, 14 Sep 2023 11:47:22 +0200 Subject: [PATCH] retire Ruby 2 + gems update + release 1.6 (#91) * Update lockfiles ruby-update * fix standardrb Signed-off-by: Thomas Leclaire * moved constants at the top of module * remove unsupported ruby version * update standardrb * require ruby version * new gem version + minimal ruby version --------- Signed-off-by: Thomas Leclaire Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: Thomas Leclaire --- .circleci/config.yml | 10 +--------- .ruby-version | 1 + Gemfile | 2 +- bing_ads_ruby_sdk.gemspec | 2 +- lib/bing_ads_ruby_sdk.rb | 10 +++++----- lib/bing_ads_ruby_sdk/version.rb | 2 +- 6 files changed, 10 insertions(+), 17 deletions(-) create mode 100644 .ruby-version diff --git a/.circleci/config.yml b/.circleci/config.yml index e852a40..3100dd1 100755 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -32,13 +32,6 @@ commands: destination: test-results jobs: - build_2_x: - docker: - - image: ruby:2.7.8 - working_directory: ~/repo - steps: - - build - build_3_x: docker: - image: ruby:3.2.2 @@ -47,8 +40,7 @@ jobs: - build workflows: - version: 2 + version: 3 build: jobs: - - build_2_x - build_3_x \ No newline at end of file diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 0000000..be94e6f --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +3.2.2 diff --git a/Gemfile b/Gemfile index 3d618b6..79d9a0c 100644 --- a/Gemfile +++ b/Gemfile @@ -3,4 +3,4 @@ source "https://rubygems.org" # Specify your gem's dependencies in bing_ads_ruby_sdk.gemspec gemspec -gem "standard", "1.30.1" +gem "standard", "1.31.1" diff --git a/bing_ads_ruby_sdk.gemspec b/bing_ads_ruby_sdk.gemspec index 24c24b1..5e2836b 100644 --- a/bing_ads_ruby_sdk.gemspec +++ b/bing_ads_ruby_sdk.gemspec @@ -4,7 +4,7 @@ require "bing_ads_ruby_sdk/version" Gem::Specification.new do |spec| spec.name = "bing_ads_ruby_sdk" - spec.required_ruby_version = ">= 2.3" + spec.required_ruby_version = ">= 3" spec.version = BingAdsRubySdk::VERSION spec.authors = %w[Effilab developers] diff --git a/lib/bing_ads_ruby_sdk.rb b/lib/bing_ads_ruby_sdk.rb index 9b982a9..bdeae52 100644 --- a/lib/bing_ads_ruby_sdk.rb +++ b/lib/bing_ads_ruby_sdk.rb @@ -10,6 +10,9 @@ require "bing_ads_ruby_sdk/railtie" if defined?(Rails) module BingAdsRubySdk + TYPE_KEY = "@type" + ROOT_PATH = File.join(__dir__, "..") + def self.config @configuration ||= BingAdsRubySdk::Configuration.new end @@ -18,9 +21,9 @@ def self.configure yield(config) end - def self.log(level, *args, &block) + def self.log(level, *, &block) return unless config.log - config.logger.send(level, *args, &block) + config.logger.send(level, *, &block) end def self.root_path @@ -30,7 +33,4 @@ def self.root_path def self.type_key TYPE_KEY end - - TYPE_KEY = "@type" - ROOT_PATH = File.join(__dir__, "..") end diff --git a/lib/bing_ads_ruby_sdk/version.rb b/lib/bing_ads_ruby_sdk/version.rb index 15b5ae1..b909823 100644 --- a/lib/bing_ads_ruby_sdk/version.rb +++ b/lib/bing_ads_ruby_sdk/version.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true module BingAdsRubySdk - VERSION = "1.5.2" + VERSION = "1.6" DEFAULT_SDK_VERSION = :v13 end