Sha256: a6b6c936374962f2e5ace4ed844e1a51b9fa98b853a6bfed281d2d51dcffb825
Contents?: true
Size: 1.5 KB
Versions: 4
Compression:
Stored size: 1.5 KB
Contents
module Hobo class << self attr_accessor :project_bar_cache def relaunch! env = {} Kernel.exec(env, 'hobo', '--skip-host-checks', *$HOBO_ARGV) end def in_project? !!Hobo.project_path end def progress file, increment, total, type, opts = {} require 'ruby-progressbar' opts = { :title => File.basename(file), :total => total, :format => "%t [%B] %p%% %e" }.merge(opts) # Hack to stop newline spam on windows opts[:length] = 79 if Gem::win_platform? @progress_bar_cache ||= {} if type == :reset type = :update @progress_bar_cache.delete file end @progress_bar_cache[file] ||= ProgressBar.create(opts) case type when :update @progress_bar_cache[file].progress += increment when :finished @progress_bar_cache[file].finish end return @progress_bar_cache[file] end def aws_credentials { :access_key_id => maybe(Hobo.user_config.aws.access_key_id) || ENV['AWS_ACCESS_KEY_ID'], :secret_access_key => maybe(Hobo.user_config.aws.secret_access_key) || ENV['AWS_SECRET_ACCESS_KEY'] } end def windows? require 'rbconfig' !!(RbConfig::CONFIG['host_os'] =~ /mswin|msys|mingw|cygwin|bccwin|wince|emc/) end def system_ruby? require 'rbconfig' File.join(RbConfig::CONFIG["bindir"], RbConfig::CONFIG["ruby_install_name"]).match(/\/rvm\/|\/\.rvm\/|\/\.rbenv/) != nil end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
hobo-inviqa-0.0.15 | lib/hobo/util.rb |
hobo-inviqa-0.0.14 | lib/hobo/util.rb |
hobo-inviqa-0.0.13 | lib/hobo/util.rb |
hobo-inviqa-0.0.11 | lib/hobo/util.rb |