From 29c6d1f905fec6f0c40a84d5a8dea40d23bfdc78 Mon Sep 17 00:00:00 2001 From: masarakki Date: Mon, 6 Jun 2016 04:09:33 +0900 Subject: [PATCH] generate Gemfile --- bin/review-init | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/bin/review-init b/bin/review-init index 6e203d761..be493a072 100755 --- a/bin/review-init +++ b/bin/review-init @@ -61,6 +61,7 @@ def main generate_config(dir) generate_locale(dir) if @locale generate_rakefile(dir) + generate_gemfile(dir) end end @@ -142,6 +143,17 @@ def generate_locale(dir) FileUtils.cp @review_dir + '/lib/review/i18n.yml', dir + '/locale.yml' end +def generate_gemfile(dir) + File.open(dir + "/Gemfile", "w") do |file| + file.write <<-EOS +source 'https://rubygems.org' + +gem 'rake' +gem 'review', '#{ReVIEW::VERSION}' +EOS + end +end + if File.basename($0) == File.basename(__FILE__) main() end