Skip to content

Commit

Permalink
Add ruby line back to Gemfile
Browse files Browse the repository at this point in the history
  • Loading branch information
rahearn committed Jan 3, 2025
1 parent a6b0774 commit 6ca29c8
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions template.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
require "colorize"
require "bundler/version"

## Supporting methods
# tell our template to grab all files from the templates directory
Expand Down Expand Up @@ -26,6 +27,14 @@ def cloud_gov_org_tktk?
@cloud_gov_organization =~ /TKTK/
end

def gem_ruby_entry
if Gem::Version.new(Bundler::VERSION) >= Gem::Version.new("2.4.20") # add file: option to #ruby
'ruby file: ".ruby-version"'
else
"ruby \"#{gem_ruby_version}\""
end
end

@announcements = Hash.new { |h, k| h[k] = [] }
def register_announcement(section_name, instructions)
@announcements[section_name.to_sym] << instructions
Expand Down Expand Up @@ -109,6 +118,8 @@ def print_announcements
run_db_setup = yes?("Run db setup steps? (y/n)")

## Start of app customizations
insert_into_file "Gemfile", "\n#{gem_ruby_entry}\n", after: /^source "https.*\n/

template "README.md", force: true
register_announcement("Documentation", <<~EOM)
* Complete the project README by adding a quick summary of the project in the top section.
Expand Down

0 comments on commit 6ca29c8

Please sign in to comment.