-
Notifications
You must be signed in to change notification settings - Fork 526
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
Rails 5 compatibility #752
Merged
Merged
Changes from all commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
b0e615b
Require 'rails/test_unit/railtie' on Rails v5
janraasch 85639c6
Use ActionController::TestRequest.create instead of .new on Rails v5
janraasch 31a7c4d
add RVM config files to gitignore
seanlinsley f14227a
temporarily skip generator tests
seanlinsley a9a91bf
setup up Travis for Rails 5
seanlinsley 38f19b1
update Mongoid config
seanlinsley 1744161
Set the test environment before loading the DB schema
seanlinsley 1e52e79
_path helpers are no longer available in mailers
seanlinsley 8896b94
use the new subject syntax
seanlinsley a7e368f
update version requirements
seanlinsley ce7a505
remove old AMS compatibility code
seanlinsley 5d9e691
remove old compatibility code
seanlinsley e9fd1cb
before_filter -> before_action
seanlinsley de70008
don't require AMS at runtime
seanlinsley b2a9904
revert test_case.rb changes
seanlinsley 316252c
documentation updates
seanlinsley 92dd584
use SVG badges
seanlinsley File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
*.gem | ||
*.rvmrc | ||
.rvmrc | ||
.ruby-version | ||
.ruby-gemset | ||
.bundle | ||
Gemfile.lock | ||
pkg/* | ||
|
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 |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# Draper: View Models for Rails | ||
|
||
[![TravisCI Build Status](https://travis-ci.org/drapergem/draper.svg?branch=master)](http://travis-ci.org/drapergem/draper) | ||
[![Code Climate](https://codeclimate.com/github/drapergem/draper.png)](https://codeclimate.com/github/drapergem/draper) | ||
[![Inline docs](http://inch-ci.org/github/drapergem/draper.png?branch=master)](http://inch-ci.org/github/drapergem/draper) | ||
[![Code Climate](https://codeclimate.com/github/drapergem/draper.svg)](https://codeclimate.com/github/drapergem/draper) | ||
[![Inline docs](http://inch-ci.org/github/drapergem/draper.svg?branch=master)](http://inch-ci.org/github/drapergem/draper) | ||
|
||
Draper adds an object-oriented layer of presentation logic to your Rails | ||
application. | ||
|
@@ -564,15 +564,15 @@ end | |
|
||
This is only necessary when proxying class methods. | ||
|
||
Once this association between the decorator and the model is set up, you can call `SomeModel.decorator_class` to access class methods defined in the decorator. If necessary, you can check if your model is decorated with `SomeModel.decorator_class?`. | ||
Once this association between the decorator and the model is set up, you can call | ||
`SomeModel.decorator_class` to access class methods defined in the decorator. | ||
If necessary, you can check if your model is decorated with `SomeModel.decorator_class?`. | ||
|
||
### Making Models Decoratable | ||
|
||
Models get their `decorate` method from the `Draper::Decoratable` module, which | ||
is included in `ActiveRecord::Base` and `Mongoid::Document` by default. If | ||
you're [using another | ||
ORM](https://github.com/drapergem/draper/wiki/Using-other-ORMs) (including | ||
versions of Mongoid prior to 3.0), or want to decorate plain old Ruby objects, | ||
you're using another ORM, or want to decorate plain old Ruby objects, | ||
you can include this module manually. | ||
|
||
## Contributors | ||
|
@@ -581,7 +581,11 @@ Draper was conceived by Jeff Casimir and heavily refined by Steve Klabnik and a | |
great community of open source | ||
[contributors](https://github.com/drapergem/draper/contributors). | ||
|
||
### Core Team | ||
### Current maintainers | ||
|
||
* Sean Linsley | ||
|
||
### Historical maintainers | ||
|
||
* Jeff Casimir ([email protected]) | ||
* Steve Klabnik ([email protected]) | ||
|
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
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 |
---|---|---|
@@ -1,22 +1,9 @@ | ||
require 'rake/testtask' | ||
|
||
test_task = if Rails.version.to_f < 3.2 | ||
require 'rails/test_unit/railtie' | ||
Rake::TestTask | ||
else | ||
require 'rails/test_unit/sub_test_task' | ||
Rails::SubTestTask | ||
end | ||
require 'rails/test_unit/railtie' | ||
|
||
namespace :test do | ||
test_task.new(:decorators => "test:prepare") do |t| | ||
Rake::TestTask.new(:decorators => "test:prepare") do |t| | ||
t.libs << "test" | ||
t.pattern = "test/decorators/**/*_test.rb" | ||
end | ||
end | ||
|
||
if Rails.version.to_f < 4.2 && Rake::Task.task_defined?('test:run') | ||
Rake::Task['test:run'].enhance do | ||
Rake::Task['test:decorators'].invoke | ||
end | ||
end |
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
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
May I ask why you are making this change? It breaks testing apps without ActionMailer included, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My mistake, I didn't realize that this file was something that other people's test suites relied upon. I'll undo this change.