Sha256: 53197859d1f7849794bfb91135bce57ea1d63a2f2a3b689b12d1d7a211284178
Contents?: true
Size: 864 Bytes
Versions: 4
Compression:
Stored size: 864 Bytes
Contents
namespace :git do desc 'git pull' task :pull do sys 'git pull' end desc 'git commit with your comment' task :commit, [:comment] do |task, args| args = args.to_hash sys "git add ." comment = args.has_key?(:comment) ? args[:comment] : `git status` sys "git commit -m '#{comment}' -a" end desc 'git push with your comment' task :push, [:comment] => [:commit] do |task, comment| sys 'git push' end desc 'copy .gitignore to rails root path' task :copy do sys 'cp ' << File.join(ZfbenRailsRakePath, 'static', '.gitignore') << ' ' << Rails.root.to_s end desc 'clear files in .gitignore' task :clear do path = File.join(Rails.root, '.gitignore') unless File.exists? path err '.gitignore is not exists! Please run `rake git:copy` first' else sys 'git clean -dfX' end end end
Version data entries
4 entries across 4 versions & 1 rubygems