Skip to content

Commit

Permalink
dep: Set minimum Ruby version to 2.7 (#81)
Browse files Browse the repository at this point in the history
This PR increases the min version of Ruby from 2.6 to 2.6, and also adds Ruby 3.4 to test matrix.
  • Loading branch information
jylamont authored Feb 14, 2025
1 parent 0da5ff6 commit dc74e4d
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 32 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 2 additions & 1 deletion .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
inherit_from: .rubocop_todo.yml

AllCops:
TargetRubyVersion: 2.6
TargetRubyVersion: 2.7
NewCops: enable
SuggestExtensions: false

Layout/LineLength:
Enabled: false
Expand Down
10 changes: 0 additions & 10 deletions devbox.json

This file was deleted.

12 changes: 0 additions & 12 deletions devbox.lock

This file was deleted.

2 changes: 1 addition & 1 deletion lib/generators/vero_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/vero/config.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lib/vero/trackable/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 4 additions & 4 deletions vero.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit dc74e4d

Please sign in to comment.