class Lolipop::Mc::Starter::Rails::CheckItem::Git
Public Instance Methods
check()
click to toggle source
# File lib/lolipop/mc/starter/rails/check_item/git.rb, line 7 def check begin stdout, stderr, status = Open3.capture3("git version") rescue => e raise "Gitコマンドがみつかりません #{e.message}" end raise "Gitコマンドが古いです #{stdout.strip}" unless stdout.match(/git version 2/) config = @config.load config['git'] = stdout.strip @config.dump(config) "Gitコマンドがインストールされています [#{stdout.strip}]" end
hint()
click to toggle source
# File lib/lolipop/mc/starter/rails/check_item/git.rb, line 20 def hint puts 'ソースコードをバージョン管理するためにGitコマンドを利用します' puts 'またマネージドクラウドのRailsプロジェクトではデプロイの仕組みにGitを活用しています' puts 'Macであれば `brew install git` コマンドなどでGitをインストールしてください' end