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
method: save unique_method_number: 4 condition: false | |
method: save unique_method_number: 4 condition: false | |
method: save unique_method_number: 4 condition: false | |
running approve_with_kudos_3 | |
running approve_with_kudos_2 | |
method: approve! unique_method_number: 2 condition: nil | |
method: approve! unique_method_number: 3 condition: true | |
method: create unique_method_number: 6 condition: false | |
method: save unique_method_number: 4 condition: false | |
running approve_with_kudos_3 |
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
alias :approve_with_kudos_2! :approve_with_kudos_2 | |
alias :approve_with_kudos_2? :approve_with_kudos_2 | |
alias_method_chain :approve!, :kudos_2 | |
alias :approve_with_kudos_3! :approve_with_kudos_3 | |
alias :approve_with_kudos_3? :approve_with_kudos_3 | |
alias_method_chain :approve!, :kudos_3 |
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 'yaml' | |
class GlobalSettings < Hash | |
# TODO: take namespace as a param and get rid of rails dependency | |
def initialize(path) | |
raise "No settings yml file found (#{path})" unless File.exists?(path) | |
settings = (YAML.load_file(path) || {})[Rails.env] || {} | |
Rails.logger.info "WARNING: No settings loaded for environment #{Rails.env}" if settings.empty? | |
update settings.symbolize_keys | |
freeze |
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 'global_settings' | |
Settings = GlobalSettings.new(File.join(Rails.root, 'config', 'settings.yml')) |
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
class Test::Unit::TestCase | |
def self.setup(&block) | |
setup_blocks << block | |
end | |
def setup | |
self.class.setup_blocks.each do |block| | |
instance_eval(&block) | |
end | |
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
require "minitest/autorun" | |
require "capybara/poltergeist" | |
# Capybara.register_driver :poltergeist do |app| | |
# Capybara::Poltergeist::Driver.new(nil, { debug: true }) | |
# end | |
Capybara.javascript_driver = :poltergeist | |
Capybara.default_driver = Capybara.javascript_driver | |
Capybara.app = lambda do |env| |
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 "minitest/autorun" | |
require "capybara/dsl" | |
require "selenium-webdriver" | |
Capybara.javascript_driver = :selenium_chrome_headless | |
Capybara.default_driver = Capybara.javascript_driver | |
Capybara.app = lambda do |env| | |
req = Rack::Request.new(env) |
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 "logger" | |
require "sequel" | |
DB = Sequel.connect ENV["DATABASE_URL"], test: true, encoding: "utf-8" | |
DB.logger = Logger.new($stdout) | |
Sequel.extension :migration | |
Sequel.migration do | |
up do |
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 "logger" | |
require "sequel" | |
DB = Sequel.connect ENV["DATABASE_URL"], test: true, encoding: "utf-8" | |
# DB.logger = Logger.new($stdout) | |
require "sequel/plugins/class_table_inheritance" | |
module Sequel | |
module Plugins | |
module ClassTableInheritance |
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
diff --git a/lib/sequel/plugins/class_table_inheritance.rb b/lib/sequel/plugins/class_table_inheritance.rb | |
index 214f50bb7..40c65d784 100644 | |
--- a/lib/sequel/plugins/class_table_inheritance.rb | |
+++ b/lib/sequel/plugins/class_table_inheritance.rb | |
@@ -198,6 +198,9 @@ module Sequel | |
# Overrides implicit table names. | |
# :ignore_subclass_columns :: Array with column names as symbols that are ignored | |
# on all sub-classes. | |
+ # :qualify_tables :: Boolean true to qualify automatically determined | |
+ # subclass tables with the same qualifier as their |
OlderNewer