Skip to content

Commit

Permalink
Fix to test suite and update gemspec
Browse files Browse the repository at this point in the history
  • Loading branch information
stevegeek committed Dec 18, 2022
1 parent 69e0248 commit cc71e78
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 11 deletions.
12 changes: 7 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ source "https://rubygems.org"
# Specify your gem's dependencies in encoded_id-rails.gemspec
gemspec

gem "rake", "~> 13.0"
group :development, :test do
gem "rake", "~> 13.0"

gem "minitest", "~> 5.0"
gem "minitest", "~> 5.0"

gem "standard", "~> 1.3"
gem "standard", "~> 1.3"

gem "steep", "~> 1.2"
gem "steep", "~> 1.2"

gem "sqlite3", "~> 1.5"
gem "sqlite3", "~> 1.5"
end
8 changes: 4 additions & 4 deletions encoded_id-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Gem::Specification.new do |spec|
spec.authors = ["Stephen Ierodiaconou"]
spec.email = ["[email protected]"]

spec.summary = "Use EncodedIds with ActiveRecord models"
spec.description = "Write a longer description or delete this line."
spec.summary = "Use `encoded_id` with ActiveRecord models"
spec.description = "ActiveRecord concern to use EncodedID to turn IDs into reversible and human friendly obfuscated strings."
spec.homepage = "https://github.com/stevegeek/encoded_id-rails"
spec.license = "MIT"
spec.required_ruby_version = ">= 2.6.0"
Expand All @@ -30,8 +30,8 @@ Gem::Specification.new do |spec|
spec.require_paths = ["lib"]

# Uncomment to register a new dependency of your gem
spec.add_dependency "activesupport", ">= 6.0"
spec.add_dependency "activerecord", ">= 6.0"
spec.add_dependency "activesupport", ">= 6.0", "< 8.0"
spec.add_dependency "activerecord", ">= 6.0", "< 8.0"
spec.add_dependency "encoded_id", "~> 0.4"

# For more information and examples about making a new gem, check out our
Expand Down
1 change: 1 addition & 0 deletions rbs_collection.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ path: .gem_rbs_collection
gems:
- name: encoded_id-rails
ignore: true
- name: cgi
# Skip loading rbs gem's RBS.
# It's unnecessary if you don't use rbs as a library.
- name: rbs
Expand Down
4 changes: 2 additions & 2 deletions test/encoded_id/test_rails.rb
Original file line number Diff line number Diff line change
Expand Up @@ -109,10 +109,10 @@ def test_it_gets_encoded_id_for_model
end

def test_it_gets_slugged_encoded_id_for_model
assert_equal "my-cool-slug--#{model.encoded_id}", model.slugged_encoded_id
assert_equal "my_model--#{model.encoded_id}", model.slugged_encoded_id
end

def test_it_gets_slugged_encoded_id_for_model
def test_it_gets_slugged_encoded_id_for_model_with_custom_slug
assert_equal "sluggy--#{model.encoded_id}", model.slugged_encoded_id(with: :custom_slug_method)
end

Expand Down

0 comments on commit cc71e78

Please sign in to comment.