Permalink
Browse files

Update for rail 5

Add files for cables, jobs, and mailers, but don't activate
Update files for new options, deprecations, etc.
  • Loading branch information...
Antony Donovan
Antony Donovan committed Jan 31, 2017
1 parent a9a1328 commit 5d53af76d2b1c3c9da5ed9263e8b08ecac25aea7
@@ -1,15 +1,15 @@
Style/Documentation:
Exclude:
- 'app/controllers/*'
- 'app/models/*'
- 'app/serializers/*'
- 'app/**/*'
- 'db/migrate/**'

Metrics/BlockLength:
Exclude:
- 'spec/**/*'

AllCops:
TargetRubyVersion:
2.3
Exclude:
- 'bin/*'
- 'config/database.yml'
23 Gemfile
@@ -3,32 +3,29 @@
source 'https://rubygems.org'
ruby '2.3.1'

gem 'rails', '~> 4.2.7.1'
gem 'rails-api'
gem 'active_model_serializers', '~> 0.10.0'
gem 'rack-cors', require: 'rack/cors'
gem 'pg'
gem 'bcrypt', '~> 3.1.11'

group :production do
gem 'rails_12factor', '~> 0.0.3'
end
gem 'pg'
gem 'puma', '~> 3.0'
gem 'rack-cors', require: 'rack/cors'
gem 'rails', '~> 5.0.1'

group :development, :test do
gem 'byebug', platform: :mri
gem 'dotenv-rails', '~> 2.1', '>= 2.1.1'
gem 'pry', '~> 0.10'
gem 'byebug', '~> 9.0'
gem 'pry-byebug', '~> 3.3'
gem 'rubocop', '~> 0.44'
gem 'rspec-rails', '~> 3.5'
gem 'rubocop', '~> 0.46'
end

group :development do
gem 'listen', '~> 3.0.5'
gem 'pry-rails', '~> 0.3.4'
gem 'spring', '~> 1.6'
gem 'spring-commands-rspec', '~> 1.0'
end

