Class: MyScripts::Bon
Overview
This script uses Mr.Bones gem to create new project skeleton, local git repo and initiate remote repo on github
Constant Summary collapse
- VERSION =
'0.1.0'
- DEFAULT_SKELETON =
'basic'
Instance Method Summary collapse
Methods inherited from Script
#error, #gets, #initialize, #puts, #system, #to_s, #usage, #version
Constructor Details
This class inherits a constructor from MyScripts::Script
Instance Method Details
#run ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/my_scripts/scripts/bon.rb', line 9 def run usage "name Summary or description goes here" if @argv.empty? # First Arg should be project name name = @argv.shift # All the other args lumped into summary, or default summary summary = @argv.empty? ? "New project #{name}" : @argv.join(' ') puts "Creating Bones project #{name} with summary: #{summary}" success = system %Q[bones create --github "#{summary}" -s #{DEFAULT_SKELETON} #{name}] if success system "cd #{name} && git grep FIXME" end end |