Skip to content
This repository has been archived by the owner on Dec 17, 2017. It is now read-only.

Commit

Permalink
Merge pull request #39 from anchor/efficiency_changes
Browse files Browse the repository at this point in the history
Efficiency changes
  • Loading branch information
glasnt committed Aug 5, 2014
2 parents 4660a63 + 4b39d9b commit 87a930e
Show file tree
Hide file tree
Showing 95 changed files with 935 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
1.9.3-p448
2.1.0
1 change: 1 addition & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
language: ruby
rvm:
- "2.1.0"
- "1.9.3"
services: redis-server
env:
Expand Down
8 changes: 3 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,11 @@ gem 'rails_config'
gem 'therubyracer'
gem 'sass-rails'
gem 'uglifier'
gem 'coffee-rails'

gem 'gon'
gem 'color'
gem 'redis'

gem 'coveralls', require: false, group: :test
gem 'simplecov', '~> 0.7.1'
gem 'sinatra'

gem "git-version-bump"

group :production do
Expand All @@ -31,6 +26,9 @@ group :development do
gem "rspec-rails"
gem "selenium-webdriver"
gem "sinatra-reloader"
gem 'coveralls', require: false
gem 'simplecov', '~> 0.7.1'
gem 'sinatra'
end

group :debugging do
Expand Down
8 changes: 0 additions & 8 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -49,13 +49,6 @@ GEM
childprocess (0.5.3)
ffi (~> 1.0, >= 1.0.11)
coderay (1.1.0)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.7.0)
color (1.7)
columnize (0.8.9)
coveralls (0.7.0)
Expand Down Expand Up @@ -257,7 +250,6 @@ DEPENDENCIES
binding_of_caller
capybara
capybara-webkit
coffee-rails
color
coveralls
git-version-bump
Expand Down
Binary file removed app/assets/images/logo.png
Binary file not shown.
Binary file removed app/assets/images/tooltip.png
Binary file not shown.
Binary file removed app/assets/images/waiting.gif
Binary file not shown.
2 changes: 1 addition & 1 deletion app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
// about supported directives.
//
//= require jquery-1.10.2.min
//= require jquery-ui.1.10.3.min
//= require jquery-ui.min
//= require bootstrap.min
//= require sb-admin
//= require jquery.metisMenu
Expand Down
6 changes: 2 additions & 4 deletions app/views/graphs/stacked.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<%= javascript_include_tag "rickshaw" %>
<%= stylesheet_link_tag "graphs/stacked" %>
<script src="/assets/graphs/stacked.js"></script>
<% if dckx %>
<%= stylesheet_link_tag "graphs/dckx" %>
<%end%>
<%= javascript_include_tag "graphs/stacked.js" %>
<%= stylesheet_link_tag "graphs/dckx" if dckx %>
<div class="slider" id="slider"></div>
<span id="zoomtoselected" class="no_link zoomtoselected"></span>
<div id="chart_container">
Expand Down
2 changes: 1 addition & 1 deletion app/views/graphs/standard.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<%= javascript_include_tag "rickshaw" %>
<%= stylesheet_link_tag "graphs/standard" %>
<%= javascript_include_tag "graphs/standard" %>
<%= include_gon %>

<script src="/assets/graphs/standard.js"></script>
<script>
var color = [];
var palette = new Rickshaw.Color.Palette({scheme: "munin"});
Expand Down
2 changes: 0 additions & 2 deletions config/application.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
require File.expand_path('../boot', __FILE__)

# Pick the frameworks you want:
require "action_controller/railtie"
require "action_mailer/railtie"
require "sprockets/railtie"


Expand Down
3 changes: 0 additions & 3 deletions config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,6 @@
config.consider_all_requests_local = true
config.action_controller.perform_caching = false

# Don't care if the mailer can't send.
config.action_mailer.raise_delivery_errors = false

# Print deprecation notices to the Rails logger.
config.active_support.deprecation = :log

Expand Down
17 changes: 7 additions & 10 deletions config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,22 +12,22 @@

# Full error reports are disabled and caching is turned on.
config.consider_all_requests_local = false
config.action_controller.perform_caching = true
#config.action_controller.perform_caching = true

# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like nginx, varnish or squid.
# config.action_dispatch.rack_cache = true

# Disable Rails's static asset server (Apache or nginx will already do this).
config.serve_static_assets = false
config.serve_static_assets = true

# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
# config.assets.css_compressor = :sass
config.assets.css_compressor = :sass

# Do not fallback to assets pipeline if a precompiled asset is missed.
config.assets.compile = true #false
config.assets.compile = false

# Generate digests for assets URLs.
config.assets.digest = true
Expand Down Expand Up @@ -59,15 +59,12 @@

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
# config.assets.precompile += %w( search.js )

# Ignore bad email addresses and do not raise email delivery errors.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
# config.action_mailer.raise_delivery_errors = false
config.assets.precompile += %w( *.js *.css )
config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/

# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
# the I18n.default_locale when a translation can not be found).
config.i18n.fallbacks = true
# config.i18n.fallbacks = true

# Send deprecation notices to registered listeners.
config.active_support.deprecation = :notify
Expand Down
24 changes: 15 additions & 9 deletions config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
# 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
config.static_cache_control = "public, max-age=3600"

# Show full error reports and disable caching.
config.consider_all_requests_local = true
config.action_controller.perform_caching = false
Expand All @@ -26,11 +22,21 @@
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false

# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

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

# Copy Production Configurations to do with Compilation of Assets
config.assets.digest = true
config.assets.compile = false
config.serve_static_assets = true

# Precompile additional assets.
# application.js, application.css, and all non-JS/CSS in app/assets folder are already added.
config.assets.precompile += %w( *.js *.css )
config.assets.precompile << /\.(?:svg|eot|woff|ttf)\z/

# Compress JavaScripts and CSS.
config.assets.js_compressor = :uglifier
config.assets.css_compressor = :sass

end
5 changes: 0 additions & 5 deletions config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,6 @@
# Disable request forgery protection in test environment.
config.action_controller.allow_forgery_protection = false

# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
config.action_mailer.delivery_method = :test

# Print deprecation notices to the stderr.
config.active_support.deprecation = :stderr
end
9 changes: 5 additions & 4 deletions config/hooks/start
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,11 @@ echo "Installing gems..."
chruby-exec "$(cat .ruby-version)" -- bundle install --deployment --without 'development test'


if [ ${APP_ENV} = 'production' ]; then
echo "Precompiling site assets..."
chruby-exec "$(cat .ruby-version)" -- bundle exec rake assets:precompile
fi
#if [ ${APP_ENV} = 'production' ]; then
# date
# echo "Precompiling site assets..."
# chruby-exec "$(cat .ruby-version)" -- RAILS_ENV=${APP_ENV} bundle exec rake assets:precompile
#fi

sudo allah start machiavelli_${APP_ENV}_unicorn

Expand Down
Loading

0 comments on commit 87a930e

Please sign in to comment.