group :test do
gem 'rspec-rails', '~> 3.5'
gem 'rspec', '~> 3.5'
group :production do
gem 'rails_12factor', '~> 0.0.3'
end
@@ -1,68 +1,75 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
actioncable (5.0.1)
actionpack (= 5.0.1)
nio4r (~> 1.2)
websocket-driver (~> 0.6.1)
actionmailer (5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.7.1)
actionview (= 4.2.7.1)
activesupport (= 4.2.7.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-dom-testing (~> 2.0)
actionpack (5.0.1)
actionview (= 5.0.1)
activesupport (= 5.0.1)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (4.2.7.1)
activesupport (= 4.2.7.1)
actionview (5.0.1)
activesupport (= 5.0.1)
builder (~> 3.1)
erubis (~> 2.7.0)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
active_model_serializers (0.10.2)
active_model_serializers (0.10.4)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
jsonapi (~> 0.1.1.beta2)
railties (>= 4.1, < 6)
activejob (4.2.7.1)
activesupport (= 4.2.7.1)
globalid (>= 0.3.0)
activemodel (4.2.7.1)
activesupport (= 4.2.7.1)
builder (~> 3.1)
activerecord (4.2.7.1)
activemodel (= 4.2.7.1)
activesupport (= 4.2.7.1)
arel (~> 6.0)
activesupport (4.2.7.1)
case_transform (>= 0.2)
jsonapi (= 0.1.1.beta6)
activejob (5.0.1)
activesupport (= 5.0.1)
globalid (>= 0.3.6)
activemodel (5.0.1)
activesupport (= 5.0.1)
activerecord (5.0.1)
activemodel (= 5.0.1)
activesupport (= 5.0.1)
arel (~> 7.0)
activesupport (5.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
arel (7.1.4)
ast (2.3.0)
bcrypt (3.1.11)
builder (3.2.2)
builder (3.2.3)
byebug (9.0.6)
case_transform (0.2)
activesupport
coderay (1.1.1)
concurrent-ruby (1.0.2)
diff-lcs (1.2.5)
dotenv (2.1.1)
dotenv-rails (2.1.1)
dotenv (= 2.1.1)
railties (>= 4.0, < 5.1)
concurrent-ruby (1.0.4)
diff-lcs (1.3)
dotenv (2.2.0)
dotenv-rails (2.2.0)
dotenv (= 2.2.0)
railties (>= 3.2, < 5.1)
erubis (2.7.0)
ffi (1.9.17)
globalid (0.3.7)
activesupport (>= 4.1.0)
i18n (0.7.0)
json (1.8.3)
jsonapi (0.1.1.beta6)
jsonapi-parser (= 0.1.1.beta3)
jsonapi-renderer (= 0.1.1.beta1)
jsonapi-parser (0.1.1.beta3)
jsonapi-renderer (0.1.1.beta1)
listen (3.0.8)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
@@ -72,64 +79,61 @@ GEM
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.9.1)
nokogiri (1.6.8.1)
minitest (5.10.1)
nio4r (1.2.1)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
parser (2.3.1.4)
parser (2.3.3.1)
ast (~> 2.2)
pg (0.19.0)
powerpack (0.1.1)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.4.0)
pry-byebug (3.4.2)
byebug (~> 9.0)
pry (~> 0.10)
pry-rails (0.3.4)
pry (>= 0.9.10)
rack (1.6.4)
puma (3.7.0)
rack (2.0.1)
rack-cors (0.4.0)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.2.7.1)
actionmailer (= 4.2.7.1)
actionpack (= 4.2.7.1)
actionview (= 4.2.7.1)
activejob (= 4.2.7.1)
activemodel (= 4.2.7.1)
activerecord (= 4.2.7.1)
activesupport (= 4.2.7.1)
rails (5.0.1)
actioncable (= 5.0.1)
actionmailer (= 5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
activemodel (= 5.0.1)
activerecord (= 5.0.1)
activesupport (= 5.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.2.7.1)
sprockets-rails
rails-api (0.4.0)
actionpack (>= 3.2.11)
railties (>= 3.2.11)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
railties (= 5.0.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.5)
rails_stdout_logging (0.0.5)
railties (4.2.7.1)
actionpack (= 4.2.7.1)
activesupport (= 4.2.7.1)
railties (5.0.1)
actionpack (= 5.0.1)
activesupport (= 5.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.1.0)
rake (11.3.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rainbow (2.2.1)
rake (12.0.0)
rb-fsevent (0.9.8)
rb-inotify (0.9.8)
ffi (>= 0.5.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
@@ -147,8 +151,8 @@ GEM
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rubocop (0.44.1)
parser (>= 2.3.1.1, < 3.0)
rubocop (0.47.1)
parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
@@ -158,38 +162,41 @@ GEM
spring (1.7.2)
spring-commands-rspec (1.0.4)
spring (>= 0.9.1)
sprockets (3.7.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
thor (0.19.1)
thor (0.19.4)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
unicode-display_width (1.1.1)
unicode-display_width (1.1.3)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)

PLATFORMS
ruby

DEPENDENCIES
active_model_serializers (~> 0.10.0)
bcrypt (~> 3.1.11)
byebug (~> 9.0)
byebug
dotenv-rails (~> 2.1, >= 2.1.1)
listen (~> 3.0.5)
pg
pry (~> 0.10)
pry-byebug (~> 3.3)
pry-rails (~> 0.3.4)
puma (~> 3.0)
rack-cors
rails (~> 4.2.7.1)
rails-api
rails (~> 5.0.1)
rails_12factor (~> 0.0.3)
rspec (~> 3.5)
rspec-rails (~> 3.5)
rubocop (~> 0.44)
rubocop (~> 0.46)
spring (~> 1.6)
spring-commands-rspec (~> 1.0)

@@ -0,0 +1 @@
web: bundle exec puma -C config/puma.rb
@@ -1,6 +1,8 @@
# frozen_string_literal: true
# Add your own tasks in files placed in lib/tasks ending in .rake
# for example lib/tasks/capistrano.rake, and they will automatically be
# available to Rake.

require File.expand_path('../config/application', __FILE__)
require_relative 'config/application'

Rails.application.load_tasks
@@ -0,0 +1,5 @@
# frozen_string_literal: true
module ApplicationCable
# class Channel < ActionCable::Channel::Base
# end
end
@@ -0,0 +1,5 @@
# frozen_string_literal: true
module ApplicationCable
# class Connection < ActionCable::Connection::Base
# end
end
@@ -0,0 +1,4 @@
# frozen_string_literal: true
class ApplicationJob; end
# class ApplicationJob < ActiveJob::Base
# end
@@ -0,0 +1,6 @@
# frozen_string_literal: true
class ApplicationMailer; end
# class ApplicationMailer < ActionMailer::Base
# default from: 'from@example.com'
# layout 'mailer'
# end
@@ -0,0 +1,4 @@
# frozen_string_literal: true
class ApplicationRecord < ActiveRecord::Base
self.abstract_class = true
end
@@ -1,5 +1,5 @@
# frozen_string_literal: true
class Example < ActiveRecord::Base
class Example < ApplicationRecord
belongs_to :user
validates :text, :user, presence: true
end
@@ -1,5 +1,5 @@
# frozen_string_literal: true
class User < ActiveRecord::Base
class User < ApplicationRecord
include Authentication
has_many :examples
end
Oops, something went wrong.

0 comments on commit 5d53af7

Please sign in to comment.