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
| # frozen_string_literal: true | |
| # Run this with: rake storage:migrate | |
| class ShrineFileMigrationService | |
| def self.migrate_files!(options = {}) | |
| dry_run = options[:dry_run] | |
| verbose = options[:verbose] | |
| unless Shrine.version.to_s == '2.19.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
| #!/bin/bash | |
| set -e | |
| # CI Cache Script for Google Cloud Storage | |
| # TIP: Set CI_CACHE_VERBOSE=true while testing the script | |
| # to show a list of all files that are compressed/extracted. | |
| # Note that you might see "tar: write error" if there are too many | |
| # files in the verbose output. |
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
| # ~/.bashrc | |
| # Here's a nice alert sound you can use: https://www.dropbox.com/s/ctziqfuqt5q9fek/alert.mp3?dl=0 | |
| # Find some more here: https://notificationsounds.com/notification-sounds | |
| alias alert="afplay ~/sounds/alert.mp3" | |
| function n() { | |
| local ALERT="Alert from Bash" | |
| local EXIT_CODE=0 |
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
| #!/bin/bash | |
| set -e | |
| # When running on a local machine, we need to kill the Spring loader. | |
| if [ -f .env ]; then spring stop; fi | |
| # Ensures that the Rails app can boot and pass a simple health check. | |
| export RAILS_ENV=production | |
| export PORT=4123 | |
| export DATABASE_URL=postgresql:does_not_exist |
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
| #!/bin/bash | |
| set -e | |
| # When running on a local machine, we need to kill the Spring loader. | |
| if [ -f .env ]; then spring stop; fi | |
| # Ensures that the Rails app can boot and pass a simple health check. | |
| # Also ensures that RubyEncoder is working for the enterprise image. | |
| export RAILS_ENV=production |
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
| # frozen_string_literal: true | |
| # spec/jobs/worker_health_check_job_spec.rb starts a Sidekiq worker process | |
| # and checks stdout for some expected strings. This ensures that Sidekiq | |
| # can boot without crashing, and run a real job from a Redis queue. | |
| class SidekiqHealthCheckJob | |
| include Sidekiq::Worker | |
| def perform(string) |
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
| #!/bin/bash | |
| set -e | |
| if [ -f .env ]; then spring stop; fi | |
| # This script is run in the CI build. It requires a REDIS_URL variable, | |
| # and runs a test job through the WorkerHealthCheckJob. | |
| # I added this check after I accidentally pushed a change that caused the sidekiq | |
| # workers to crash on boot. The jobs were well-tested, but the actual | |
| # sidekiq config had an error inside a #configure_server block, so the code | |
| # only crashed when I started an actual Sidekiq worker process. |
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
| #!/bin/bash | |
| set -e | |
| if [ -f .env ]; then spring stop; fi | |
| # This script is run in the CI build. It requires a REDIS_URL variable, | |
| # and runs a test job through the WorkerHealthCheckJob. | |
| # I added this check after I accidentally pushed a change that caused the sidekiq | |
| # workers to crash on boot. The jobs were well-tested, but the actual | |
| # sidekiq config had an error inside a #configure_server block, so the code | |
| # only crashed when I started an actual Sidekiq worker process. |
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
| #!/bin/bash | |
| set -e | |
| # This script is run in the CI build. It requires a REDIS_URL variable, | |
| # and runs a test job through the WorkerHealthCheckJob. | |
| # I added this check after I accidentally pushed a change that caused the sidekiq | |
| # workers to crash on boot. The jobs were well-tested, but the actual | |
| # sidekiq config had an error inside a #configure_server block, so the code | |
| # only crashed when I started an actual Sidekiq worker process. |
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
| FROM debian:stretch | |
| RUN apt-get update \ | |
| && apt-get install -y \ | |
| curl ca-certificates \ | |
| checkinstall unzip build-essential \ | |
| automake libtool libtool-bin pkg-config \ | |
| bison \ | |
| dpkg-dev \ | |
| gcc \ |