Sha256: dbe68df0a87c88119c64d74320673f7a23f42e554a0a4def93e6f265eda4a27a
Contents?: true
Size: 754 Bytes
Versions: 3
Compression:
Stored size: 754 Bytes
Contents
module AlephExecutables class Utils def self.fail(msg, banner = nil) msg += "\n#{banner}" if banner puts msg; exit(false) end def self.inform(msg, banner = nil) msg += "\n#{banner}" if banner puts msg; exit(true) end def self.get_env_file(rails_env) !rails_env || (rails_env == 'development') ? '.env' : ".env.#{rails_env}" end def self.bundle_exec_with_clean_env(cmd_suffix, envs = nil) cmd = 'bundle exec ' + cmd_suffix if envs env_str = envs.reject{ |k, v| !v }.map{ |k, v| "#{k.to_s.upcase}=#{v}" }.join(' ') cmd = env_str + ' ' + cmd end puts "Running #{cmd} ... " Bundler.with_clean_env { system cmd } end end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
aleph_analytics-0.0.2 | bin/executables/lib/utils.rb |
aleph_analytics-0.0.1.alpha | bin/executables/lib/utils.rb |
aleph_analytics-0.0.0.alpha | bin/executables/lib/utils.rb |