Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/test.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: [2.6, 2.7, '3.0', 3.1]
ruby: ['3.0', 3.1, 3.2, 3.3, 3.4]

steps:
- uses: actions/checkout@v2
Expand Down
7 changes: 5 additions & 2 deletions enumerations.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
require File.expand_path('../lib/enumerations/version', __FILE__)
# frozen_string_literal: true

require File.expand_path('lib/enumerations/version', __dir__)

Gem::Specification.new do |s|
s.name = 'enumerations'
Expand All @@ -8,8 +10,9 @@ Gem::Specification.new do |s|
s.description = 'Extends ActiveRecord with enumeration capabilites.'
s.homepage = 'https://github.com/infinum/enumerations'
s.license = 'MIT'
s.required_ruby_version = '>= 3.0'

s.authors = [
s.authors = [
'Tomislav Car', 'Nikica Jokić', 'Nikola Santić', 'Stjepan Hadjić', 'Petar Ćurković'
]

Expand Down
9 changes: 6 additions & 3 deletions test/helpers/test_helper.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# frozen_string_literal: true

require 'simplecov'
SimpleCov.start

require 'minitest/autorun'
require 'logger'

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we still need this change?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I couldn't run the tests locally without it

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm, tests pass locally for me, even with the String class change:
image

Does this fail on a specific Ruby version?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It was an issue with the older version of activesupport for me locally. Removing the Gemfile.lock and running bundle install again fixed the issue and tests pass without this logger requirement on all supported ruby versions.

require 'enumerations'
require 'active_record'
require 'pry'
Expand All @@ -10,9 +13,9 @@
require_relative 'locale_helper'

class Status < Enumerations::Base
values draft: { id: 1, name: 'Draft' },
review_pending: { id: 2, name: 'Review pending' },
published: { id: 3, name: 'Published' }
values draft: { id: 1, name: 'Draft' },
review_pending: { id: 2, name: 'Review pending' },
published: { id: 3, name: 'Published' }

value :none, id: 4, name: 'None', visible: true, deleted: false
value :deleted, id: 5, deleted: true
Expand Down