Skip to content

Commit

Permalink
Merge pull request #100 from sivagollapalli/mongoid_HEAD
Browse files Browse the repository at this point in the history
Running build with mongoid beta
  • Loading branch information
mauriciozaffari committed Jul 27, 2016
2 parents 3f3a997 + 9647eca commit 24cac58
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 2 deletions.
8 changes: 7 additions & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
language: ruby
rvm:
- 2.3.0
- 2.2.3
- 1.9.3
- jruby-19mode # JRuby in 1.9 mode
- rbx-2.1.1
- rbx-2.1.1
env:
- MONGOID_VERSION=3
- MONGOID_VERSION=4
- MONGOID_VERSION=5
- MONGOID_VERSION=6
14 changes: 13 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,16 @@ platforms :jruby do
gemspec :name => "mongoid_search-java"
end

gem 'simplecov', '>= 0.4.0', :require => false, :group => :test
gem 'simplecov', '>= 0.4.0', :require => false, :group => :test
case version = ENV['MONGOID_VERSION'] || '~> 6.0.0.beta'
when /6/
gem 'mongoid', '~> 6.0.0.beta'
when /5/
gem 'mongoid', '~> 5.0'
when /4/
gem 'mongoid', '~> 4.0'
when /3/
gem 'mongoid', '~> 3.1'
else
gem 'mongoid', version
end
2 changes: 2 additions & 0 deletions spec/models/category.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
class Category
include Mongoid::Document
include Mongoid::Attributes::Dynamic if ::Mongoid::VERSION >= '4'

field :name, localize: true
field :description

Expand Down
2 changes: 2 additions & 0 deletions spec/models/product.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
class Product
include Mongoid::Document
include Mongoid::Search
include Mongoid::Attributes::Dynamic if ::Mongoid::VERSION >= '4'

field :brand
field :name
field :attrs, :type => Array
Expand Down
1 change: 1 addition & 0 deletions spec/models/subproduct.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
class Subproduct
include Mongoid::Document
include Mongoid::Attributes::Dynamic if ::Mongoid::VERSION >= '4'

field :brand
field :name
Expand Down
1 change: 1 addition & 0 deletions spec/models/tag.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
class Tag
include Mongoid::Document
include Mongoid::Search
include Mongoid::Attributes::Dynamic if ::Mongoid::VERSION >= '4'

field :name

Expand Down

0 comments on commit 24cac58

Please sign in to comment.