This file contains 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
namespace :heroku do | |
desc "generate GC settings" | |
task gc: [:environment] do | |
# https://discussion.heroku.com/t/tuning-rgengc-2-1-on-heroku/359/6 | |
# http://tmm1.net/ruby21-rgengc/ | |
# http://thorstenball.com/blog/2014/03/12/watching-understanding-ruby-2.1-garbage-collector/ | |
# http://collectiveidea.com/blog/archives/2015/02/19/optimizing-rails-for-memory-usage-part-1-before-you-optimize/ | |
settings = { | |
RUBY_GC_HEAP_FREE_SLOTS: 600000, # default is 4096, | |
RUBY_GC_HEAP_GROWTH_FACTOR: 1.25, # default is 1.8, |
This file contains 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
@javascript | |
Scenario: confiming when saving inactive | |
Given I expect to click "OK" on a confirmation box saying "Are you sure?" | |
When I press "Save" | |
Then the confirmation box should have been displayed | |
And I should see "TV" in the "Campaign Keywords" section |
This file contains 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
namespace :indexes do | |
desc "List unindexed foreign keys" | |
task :unindexed_foreign_keys => :environment do | |
ActiveRecord::Base.logger = Logger.new('/dev/null') | |
missing_indexes = {} | |
connection = ActiveRecord::Base.connection | |
connection.tables.collect do |table| |