-
Notifications
You must be signed in to change notification settings - Fork 526
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #752 from drapergem/rails-5
Rails 5 compatibility
- Loading branch information
Showing
30 changed files
with
181 additions
and
173 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 |
---|---|---|
@@ -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. | ||
|
@@ -586,15 +586,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 | ||
|
@@ -603,7 +603,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.