Top Level Namespace

Defined Under Namespace

Modules: Raykit Classes: Dir, String

Constant Summary collapse

PROJECT =
Raykit::Project.new
SECRETS =
Raykit::Secrets.new
REPOSITORIES =
Raykit::Git::Repositories.new("#{Raykit::Environment.get_dev_dir("log")}/Raykit.Git.Repositories.json")
GIT_DIRECTORY =
Raykit::Git::Directory.new(Rake.application.original_dir)
NUGET_DIR =
Raykit::Environment::get_dev_dir("nuget")
PUBLISH_DIR =
Raykit::Environment::get_dev_dir("publish")
RAYKIT_GLOBALS =
true
BUFFER_SIZE =
1024
LOG =
Raykit::Logging.new
RAKE_DIRECTORY =
Rake.application.original_dir
MARKDOWN =
Raykit::Markdown.new

Instance Method Summary collapse

Instance Method Details

#copy_file_to_dir(file, dir) ⇒ Object



90
91
92
# File 'lib/raykit.rb', line 90

def copy_file_to_dir(file, dir)
  Raykit::FileSystem::copy_file_to_dir(file, dir)
end

#copy_files(src_dir, target_dir, glob) ⇒ Object



86
87
88
# File 'lib/raykit.rb', line 86

def copy_files(src_dir, target_dir, glob)
  Raykit::FileSystem::copy_files(src_dir, target_dir, glob)
end

#make(artifact, command) ⇒ Object



41
42
43
44
45
46
47
48
49
50
51
# File 'lib/raykit.rb', line 41

def make(artifact, command)
  if (File.exists?(artifact))
    puts "  #{artifact} exists"
  else
    cmd = run(command)
    if (cmd.exitstatus != 0)
      File.delete(artifact) if (File.exists?(artifact))
    end
    cmd
  end
end

#make_log(artifact, command) ⇒ Object



53
54
55
56
57
58
59
60
61
62
63
# File 'lib/raykit.rb', line 53

def make_log(artifact, command)
  if (File.exists?(artifact))
    puts "  #{artifact} exists"
  else
    cmd = run(command).log_to_file(artifact)
    if (cmd.exitstatus != 0)
      File.delete(artifact) if (File.exists?(artifact))
    end
    check_md
  end
end

#run(command, quit_on_failure = true) ⇒ Object



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

def run(command, quit_on_failure = true)
  Raykit::TopLevel.run(command, quit_on_failure)
end

#show(symbol) ⇒ Object



69
70
71
# File 'lib/raykit.rb', line 69

def show(symbol)
  show_binding(symbol, binding)
end

#show_binding(symbol, the_binding) ⇒ Object



73
74
75
# File 'lib/raykit.rb', line 73

def show_binding(symbol, the_binding)
  show_value symbol.to_s, eval(symbol.to_s, the_binding)
end

#show_table(symbols) ⇒ Object



82
83
84
# File 'lib/raykit.rb', line 82

def show_table(symbols)
  Raykit::Log.show_table(symbols)
end

#show_value(name, value) ⇒ Object



77
78
79
80
# File 'lib/raykit.rb', line 77

def show_value(name, value)
  Raykit::Log.show_value(name, value)
  PROJECT.values[name] = value
end

#start_task(task_name) ⇒ Object



65
66
67
# File 'lib/raykit.rb', line 65

def start_task(task_name)
  Raykit::Log.start_task(task_name)
end

#try(command) ⇒ Object



37
38
39
# File 'lib/raykit.rb', line 37

def try(command)
  Raykit::TopLevel.run(command, false)
end