Last active
August 29, 2015 14:16
-
-
Save amireh/09f9ce74f8f2ba85c64c to your computer and use it in GitHub Desktop.
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 | |
begin | |
load File.expand_path("../spring", __FILE__) | |
require "bundler/setup" | |
load Gem.bin_path("bridge_cli", "bridge_cli") | |
rescue LoadError | |
# no spring, we'll run the command directly | |
root = File.join(File.expand_path(File.dirname(__FILE__)), '..') | |
require File.join(root, 'config/environment.rb') | |
require File.join(root, 'config/boot.rb') | |
require_dependency "bridge_cli" | |
::Account.find_by(database: ENV["BRIDGE_CLI_DB"] || "bridge").use_tenant | |
::BridgeCLI::Base.start(ARGV) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment