Skip to content

Commit

Permalink
Merge branch 'feature/update_rails_ruby'
Browse files Browse the repository at this point in the history
* feature/update_rails_ruby:
  Fix capistrano files
  Update to rails 4.2.0 Update to ruby 2.2.0 Update gems
  • Loading branch information
Gustavo Cunha committed Jan 5, 2015
2 parents 5f23f9e + 7c9e60b commit e62cc86
Show file tree
Hide file tree
Showing 15 changed files with 189 additions and 107 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ config/database.yml

## Environment normalisation:
/.bundle
/.capistrano
/vendor/bundle

# these should all be checked in to normalise the environment:
Expand Down
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 4.1.6'
gem 'rails', '~> 4.2.0'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
# Use Uglifier as compressor for JavaScript assets
Expand Down
143 changes: 85 additions & 58 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,35 +1,44 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.6)
actionpack (= 4.1.6)
actionview (= 4.1.6)
actionmailer (4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.6)
actionview (= 4.1.6)
activesupport (= 4.1.6)
rack (~> 1.5.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.0)
actionview (= 4.2.0)
activesupport (= 4.2.0)
rack (~> 1.6.0)
rack-test (~> 0.6.2)
actionview (4.1.6)
activesupport (= 4.1.6)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.6)
activesupport (= 4.1.6)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.0)
activesupport (= 4.2.0)
globalid (>= 0.3.0)
activemodel (4.2.0)
activesupport (= 4.2.0)
builder (~> 3.1)
activerecord (4.1.6)
activemodel (= 4.1.6)
activesupport (= 4.1.6)
arel (~> 5.0.0)
activesupport (4.1.6)
i18n (~> 0.6, >= 0.6.9)
activerecord (4.2.0)
activemodel (= 4.2.0)
activesupport (= 4.2.0)
arel (~> 6.0)
activesupport (4.2.0)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (5.0.1.20140414130214)
arel (6.0.0)
bcrypt (3.1.9)
brakeman (2.6.3)
brakeman (3.0.0)
erubis (~> 2.6)
fastercsv (~> 1.5)
haml (>= 3.0, < 5.0)
Expand All @@ -41,7 +50,8 @@ GEM
slim (>= 1.3.6, < 3.0)
terminal-table (~> 1.4)
builder (3.2.2)
capistrano (3.2.1)
capistrano (3.3.5)
capistrano-stats (~> 1.1.0)
i18n
rake (>= 10.0.0)
sshkit (~> 1.3)
Expand All @@ -54,72 +64,89 @@ GEM
capistrano-rvm (0.1.2)
capistrano (~> 3.0)
sshkit (~> 1.2)
capistrano-stats (1.1.1)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.3.0)
coffee-script-source
execjs
coffee-script-source (1.8.0)
colorize (0.7.3)
colorize (0.7.5)
daemon_controller (1.2.0)
erubis (2.7.0)
execjs (2.2.2)
fastercsv (1.5.5)
haml (4.0.5)
globalid (0.3.0)
activesupport (>= 4.1.0)
haml (4.0.6)
tilt
highline (1.6.21)
hike (1.2.3)
i18n (0.6.11)
jquery-rails (3.1.2)
railties (>= 3.0, < 5.0)
i18n (0.7.0)
jquery-rails (4.0.3)
rails-dom-testing (~> 1.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (1.8.1)
mail (2.6.1)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
mime-types (2.4.3)
minitest (5.4.2)
mini_portile (0.6.2)
minitest (5.5.0)
multi_json (1.10.1)
net-scp (1.2.1)
net-ssh (>= 2.6.5)
net-ssh (2.9.1)
passenger (4.0.53)
nokogiri (1.6.5)
mini_portile (~> 0.6.0)
passenger (4.0.57)
daemon_controller (>= 1.2.0)
rack
rake (>= 0.8.1)
quiet_assets (1.0.3)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack (1.6.0)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.1.6)
actionmailer (= 4.1.6)
actionpack (= 4.1.6)
actionview (= 4.1.6)
activemodel (= 4.1.6)
activerecord (= 4.1.6)
activesupport (= 4.1.6)
rails (4.2.0)
actionmailer (= 4.2.0)
actionpack (= 4.2.0)
actionview (= 4.2.0)
activejob (= 4.2.0)
activemodel (= 4.2.0)
activerecord (= 4.2.0)
activesupport (= 4.2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.6)
sprockets-rails (~> 2.0)
railties (4.1.6)
actionpack (= 4.1.6)
activesupport (= 4.1.6)
railties (= 4.2.0)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.5)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.1)
loofah (~> 2.0)
railties (4.2.0)
actionpack (= 4.2.0)
activesupport (= 4.2.0)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (10.3.2)
rdoc (4.1.2)
json (~> 1.4)
rake (10.4.2)
rdoc (4.2.0)
ruby2ruby (2.1.3)
ruby_parser (~> 3.1)
sexp_processor (~> 4.0)
ruby_parser (3.5.0)
sexp_processor (~> 4.1)
sass (3.2.19)
sass-rails (4.0.3)
sass-rails (4.0.5)
railties (>= 4.0.0, < 5.0)
sass (~> 3.2.0)
sprockets (~> 2.8, <= 2.11.0)
sass (~> 3.2.2)
sprockets (~> 2.8, < 3.0)
sprockets-rails (~> 2.0)
sdoc (0.4.1)
json (~> 1.7, >= 1.7.7)
Expand All @@ -128,30 +155,30 @@ GEM
slim (2.1.0)
temple (~> 0.6.9)
tilt (>= 1.3.3, < 2.1)
spring (1.1.3)
sprockets (2.11.0)
spring (1.2.0)
sprockets (2.12.3)
hike (~> 1.2)
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.2.0)
sprockets-rails (2.2.2)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (>= 2.8, < 4.0)
sshkit (1.5.1)
colorize
sshkit (1.6.1)
colorize (>= 0.7.0)
net-scp (>= 1.1.2)
net-ssh (>= 2.8.0)
temple (0.6.9)
temple (0.6.10)
terminal-table (1.4.5)
thor (0.19.1)
thread_safe (0.3.4)
tilt (1.4.1)
turbolinks (2.4.0)
turbolinks (2.5.3)
coffee-rails
tzinfo (1.2.2)
thread_safe (~> 0.1)
uglifier (2.5.3)
uglifier (2.6.1)
execjs (>= 0.3.0)
json (>= 1.8.0)

