diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e2458ba..013c43e 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: - name: Install Ruby uses: ruby/setup-ruby@v1 with: - ruby-version: 2.6.8 + ruby-version: 2.7.8 bundler-cache: true - name: RuboCop @@ -27,7 +27,7 @@ jobs: strategy: matrix: - ruby-version: ["2.6.8", "2.7.8", "3.0.6", "3.1.4", "3.2.3", "3.3.0"] + ruby-version: ["2.7.8", "3.0", "3.1", "3.2", "3.3", "3.4"] steps: - uses: actions/checkout@v2 diff --git a/.rubocop.yml b/.rubocop.yml index 8c73e93..37f6f28 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,8 +1,9 @@ inherit_from: .rubocop_todo.yml AllCops: - TargetRubyVersion: 2.6 + TargetRubyVersion: 2.7 NewCops: enable + SuggestExtensions: false Layout/LineLength: Enabled: false diff --git a/devbox.json b/devbox.json deleted file mode 100644 index 1be2d41..0000000 --- a/devbox.json +++ /dev/null @@ -1,10 +0,0 @@ -{ - "$schema": "https://raw.githubusercontent.com/jetpack-io/devbox/main/.schema/devbox.schema.json", - "packages": ["ruby@2.6.8"], - "shell": { - "scripts": { - "test": ["bundle exec rspec $@"], - "lint": ["bundle exec rubocop -a $@"] - } - } -} diff --git a/devbox.lock b/devbox.lock deleted file mode 100644 index 0ee8561..0000000 --- a/devbox.lock +++ /dev/null @@ -1,12 +0,0 @@ -{ - "lockfile_version": "1", - "packages": { - "ruby@2.6.8": { - "last_modified": "2021-10-22T02:15:45Z", - "plugin_version": "0.0.2", - "resolved": "github:NixOS/nixpkgs/718895c14907b60069520b6394b4dbb6e3aa9c33#ruby_2_6", - "source": "devbox-search", - "version": "2.6.8" - } - } -} diff --git a/lib/generators/vero_generator.rb b/lib/generators/vero_generator.rb index 82dc490..affe948 100644 --- a/lib/generators/vero_generator.rb +++ b/lib/generators/vero_generator.rb @@ -9,7 +9,7 @@ def create_initializer_file type = options[:heroku] || 'standard' abort('You must provide an API KEY and API SECRET to proceed.') if options[:heroku].blank? && (options[:api_key].blank? || options[:api_secret].blank?) - create_file 'config/initializers/vero.rb', send("#{type}_initializer_content".to_sym) + create_file 'config/initializers/vero.rb', send("#{type}_initializer_content") end private diff --git a/lib/vero/config.rb b/lib/vero/config.rb index 6825d49..f477548 100644 --- a/lib/vero/config.rb +++ b/lib/vero/config.rb @@ -54,7 +54,7 @@ def update_attributes(attributes = {}) return unless attributes.is_a?(Hash) Vero::Config.available_attributes.each do |symbol| - method_name = "#{symbol}=".to_sym + method_name = "#{symbol}=" send(method_name, attributes[symbol]) if respond_to?(method_name) && attributes.key?(symbol) end end diff --git a/lib/vero/trackable/base.rb b/lib/vero/trackable/base.rb index 5a06a9b..1485f13 100644 --- a/lib/vero/trackable/base.rb +++ b/lib/vero/trackable/base.rb @@ -36,7 +36,7 @@ def to_vero end if other.is_a?(Array) && !other.empty? - other.select! { |i| (i.is_a?(Hash) && i.key?(:extras)) } + other.select! { |i| i.is_a?(Hash) && i.key?(:extras) } other.each do |h| symbol = h[:extras] t = respond_to?(symbol, true) ? send(symbol) : nil diff --git a/vero.gemspec b/vero.gemspec index 9a96e78..69f1dc8 100644 --- a/vero.gemspec +++ b/vero.gemspec @@ -12,14 +12,14 @@ Gem::Specification.new do |spec| spec.summary = 'Ruby gem for Vero' spec.description = 'Ruby gem for Vero' spec.homepage = 'http://www.getvero.com/' + spec.metadata['rubygems_mfa_required'] = 'true' spec.files = Dir['**/*'] spec.executables = Dir['bin/*'].map { |f| File.basename(f) } spec.require_paths = ['lib'] - spec.required_ruby_version = '>= 2.6.6' + spec.required_ruby_version = '>= 2.7' - spec.add_runtime_dependency 'json' - spec.add_runtime_dependency 'rest-client' - spec.metadata['rubygems_mfa_required'] = 'true' + spec.add_dependency 'json' + spec.add_dependency 'rest-client' end