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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', '5.2.0.rc2' # works with '5.1.5' |
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
| module KnapsackRSpecConfigurationPatch | |
| def before(scope = nil, *, &block) | |
| return super unless scope == :suite | |
| puts("Registering #before(:suite): #{caller.first}") | |
| KnapsackRSpecConfigurationPatch.knapsack_before_suite_hooks << block | |
| end | |
| def prepend_before(scope = nil, *, &block) |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', '~> 5.1.2' #github: 'rails/rails' |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'rails', '5.0.2' |
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 'docker' | |
| Docker.url = ENV['DOCKER_HOST'] if ENV['DOCKER_HOST'] | |
| # Manages a Kafka + Zookeeper cluster for tests via Docker. | |
| # This will expose the Kafka server on port 9093 to avoid conflicts | |
| # with port 9092. | |
| class KafkaTestCluster | |
| # We should switch this to confluent/kafka when they release a 0.9.0.1 image | |
| KAFKA_IMAGE = 'ches/kafka:0.9.0.1'.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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.2.4' |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.2.4' |
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
| begin | |
| require 'bundler/inline' | |
| rescue LoadError => e | |
| $stderr.puts 'Bundler version 1.10 or later is required. Please update your Bundler' | |
| raise e | |
| end | |
| gemfile(true) do | |
| source 'https://rubygems.org' | |
| gem 'activerecord', '4.2.4' |
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
| -- Orgs with no logins in 90 days | |
| select organizations.id, | |
| organizations.name, | |
| to_char(max(security_users.last_sign_in_at), 'MM/DD/YYYY') last_sign_at, | |
| to_char(organizations.created_at, 'MM/DD/YYYY') created_at, | |
| count(*) num_users | |
| from organizations left outer join security_users on (organizations.id = security_users.organization_id) | |
| where organizations.created_at < now() - interval '90 days' and organizations.disabled = false | |
| group by organizations.id, organizations.name | |
| having max(security_users.last_sign_in_at) is null or age(now(), max(security_users.last_sign_in_at)) > interval '90 days' |
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
| unless File.exist?('Gemfile') | |
| File.write('Gemfile', <<-GEMFILE) | |
| source 'https://rubygems.org' | |
| gem 'rails', '4.1.14.2' # '4.0.13' # '4.2.5.2' '4.1.14.2' | |
| gem 'sqlite3' | |
| GEMFILE | |
| system 'bundle' | |
| end |