Rakefile in my_help-1.2.2 vs Rakefile in my_help-1.2.3
- old
+ new
@@ -1,7 +1,7 @@
# frozen_string_literal: true
-
+require 'yard'
require 'bundler/gem_tasks'
require 'rake/testtask'
Rake::TestTask.new(:test) do |t|
t.options = '-v'
@@ -28,5 +28,24 @@
#task default: %i[test rubocop]
task :default do
system "rake -T"
end
+
+require "colorize"
+require 'command_line/global'
+
+desc 'git auto'
+task :git_auto do
+ print "Input comments: "
+ comment = STDIN.gets.chomp
+ comment = comment == "" ? "auto pull and push" : comment.gsub("\'", "\\'")
+ ["git add -A",
+ "git commit -m '#{comment}'",
+ "git pull origin main",
+ "git push origin main"].each do |comm|
+ puts comm.cyan
+ res = command_line comm
+ puts res.stdout.green
+ end
+end
+