Skip to content

Commit

Permalink
Merge 31c04bf into 09a45cb
Browse files Browse the repository at this point in the history
  • Loading branch information
monfresh committed Mar 26, 2015
2 parents 09a45cb + 31c04bf commit ca392a1
Show file tree
Hide file tree
Showing 18 changed files with 123 additions and 61 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

# Ignore all logfiles and tempfiles.
/log/*
!/log/.keep
/tmp/*

# Ignore sass files
Expand Down
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.1.5
2.2.1
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ cache: bundler
sudo: false
script: bundle exec rspec
rvm:
- 2.1.5
- 2.2.1
deploy:
provider: heroku
app: ohana-staging
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
source 'https://rubygems.org'

ruby '2.1.5'
gem 'rails', '~> 4.1.4'
ruby '2.2.1'
gem 'rails', '~> 4.2'

# FRONT END

Expand Down
88 changes: 55 additions & 33 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,34 +1,43 @@
GEM
remote: https://rubygems.org/
specs:
actionmailer (4.1.9)
actionpack (= 4.1.9)
actionview (= 4.1.9)
actionmailer (4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
mail (~> 2.5, >= 2.5.4)
actionpack (4.1.9)
actionview (= 4.1.9)
activesupport (= 4.1.9)
rack (~> 1.5.2)
rails-dom-testing (~> 1.0, >= 1.0.5)
actionpack (4.2.1)
actionview (= 4.2.1)
activesupport (= 4.2.1)
rack (~> 1.6)
rack-test (~> 0.6.2)
actionview (4.1.9)
activesupport (= 4.1.9)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
actionview (4.2.1)
activesupport (= 4.2.1)
builder (~> 3.1)
erubis (~> 2.7.0)
activemodel (4.1.9)
activesupport (= 4.1.9)
rails-dom-testing (~> 1.0, >= 1.0.5)
rails-html-sanitizer (~> 1.0, >= 1.0.1)
activejob (4.2.1)
activesupport (= 4.2.1)
globalid (>= 0.3.0)
activemodel (4.2.1)
activesupport (= 4.2.1)
builder (~> 3.1)
activerecord (4.1.9)
activemodel (= 4.1.9)
activesupport (= 4.1.9)
arel (~> 5.0.0)
activesupport (4.1.9)
i18n (~> 0.6, >= 0.6.9)
activerecord (4.2.1)
activemodel (= 4.2.1)
activesupport (= 4.2.1)
arel (~> 6.0)
activesupport (4.2.1)
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)
addressable (2.3.7)
arel (5.0.1.20140414130214)
arel (6.0.0)
ast (2.0.0)
astrolabe (1.3.0)
parser (>= 2.2.0.pre.3, < 3.0)
Expand Down Expand Up @@ -97,6 +106,8 @@ GEM
thor (~> 0.14)
font-awesome-rails (4.3.0.0)
railties (>= 3.2, < 5.0)
globalid (0.3.3)
activesupport (>= 4.1.0)
google-api-client (0.8.3)
activesupport (>= 3.2)
addressable (~> 2.3)
Expand Down Expand Up @@ -159,6 +170,8 @@ GEM
logging (1.8.2)
little-plugger (>= 1.1.3)
multi_json (>= 1.8.4)
loofah (2.0.1)
nokogiri (>= 1.5.9)
mail (2.6.3)
mime-types (>= 1.16, < 3)
memcachier (0.0.2)
Expand Down Expand Up @@ -186,30 +199,39 @@ GEM
rack (>= 1.1, < 2.0)
quiet_assets (1.1.0)
railties (>= 3.1, < 5.0)
rack (1.5.2)
rack (1.6.0)
rack-cache (1.2)
rack (>= 0.4)
rack-rewrite (1.5.1)
rack-test (0.6.3)
rack (>= 1.0)
rails (4.1.9)
actionmailer (= 4.1.9)
actionpack (= 4.1.9)
actionview (= 4.1.9)
activemodel (= 4.1.9)
activerecord (= 4.1.9)
activesupport (= 4.1.9)
rails (4.2.1)
actionmailer (= 4.2.1)
actionpack (= 4.2.1)
actionview (= 4.2.1)
activejob (= 4.2.1)
activemodel (= 4.2.1)
activerecord (= 4.2.1)
activesupport (= 4.2.1)
bundler (>= 1.3.0, < 2.0)
railties (= 4.1.9)
sprockets-rails (~> 2.0)
railties (= 4.2.1)
sprockets-rails
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.6)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.2)
loofah (~> 2.0)
rails_12factor (0.0.3)
rails_serve_static_assets
rails_stdout_logging
rails_serve_static_assets (0.0.2)
rails_stdout_logging (0.0.3)
railties (4.1.9)
actionpack (= 4.1.9)
activesupport (= 4.1.9)
railties (4.2.1)
actionpack (= 4.2.1)
activesupport (= 4.2.1)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rainbow (2.0.0)
Expand Down Expand Up @@ -349,7 +371,7 @@ DEPENDENCIES
quiet_assets
rack-cache (~> 1.2)
rack-rewrite (~> 1.5.0)
rails (~> 4.1.4)
rails (~> 4.2)
rails_12factor
requirejs-rails (~> 0.9.2)
rspec-rails (~> 3.1)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ You can see a running version of the application at

## Stack Overview

* Ruby version 2.1.5
* Rails version 4.1.8
* Ruby version 2.2.1
* Rails version 4.2.1
* Template Engines: ERB and HAML
* Testing Frameworks: RSpec, Capybara, Poltergeist

Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
* include all the files listed below.
*
* Any CSS and SCSS file within this directory, lib/assets/stylesheets,
* vendor/assets/stylesheets, or vendor/assets/stylesheets of plugins, if any,
* can be referenced here using a relative path.
* vendor/assets/stylesheets, or any plugin's vendor/assets/stylesheets
* directory can be referenced here using a relative path.
*
* You're free to add application-wide styles to this file and they'll appear
* at the bottom of the compiled file so the styles you add here take
Expand Down
4 changes: 1 addition & 3 deletions app/controllers/about_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
class AboutController < ApplicationController
respond_to :html, :json

def index
# Send an email based on the contents of the feedback form when submitted.
FeedbackMailer.feedback_email(params).deliver if request.xhr?
FeedbackMailer.feedback_email(params).deliver_now if request.xhr?

respond_to do |format|
# JSON response is for the feedback form.
Expand Down
2 changes: 1 addition & 1 deletion bin/rails
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ begin
load File.expand_path("../spring", __FILE__)
rescue LoadError
end
APP_PATH = File.expand_path('../../config/application', __FILE__)
APP_PATH = File.expand_path('../../config/application', __FILE__)
require_relative '../config/boot'
require 'rails/commands'
27 changes: 27 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/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 "\n== Copying sample files =="
unless File.exist?('config/application.yml')
puts '== Copying application.example.yml to application.yml =='
system 'cp config/application.example.yml config/application.yml'
end

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

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
2 changes: 1 addition & 1 deletion config.ru
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 Rails.application
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,8 @@ class Application < Rails::Application
# Note that Google Chrome Frame was retired in Jan. 2014, so this is only for legacy systems.
# More info at http://blog.chromium.org/2013/06/retiring-chrome-frame.html
config.action_dispatch.default_headers = { 'X-UA-Compatible' => 'IE=edge,chrome=1' }

# Do not swallow errors in after_commit/after_rollback callbacks.
# config.active_record.raise_in_transactional_callbacks = true
end
end
2 changes: 1 addition & 1 deletion config/boot.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# 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.
8 changes: 7 additions & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,10 @@
# 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 All @@ -65,5 +69,7 @@
# Raises error for missing translations
config.action_view.raise_on_missing_translations = true

config.assets.prefix = '/dev-assets'
# Uncomment this if you want to precompile assets locally.
# http://guides.rubyonrails.org/asset_pipeline.html#local-precompilation
# config.assets.prefix = '/dev-assets'
end
17 changes: 8 additions & 9 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,8 @@

config.serve_static_assets = true

# Generate digests for assets URLs.
# 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

config.action_controller.perform_caching = true
Expand Down Expand Up @@ -130,14 +131,15 @@
# config.assets.manifest = YOUR_PATH

# Specifies the header that your server uses for sending files.
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX

# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true

# Set to :debug to see everything in the log.
# config.log_level = :info
# Use the lowest log level to ensure availability of diagnostic information
# when problems arise.
config.log_level = :debug

# Prepend all log lines with the following tags.
# config.log_tags = [ :subdomain, :uuid ]
Expand All @@ -146,7 +148,7 @@
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = "http://assets.example.com"
# config.action_controller.asset_host = 'http://assets.example.com'

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation cannot be found).
Expand All @@ -155,9 +157,6 @@
# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify

# Disable automatic flushing of the log to improve performance.
# config.autoflush_log = false

# Use default logging formatter so that PID and timestamp are not suppressed.
config.log_formatter = ::Logger::Formatter.new
end
7 changes: 5 additions & 2 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
# preloads Rails for running tests, you may have to set it to true.
config.eager_load = false

# Configure static asset server for tests with Cache-Control for performance.
config.serve_static_assets = true
# Configure static file server for tests with Cache-Control for performance.
config.serve_static_files = true
config.static_cache_control = 'public, max-age=3600'

# Show full error reports and disable caching.
Expand All @@ -31,6 +31,9 @@
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

# Randomize the order test cases are executed.
config.active_support.test_order = :random

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr

Expand Down
3 changes: 3 additions & 0 deletions config/initializers/assets.rb
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
# Version of your assets, change this if you want to expire all your assets.
Rails.application.config.assets.version = '1.2'

# Add additional assets to the asset load path
# Rails.application.config.assets.paths << Emoji.images_path

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are
# already added.
Expand Down
4 changes: 2 additions & 2 deletions spec/mailers/feedback_mailer_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
from: 'tester@mctester.com',
agent: 'Mozilla/5.0'
}
@email = FeedbackMailer.feedback_email(@params).deliver
@email = FeedbackMailer.feedback_email(@params).deliver_now
end

it 'is delivered to the default email address(es)' do
Expand Down Expand Up @@ -41,7 +41,7 @@
@params = {
message: 'no email address'
}
@email = FeedbackMailer.feedback_email(@params).deliver
@email = FeedbackMailer.feedback_email(@params).deliver_now
end

it 'is delivered to the default email address(es)' do
Expand Down

0 comments on commit ca392a1

Please sign in to comment.