forked from doorkeeper-gem/doorkeeper
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Introduce orm_model_dir to reuse models across directories - Detect mongoid versions to support both mongoid 3 and 4 inside same model. - Update .travis.yml to run build on rails4 + mongoid4
- Loading branch information
Showing
11 changed files
with
71 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,6 +13,7 @@ env: | |
- rails=4.1.0.beta1 | ||
- orm=mongoid2 | ||
- orm=mongoid3 | ||
- orm=mongoid4 | ||
- orm=mongo_mapper | ||
services: | ||
- mongodb |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
module Doorkeeper | ||
module Models | ||
module Mongoid | ||
module Version | ||
def mongoid3? | ||
::Mongoid::VERSION.starts_with?("3") | ||
end | ||
|
||
def mongoid4? | ||
::Mongoid::VERSION.starts_with?("4") | ||
end | ||
end | ||
end | ||
end | ||
end |
9 changes: 8 additions & 1 deletion
9
...oorkeeper/models/mongoid3/access_grant.rb → ...rkeeper/models/mongoid3_4/access_grant.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
9 changes: 8 additions & 1 deletion
9
...oorkeeper/models/mongoid3/access_token.rb → ...rkeeper/models/mongoid3_4/access_token.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
development: | ||
sessions: | ||
default: | ||
database: doorkeeper-mongoid4-development | ||
hosts: | ||
- localhost:27017 | ||
options: | ||
w: 1 | ||
|
||
test: | ||
sessions: | ||
default: | ||
database: doorkeeper-mongoid4-test | ||
hosts: | ||
- localhost:27017 | ||
options: | ||
write: | ||
w: 1 |