module Gears::Metadata
Public Class Methods
clone(path)
click to toggle source
# File lib/robot_sweatshop/gears/metadata.rb, line 9 def self.clone(path) Git.clone git_repo, File.basename(path), path: File.dirname(path) end
download(to_path:)
click to toggle source
# File lib/robot_sweatshop/gears/metadata.rb, line 17 def self.download(to_path:) puts "Downloading metadata from '#{git_repo}'" clone to_path Announce.success 'Metadata downloaded' end
git_repo()
click to toggle source
# File lib/robot_sweatshop/gears/metadata.rb, line 13 def self.git_repo 'https://github.com/JScott/sweatshop-gears-packages.git' end
metadata(package_path)
click to toggle source
# File lib/robot_sweatshop/gears/metadata.rb, line 23 def self.metadata(package_path) YAML.load File.read("#{package_path}/metadata.yaml") end
sweatshop_config()
click to toggle source
# File lib/robot_sweatshop/gears/metadata.rb, line 27 def self.sweatshop_config path = File.expand_path '~/.robot_sweatshop/compiled_config.yaml' fail 'Please run `sweatshop start` first' unless File.exist? path YAML.load File.read(path) end