This file contains hidden or 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
| #longest actions (total) | |
| grep "Completed 200 OK in" log/production.log | cut -d' ' -f 5 | grep '[0-9.]*' -o | sort -n | |
| #longest actions (view) | |
| # grep "Completed 200 OK in" log/production.log | cut -d' ' -f 7 | grep '[0-9.]*' -o | sort -n | |
| # longest actions (database) |
This file contains hidden or 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
| require File.expand_path('../boot', __FILE__) | |
| require 'rails/all' | |
| if defined?(Bundler) | |
| # If you precompile assets before deploying to production, use this line | |
| Bundler.require(*Rails.groups(:assets => %w(development test))) | |
| # If you want your assets lazily compiled in production, use this line | |
| # Bundler.require(:default, :assets, Rails.env) | |
| end |
This file contains hidden or 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
| bqimac:apartment[master]$ bundle exec rake spec | |
| (in /Users/briandquinn/Development/apartment) | |
| /Users/briandquinn/.rvm/rubies/ruby-1.9.2-p290/bin/ruby -S bundle exec rspec spec/adapters/mysql_adapter_spec.rb spec/adapters/postgresql_adapter_spec.rb spec/apartment_spec.rb spec/integration/apartment_rake_integration_spec.rb spec/integration/database_integration_spec.rb spec/integration/delayed_job_integration_spec.rb spec/integration/middleware/subdomain_elevator_spec.rb spec/tasks/apartment_rake_spec.rb spec/unit/config_spec.rb spec/unit/middleware/subdomain_elevator_spec.rb spec/unit/migrator_spec.rb spec/unit/reloader_spec.rb | |
| /Users/briandquinn/.rvm/gems/ruby-1.9.2-p290/gems/rack-1.3.4/lib/rack/backports/uri/common_192.rb:53: warning: already initialized constant WFKV_ | |
| Apartment::Adapters::MysqlAdapter | |
| using databases | |
| #create | |
| DEPRECATION WARNING: Arel::Visitors::VISITORS is deprecated and will be removed. Database adapters should define a visitor_for method which returns the appropriate visitor for the |
This file contains hidden or 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
| describe "States" do | |
| before(:each) do | |
| visit admin_path | |
| click_link "Configuration" | |
| end | |
| context "admin visiting states listing" do | |
| it "should correctly display the states" do | |
| Factory(:state, :name => "Maryland", :abbr => "MD", :country => Factory(:country)) |
This file contains hidden or 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
| gem 'deface', :git => 'git://github.com/railsdog/deface.git', :ref => '881e6d09f292a58d929abc19feac5ef2f8d87b70' |
This file contains hidden or 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
| surround :body, :for => 'layouts/spree_application', :name => 'wrap_body' do | |
| %Q{<div class="wrapper"> | |
| <div class="w1"> | |
| <div class="w2"> | |
| <div class="w3"> | |
| <div class="main"> | |
| <div id="header"> | |
| <h1><a href="http://depts.washington.edu/uwc4c/">University of Washington Center for Commercialization</a></h1><a href="http://www.washington.edu/" class="ad-w">UW</a> | |
| </div> | |
| <%= render_original %> |
This file contains hidden or 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
| ruby-1.9.2-p290 :001 > Spree::Product.search({:name_in => "Shirt"}).relation | |
| Spree::Product Load (18.3ms) SELECT "spree_products".* FROM "spree_products" WHERE "spree_products"."name" IN ('Shirt') | |
| => [] |
This file contains hidden or 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
| def connect_to_new(database) | |
| klass_name = database.underscore.classify | |
| # define class for each database so we get connection pool usage | |
| unless (Module.const_get(klass_name) rescue false) | |
| klass = Class.new(ActiveRecord::Base) | |
| Object.const_set klass_name, klass | |
| # only establish connection once | |
| end |
This file contains hidden or 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
| max_connections = 5000 | |
| wait_timeout = 600 |
This file contains hidden or 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
| export RUBY_HEAP_MIN_SLOTS=800000 | |
| export RUBY_HEAP_SLOTS_INCREMENT=300000 | |
| export RUBY_HEAP_SLOTS_GROWTH_FACTOR=1 | |
| export RUBY_GC_MALLOC_LIMIT=80000000 | |
| export RUBY_HEAP_FREE_MIN=100000 |