-
Notifications
You must be signed in to change notification settings - Fork 82
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
Fix before_filter > before_action deprecation error (backward compatible) #67
Open
knightq
wants to merge
21
commits into
zachinglis:master
Choose a base branch
from
knightq:master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
2794141
#21200 update appraisals file to include rails 5
mnutini 6a57c4c
#21200 change from rvmrc to ruby-version file
mnutini e11d2ce
#21200 change deprecated before_filter rails method to before_action
mnutini cf69828
Support for Rails 5.1
knightq afcfa74
Removes support for ruby 1.9.3
knightq ad0a34f
Fixes test
knightq 646ec1f
[test] Stronger assertion
knightq df0db06
More rails versions (4.1, 4.2, 5.0), removed rails 5.1 from test
knightq c37d2ab
Rubocop linting
knightq a9d7e5a
.travis.ci: removes RoR 4.1 & 4.2 spec, adds 5.1
knightq 7156024
[ruby] Replaces match? with =~ (backward compatible with ruby 2.0.0)
knightq d62687f
Excludes RoR 5.x from build with ruby 2.0.0
knightq c632ba9
Adds RoR 5.1 to apprisals defs.
knightq 4155858
Fix
knightq 5016e18
Fix travis.ci
knightq f839053
Fix trial for Appraisal
knightq 8851c35
Fix typo
knightq 2f385a9
[rubocop] Linting
knightq 5020b76
README: updates version number on doc.
knightq 36f623c
[travis.ci] Removes test on RoR 5.1
knightq 883e40d
Respecting semantic versioning.
knightq 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 |
---|---|---|
@@ -0,0 +1 @@ | ||
2.5.0 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,13 @@ | ||
language: ruby | ||
rvm: | ||
- 1.9.3 | ||
- 2.0.0 | ||
- 2.5.0 | ||
gemfile: | ||
- gemfiles/rails3_2.gemfile | ||
- gemfiles/rails4_0.gemfile | ||
- gemfiles/rails5_0.gemfile | ||
|
||
matrix: | ||
exclude: | ||
- rvm: 2.0.0 | ||
gemfile: gemfiles/rails5_0.gemfile |
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,9 +1,19 @@ | ||
appraise "rails3_2" do | ||
appraise 'rails3_2' do | ||
gem 'activesupport', '>= 3.0', '< 4' | ||
gem 'actionpack', '>= 3.0', '< 4' | ||
end | ||
|
||
appraise "rails4_0" do | ||
appraise 'rails4_0' do | ||
gem 'activesupport', '>= 4.0.0.beta', '< 5' | ||
gem 'actionpack', '>= 4.0.0.beta', '< 5' | ||
end | ||
|
||
appraise 'rails5_0' do | ||
gem 'activesupport', '~> 5.0' | ||
gem 'actionpack', '~> 5.0' | ||
end | ||
|
||
appraise 'rails5_1' do | ||
gem 'activesupport', '~> 5.1.0' | ||
gem 'actionpack', '~> 5.1.0' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
source "https://rubygems.org" | ||
source 'https://rubygems.org' | ||
|
||
gemspec | ||
gemspec |
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,31 +1,31 @@ | ||
# -*- encoding: utf-8 -*- | ||
$:.push File.expand_path("../lib", __FILE__) | ||
require "crummy/version" | ||
$LOAD_PATH.push File.expand_path('../lib', __FILE__) | ||
require 'crummy/version' | ||
|
||
Gem::Specification.new do |s| | ||
s.name = "crummy" | ||
s.name = 'crummy' | ||
s.version = Crummy::VERSION | ||
s.platform = Gem::Platform::RUBY | ||
s.licenses = ['MIT'] | ||
|
||
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version= | ||
s.authors = ["Zach Inglis", "Andrew Nesbitt"] | ||
s.summary = "Tasty breadcrumbs!" | ||
s.description = "Crummy is a simple and tasty way to add breadcrumbs to your Rails applications." | ||
s.email = "[email protected]" | ||
s.extra_rdoc_files = ["README.md"] | ||
s.required_rubygems_version = Gem::Requirement.new('>= 0') if s.respond_to? :required_rubygems_version= | ||
s.authors = ['Zach Inglis', 'Andrew Nesbitt'] | ||
s.summary = 'Tasty breadcrumbs!' | ||
s.description = 'Crummy is a simple and tasty way to add breadcrumbs to your Rails applications.' | ||
s.email = '[email protected]' | ||
s.extra_rdoc_files = ['README.md'] | ||
|
||
s.files = `git ls-files`.split("\n") | ||
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n") | ||
|
||
s.homepage = "http://github.com/zachinglis/crummy" | ||
s.require_paths = [%q{lib}] | ||
s.rubygems_version = %q{1.8.8} | ||
s.homepage = 'http://github.com/zachinglis/crummy' | ||
s.require_paths = ['lib'] | ||
s.rubygems_version = '2.0.0' | ||
|
||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'bundler', '~> 1.0' | ||
s.add_development_dependency 'activesupport' | ||
s.add_development_dependency 'actionpack' | ||
s.add_development_dependency 'activesupport' | ||
s.add_development_dependency 'appraisal' | ||
s.add_development_dependency 'bundler', '~> 1.0' | ||
s.add_development_dependency('rails-dom-testing') | ||
s.add_development_dependency 'rake' | ||
s.add_development_dependency 'test-unit' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class ApplicationController < ActionController::Base | ||
add_crumb("Homepage") { |instance| instance.send :root_url } | ||
add_crumb("Customer Dashboard", '/') | ||
add_crumb('Homepage') { |instance| instance.send :root_url } | ||
add_crumb('Customer Dashboard', '/') | ||
|
||
protect_from_forgery | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
class PagesController < ApplicationController | ||
def index | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,19 @@ | ||
class PostsController < ApplicationController | ||
add_crumb "Posts", :posts_url, :except => [:new] | ||
add_crumb 'Posts', :posts_url, except: [:new] | ||
|
||
def index | ||
@posts = Post.all | ||
end | ||
|
||
def show | ||
@post = Post.find params[:id] | ||
|
||
@post.categories.each do |category| | ||
add_crumb category.title, "#" | ||
add_crumb category.title, '#' | ||
end | ||
end | ||
|
||
def new | ||
add_crumb "Forever Alone" | ||
add_crumb 'Forever Alone' | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ def page_title | |
if @page_title | ||
"Crummy Test - #{@page_title}" | ||
else | ||
"Crummy Test" | ||
'Crummy Test' | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
class Category < ActiveRecord::Base | ||
belongs_to :category | ||
|
||
has_many :categories | ||
has_many :posts | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
# This file is used by Rack-based servers to start the application. | ||
|
||
require ::File.expand_path('../config/environment', __FILE__) | ||
require ::File.expand_path('../config/environment', __FILE__) | ||
run CrummyTest::Application |
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
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,5 @@ | ||
CrummyTest::Application.routes.draw do | ||
resources :posts | ||
root :to => "pages#index" | ||
|
||
root to: 'pages#index' | ||
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
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.
I don't think there's any major incompatible API changes ... maybe better to stick to1.9.0
?