Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump mongoid version to 6 #102

Closed

Conversation

sivagollapalli
Copy link
Contributor

No description provided.

@sivagollapalli sivagollapalli changed the title Bump mongoid version from beta to RC Bump mongoid version to 6 Sep 26, 2016
@sivagollapalli
Copy link
Contributor Author

@mauriciozaffari Looks like bundler 1.13.1 has an issue to find out .gemspec file. Build is running with bundler 1.11 on my local system. Could you please help?

@mysticaltech
Copy link

This branch works on my rails 5 install, with the latest stable mongoid gem. Thank you for your good work ! However I am getting this issue #107 .. The relevancy value is always 1.0 .. If you have any idea what could be causing this, I would really appreciate. Thanks

@dblock
Copy link
Contributor

dblock commented Dec 20, 2016

Can someone finish this PR with a passing build, please? I'm happy to check it out, merge, etc.

@rmcsharry
Copy link

Is this project dead? If you click the details on the build TravisCI cannot find the repo...?

@mysticaltech
Copy link

I wouldn't rely on it.. I've personally moved over to searchkick

@dblock
Copy link
Contributor

dblock commented Feb 14, 2017

@rtrv
Copy link
Collaborator

rtrv commented Oct 30, 2017

@sivagollapalli could you rebase your PR to current master with working CI for Mongoid 3-5 and check tests passing for Mongoid 6? If all of them are passed, we could say there is support for Mongoid 6 and close #115

@sivagollapalli
Copy link
Contributor Author

@rtrv Sure I will rebase and update PR.

:category => Category.new(:name => "Mobile", :description => "Reviews"),
:subproducts => [Subproduct.new(:brand => "Apple", :name => "Craddle")],
:info => { :summary => "Info-summary",
:description => "Info-description"}
@tags = ["Amazing", "Awesome", "Olé"].map { |tag| Tag.create(:name => tag, product: @product) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

I suppose, you've changed tags creation because of ActiveSupport's call error, but if you use release Mongoid 6.0, this error doesn't appear. Revert tags initiation, it should work well

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rtrv But, I am getting the same error if I run specs against MongoDB 2.6.12 and mongoid 6.0.3. Here is the spec output

1) Mongoid::Search Serialized hash fields when the hash is populated should return the product
     Failure/Error: @product = Product.create :brand => "Apple",
     NoMethodError:
       undefined method `call' for #<ActiveSupport::Callbacks::CallbackSequence:0x007fd6906e8e08>
     # ./spec/mongoid_search_spec.rb:20:in `block (2 levels) in <top (required)>'

Copy link
Collaborator

Choose a reason for hiding this comment

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

@sivagollapalli it's strange, I've just fixed it by changing Mongoid 6 version from beta to release one. Try 6.0.0 instead of 6.0.3

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@rtrv Just checked with mongoid 6.0.0. Still, it shows same error.

Copy link
Collaborator

Choose a reason for hiding this comment

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

@sivagollapalli hm, interesting. I'm checking it on my machine at this week, wanna fix 6.0 support and some minor bugs to push the gem to 0.4 by the middle of December

gem 'mongoid', '~> 3.1'
else
gem 'mongoid', version
end
Copy link
Collaborator

Choose a reason for hiding this comment

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

Use Gemfile from master and just uncomment lines 10-11, and change line 20 to '~> 6.0'

@@ -280,7 +289,8 @@
context "relevant search" do
before do
Mongoid::Search.relevant_search = true
@imac = Product.create :name => 'apple imac'
category = Category.create(name: 'New Category')
@imac = Product.create :name => 'apple imac', category: category
Copy link
Collaborator

Choose a reason for hiding this comment

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

Why have you added category here? If there is an error if an object without category is created, we should change validations for Product class

:category => Category.new(:name => "Vehicle")
["Amazing", "First", "Car"].map { |tag| Tag.create(:name => tag, product: @product) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same about tags

expect(Variant.full_text_search("oeuvre")).to eq [variant1]
expect(Variant.full_text_search("æquo")).to eq [variant2]
expect(Variant.full_text_search("aequo")).to eq [variant2]
["œuvre"].map { |tag| Tag.create(:name => tag, variant: variant1) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same about tags

["œuvre"].map { |tag| Tag.create(:name => tag, variant: variant1) }

variant2 = Variant.create category: Category.create(name: 'New Category')
["æquo"].map { |tag| Tag.create(:name => tag, variant: variant2) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same about tags

:category => Category.new(:name => "Mobile"),
:subproducts => [Subproduct.new(:brand => "Apple", :name => "Craddle")],
:color => :white

["Amazing", "Awesome", "Olé"].map { |tag| Tag.create(:name => tag, variant: variant) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same about tags

:category => Category.new(:name => "процессоры"),
:subproducts => []

["Amazing", "Awesome", "Olé"].map { |tag| Tag.create(:name => tag, product: @product) }
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same about tags

@dblock
Copy link
Contributor

dblock commented Dec 22, 2017

Replaced with #124.

@dblock dblock closed this Dec 22, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants