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 build private_gem |
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 push --key gemstash --host http://$GEMSERVER_IP/private private_gem-0.0.1.gem |
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
| ssh gemstash@$GEMSERVER_IP | |
| cd ~/current | |
| bundle exec gemstash authorize fetch |
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
| source "https://rubygems.org" | |
| ruby "2.3.4" | |
| source 'https://$FETCH_KEY@$GEMSERVER_IP' do | |
| gem 'private_gem' | |
| 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
| # config valid only for current version of Capistrano | |
| lock "3.8.2" | |
| set :application, "gemstash" | |
| set :repo_url, "$REPO_URL" | |
| set :deploy_to, "/home/gemstash" | |
| set :format_options, command_output: true, log_file: "log/capistrano.log", color: :auto, truncate: :auto | |
| set :rvm_type, :user | |
| set :rvm_ruby_version, '2.3.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
| gem 'daemons' | |
| gem 'bunny' |
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
| #!/usr/bin/env ruby | |
| ENV['RAILS_ENV'] ||= 'development' | |
| require_relative '../config/environment' | |
| def files_to_reopen | |
| @files_to_reopen ||= [] | |
| 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
| #!/usr/bin/env ruby | |
| ENV['RAILS_ENV'] ||= 'development' | |
| require_relative '../config/environment' | |
| def files_to_reopen | |
| @files_to_reopen ||= [] | |
| 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
| Daemons.run_proc(options) do | |
| begin | |
| # NOTE: Ensure we have a database connection | |
| defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection | |
| rescue StandardError => e | |
| puts e.message | |
| puts e.backtrace | |
| 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
| def establish_active_record_connection | |
| defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection | |
| end | |
| Daemons.run_proc('rabbit_mq', multiple: false, backtrace: true, log_output: true) do | |
| begin | |
| establish_active_record_connection | |
| rescue StandardError => e | |
| puts e.message | |
| puts e.backtrace |