Skip to content
This repository has been archived by the owner on Mar 30, 2022. It is now read-only.

incremented versions for gems to rails 6 ruby 2.7.0 and mongo 7 #6

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sudo: false
language: ruby
rvm:
- 2.5.0
before_install: gem install bundler -v 1.16.0
- 2.7.0
before_install: gem install bundler -v 2.1.4
16 changes: 13 additions & 3 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
# Specify your gem's dependencies in ransack-mongoid.gemspec
gemspec

gem 'activemodel', '~> 4.0', require: false

if ENV['DB'] =~ /mongoid4/
gem 'mongoid', '~> 4.0.0', require: false
gem 'activemodel', '~> 4.0', require: false
gem 'mongoid', '~> 4.0', require: false
elsif ENV['DB'] =~ /mongoid5/
gem 'activemodel', '~> 4.0', require: false
gem 'mongoid', '~> 5.0', require: false
elsif ENV['DB'] =~ /mongoid6/
gem 'activemodel', '~> 6.0', require: false
gem 'mongoid', '~> 6.0', require: false
elsif ENV['DB'] =~ /mongoid7/
gem 'activemodel', '~> 6.0', require: false
gem 'mongoid', '~> 7.0', require: false
else
gem 'mongoid', '~> 5.0.0', require: false

Choose a reason for hiding this comment

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

This gem should probably declare an official range of supported mongoid versions, and explicitly test those in CI. That sounds like something for a separate PR, though.

Copy link
Author

Choose a reason for hiding this comment

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

I tried that but it breaks the older version.

gem 'activemodel', require: false
gem 'mongoid'
end

gem 'ransack', github: 'activerecord-hackery/ransack'
132 changes: 49 additions & 83 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,122 +1,88 @@
PATH
remote: .
GIT
remote: https://github.com/activerecord-hackery/ransack
revision: aee2d97dd4c66d344030f4d41b207015f8c68fd3
specs:
ransack-mongoid (0.1.0)
polyamorous (2.3.2)
activerecord (>= 5.2.1)
ransack (2.3.2)
activerecord (>= 5.2.1)
activesupport (>= 5.2.1)
i18n
polyamorous (= 2.3.2)

PATH
remote: /Users/gregmolnar/Github/ransack
remote: .
specs:
ransack (1.8.8)
actionpack (>= 3.0)
activerecord (>= 3.0)
activesupport (>= 3.0)
i18n
ransack-mongoid (0.1.0)

GEM
remote: https://rubygems.org/
specs:
actionpack (4.2.10)
actionview (= 4.2.10)
activesupport (= 4.2.10)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.10)
activesupport (= 4.2.10)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activemodel (4.2.10)
activesupport (= 4.2.10)
builder (~> 3.1)
activerecord (4.2.10)
activemodel (= 4.2.10)
activesupport (= 4.2.10)
arel (~> 6.0)
activesupport (4.2.10)
i18n (~> 0.7)
activemodel (6.0.2.1)
activesupport (= 6.0.2.1)
activerecord (6.0.2.1)
activemodel (= 6.0.2.1)
activesupport (= 6.0.2.1)
activesupport (6.0.2.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.4)
bson (4.3.0)
builder (3.2.3)
zeitwerk (~> 2.2)
bson (4.7.1)
coderay (1.1.2)
concurrent-ruby (1.0.5)
crass (1.0.4)
concurrent-ruby (1.1.5)
diff-lcs (1.3)
erubis (2.7.0)
faker (0.9.5)
i18n (~> 0.4)
i18n (0.9.5)
concurrent-ruby (~> 1.0)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
machinist (1.0.6)
method_source (0.8.2)
mini_portile2 (2.3.0)
minitest (5.11.3)
mongo (2.5.3)
bson (>= 4.3.0, < 5.0.0)
mongoid (5.0.2)
activemodel (~> 4.0)
mongo (~> 2.1)
origin (~> 2.1)
tzinfo (>= 0.3.37)
nokogiri (1.8.3)
mini_portile2 (~> 2.3.0)
origin (2.3.1)
minitest (5.14.0)
mongo (2.11.3)
bson (>= 4.4.2, < 5.0.0)
mongoid (7.0.5)
activemodel (>= 5.1, < 6.1)
mongo (>= 2.5.1, < 3.0.0)
pry (0.10.0)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
rack (1.6.10)
rack-test (0.6.3)
rack (>= 1.0)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.9)
activesupport (>= 4.2.0, < 5.0)
nokogiri (~> 1.6)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.4)
loofah (~> 2.2, >= 2.2.2)
rake (10.5.0)
rspec (3.7.0)
rspec-core (~> 3.7.0)
rspec-expectations (~> 3.7.0)
rspec-mocks (~> 3.7.0)
rspec-core (3.7.1)
rspec-support (~> 3.7.0)
rspec-expectations (3.7.0)
rake (13.0.1)
rspec (3.9.0)
rspec-core (~> 3.9.0)
rspec-expectations (~> 3.9.0)
rspec-mocks (~> 3.9.0)
rspec-core (3.9.1)
rspec-support (~> 3.9.1)
rspec-expectations (3.9.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-mocks (3.7.0)
rspec-support (~> 3.9.0)
rspec-mocks (3.9.1)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.7.0)
rspec-support (3.7.1)
rspec-support (~> 3.9.0)
rspec-support (3.9.2)
slop (3.6.0)
thread_safe (0.3.6)
tzinfo (1.2.5)
tzinfo (1.2.6)
thread_safe (~> 0.1)
zeitwerk (2.2.2)

