Sha256: 4cc1824eae7b4d4228a215a4c180cdb74fad3b0d72bb3cdf95e6e2933947e0ed

Contents?: true

Size: 613 Bytes

Versions: 2

Compression:

Stored size: 613 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
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
zfben_rails_rake-0.0.9 lib/zfben_rails_rake/tasks/git.rb
zfben_rails_rake-0.0.8 lib/zfben_rails_rake/tasks/git.rb