Expand All @@ -169,7 +196,7 @@ DEPENDENCIES
jquery-rails
passenger
quiet_assets
rails (~> 4.1.6)
rails (~> 4.2.0)
sass-rails (~> 4.0.3)
sdoc (~> 0.4.0)
spring
Expand Down
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env ruby
APP_PATH = File.expand_path('../../config/application', __FILE__)
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
29 changes: 29 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#!/usr/bin/env ruby
require 'pathname'

# path to your application root.
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)

Dir.chdir APP_ROOT do
# This script is a starting point to setup your application.
# Add necessary setup steps to this file:

puts "== Installing dependencies =="
system "gem install bundler --conservative"
system "bundle check || bundle install"

# puts "\n== Copying sample files =="
# unless File.exist?("config/database.yml")
# system "cp config/database.yml.sample config/database.yml"
# end

puts "\n== Preparing database =="
system "bin/rake db:setup"

puts "\n== Removing old logs and tempfiles =="
system "rm -f log/*"
system "rm -rf tmp/cache"

puts "\n== Restarting application server =="
system "touch tmp/restart.txt"
end
10 changes: 6 additions & 4 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
require File.expand_path('../boot', __FILE__)

# Pick the frameworks you want:
# require 'rails/all'
require "active_model/railtie"
# require "active_record/railtie"
require "action_controller/railtie"
require "action_mailer/railtie"
require "action_view/railtie"
require "sprockets/railtie"
require "action_mailer/railtie"
require "active_job/railtie"
require "rails/test_unit/railtie"
require "sprockets/railtie"

# Require the gems listed in Gemfile, including any gems
# you've limited to :test, :development, or :production.
Expand All @@ -27,5 +26,8 @@ class Application < Rails::Application
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de

# Do not swallow errors in after_commit/after_rollback callbacks.
# config.active_record.raise_in_transactional_callbacks = true
end
end
3 changes: 1 addition & 2 deletions config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# Set up gems listed in the Gemfile.
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)

require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
require 'bundler/setup' # Set up gems listed in the Gemfile.
4 changes: 2 additions & 2 deletions config/deploy.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# config valid only for Capistrano 3.1
lock '3.2.1'
lock '3.3.5'

set :application, 'gmmcal.com.br'
set :repo_url, '[email protected]:gmmcal/gmmcal.com.br.git'
set :base_path, "/var/www/rails/gmmcal.com.br"
set :ruby_version, "2.1.2"
set :ruby_version, "2.2.0"
set :ruby_gemset, "gmmcal.com.br"
ask :user, "root"
ask :server, "example.com"
Expand Down
7 changes: 7 additions & 0 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,18 @@
# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

# Raise an error on page load if there are pending migrations.
# config.active_record.migration_error = :page_load

# Debug mode disables concatenation and preprocessing of assets.
# This option may cause significant delays in view rendering with a large
# number of complex assets.
config.assets.debug = true

# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config.assets.digest = true

# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
Expand Down
Loading

0 comments on commit e62cc86

Please sign in to comment.