Skip to content

Commit

Permalink
Merge pull request #650 from masarakki/add-Gemfile
Browse files Browse the repository at this point in the history
generate Gemfile
  • Loading branch information
takahashim committed Jun 9, 2016
2 parents 296ffd5 + 29c6d1f commit 4897713
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bin/review-init
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def main
generate_config(dir)
generate_locale(dir) if @locale
generate_rakefile(dir)
generate_gemfile(dir)
end
end

Expand Down Expand Up @@ -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

0 comments on commit 4897713

Please sign in to comment.