PLATFORMS
ruby

DEPENDENCIES
activemodel (~> 4.0)
bundler (~> 1.16)
activemodel
bundler (>= 1.16)
faker (~> 0.9.5)
machinist (~> 1.0.6)
mongoid (~> 5.0.0)
mongoid
pry (= 0.10)
rake (~> 10.0)
rake (>= 10.0)
ransack!
ransack-mongoid!
rspec (~> 3)
rspec (>= 3)

BUNDLED WITH
1.16.0
2.1.4
2 changes: 1 addition & 1 deletion lib/ransack/mongoid/version.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
module Ransack
module Mongoid
VERSION = "0.1.0"

Choose a reason for hiding this comment

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

I don't think you need to bump the version, since nothing is really changing from a final user perspective. This PR is just making sure that this gem works against newest versions of dependencies.

Copy link
Author

Choose a reason for hiding this comment

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

Without the version bump, the gem does not update and it does not resolve the new decency versions.

VERSION = "0.1.1"
end
end
30 changes: 15 additions & 15 deletions ransack-mongoid.gemspec
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@

lib = File.expand_path("../lib", __FILE__)
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require "ransack/mongoid/version"
require 'ransack/mongoid/version'

Gem::Specification.new do |spec|
spec.name = "ransack-mongoid"
spec.name = 'ransack-mongoid'
spec.version = Ransack::Mongoid::VERSION
spec.authors = ["Ernie Miller", "Ryan Bigg", "Jon Atack","Sean Carroll"]

Choose a reason for hiding this comment

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

I don't think you get to be added as the author of this gem just with a single contribution 😅. I'm grateful, and probably the authors of this gem too, for your contribution though.

In fact, I would personally revert all the changes in this file, since you only changing the quoting style, and adding your name and email address.

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for reviewing so intensely. Is there anything that is missing or that requires attention for the gem to be ready for 6 ruby 2.7.0 and mongo 7 ?

Choose a reason for hiding this comment

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

I have no idea, since it doesn't even seem this repo has TravisCI enabled. We can probably ask the current maintainers to add that?

Have you tried the gem in your application?

Copy link
Author

Choose a reason for hiding this comment

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

I am currently using this version, hence the PR request.

spec.email = ["ernie@erniemiller.org", "radarlistener@gmail.com", "jonnyatack@gmail.com","sfcarroll@gmail.com"]
spec.homepage = "https://github.com/activerecord-hackery/ransack-mongoid"
spec.authors = ['Jesus Alcaraz', 'Ernie Miller', 'Ryan Bigg', 'Jon Atack','Sean Carroll']
spec.email = ['jesusalc@gmail.com', 'ernie@erniemiller.org', 'radarlistener@gmail.com', 'jonnyatack@gmail.com','sfcarroll@gmail.com']
spec.homepage = 'https://github.com/activerecord-hackery/ransack-mongoid'

spec.summary = %q{Object-based searching for Mongoid.}
spec.description = %q{Ransack is the successor to the MetaSearch gem. It improves and expands upon MetaSearch's functionality, but does not have a 100%-compatible API. This is the gem with Mongoid support}
spec.license = "MIT"
spec.license = 'MIT'

# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
# to allow pushing to a single host or delete this section to allow pushing to any host.
if spec.respond_to?(:metadata)
spec.metadata["allowed_push_host"] = "TODO: Set to 'http://mygemserver.com'"
spec.metadata['allowed_push_host'] = "TODO: Set to 'http://mygemserver.com'"
else
raise "RubyGems 2.0 or newer is required to protect against " \
"public gem pushes."
raise 'RubyGems 2.0 or newer is required to protect against ' \
'public gem pushes.'
end

spec.files = `git ls-files -z`.split("\x0").reject do |f|
f.match(%r{^(test|spec|features)/})
end
spec.bindir = "exe"
spec.bindir = 'exe'
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
spec.require_paths = ['lib']

# spec.add_dependency "ransack", "~> 1.8"
spec.add_development_dependency "bundler", "~> 1.16"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency 'rspec', '~> 3'
spec.add_development_dependency 'bundler', '>= 1.16'
spec.add_development_dependency 'rake', '>= 10.0'
spec.add_development_dependency 'rspec', '>= 3'
spec.add_development_dependency 'machinist', '~> 1.0.6'
spec.add_development_dependency 'faker', '~> 0.9.5'
spec.add_development_dependency 'pry', '0.10'
Expand Down