Sha256: 370176b623c3f6c7fd53da8808686d589dddc712fc892eb093c0d3286c379b3e
Contents?: true
Size: 650 Bytes
Versions: 13
Compression:
Stored size: 650 Bytes
Contents
require 'apidragon' # require the gem. you can use any gems you like! class MyClass < ArgBucket # inherit from the ArgBucket class for the 'get' and 'set' methods on @arg_bucket def initialize(args) @arg_bucket = args puts @arg_bucket end def run directory = get 'directory' repo_name = get 'repo' repo = 'http://github.com/isand3r' << repo_name puts repo puts directory if Dir.exist?(directory) && Dir.exist?("#{directory}/#{repo_name}/.git") `cd #{directory}/#{repo_name}; git pull` else puts "cloning #{repo}" `mkdir #{directory}; cd #{directory}; git clone #{repo}` end end end
Version data entries
13 entries across 13 versions & 1 rubygems