Module: NewlineHw

Defined in:
lib/newline_hw.rb,
lib/newline_hw/api.rb,
lib/newline_hw/cli.rb,
lib/newline_hw/token.rb,
lib/newline_hw/config.rb,
lib/newline_hw/errors.rb,
lib/newline_hw/version.rb,
lib/newline_hw/shell/run.rb,
lib/newline_hw/gui_trigger.rb,
lib/newline_hw/shell/setup.rb,
lib/newline_hw/shell/function.rb,
lib/newline_hw/chrome_manifest.rb,
lib/newline_hw/stream_processor.rb,
lib/newline_hw/shell/runners/base.rb,
lib/newline_hw/shell/runners/ruby.rb,
lib/newline_hw/stream_command_handler.rb,
lib/newline_hw/shell/runners/javascript.rb

Defined Under Namespace

Modules: ChromeManifest, Shell Classes: Api, AuthenticationError, Cli, Config, GuiTrigger, StreamCommandHandler, StreamProcessor, Token

Constant Summary collapse

SLEEP_TIME =
4
VERSION =
"1.2.2".freeze

Class Method Summary collapse

Class Method Details

.configObject



21
22
23
# File 'lib/newline_hw.rb', line 21

def config
  Config.new
end

.logfileObject



29
30
31
# File 'lib/newline_hw.rb', line 29

def logfile
  File.expand_path config.log_file
end

.make_log_directoryObject



33
34
35
36
# File 'lib/newline_hw.rb', line 33

def make_log_directory
  return if Dir.exist?(File.dirname(NewlineHw.logfile))
  Dir.mkdir(File.dirname(NewlineHw.logfile))
end

.remove_log_directoryObject



38
39
40
41
# File 'lib/newline_hw.rb', line 38

def remove_log_directory
  return unless Dir.exist?(File.dirname(NewlineHw.logfile))
  FileUtils.remove_dir(File.dirname(NewlineHw.logfile))
end

.root_pathObject



25
26
27
# File 'lib/newline_hw.rb', line 25

def root_path
  File.expand_path("../..", __FILE__)
end