lib/generic_app.rb in generic_app-3.0.4 vs lib/generic_app.rb in generic_app-3.0.5

- old
+ new

@@ -2,18 +2,20 @@ require 'generic_app/version' require 'string_in_file' require 'line_containing' require 'remove_double_blank' +require 'open-uri' # module GenericApp # Create app, stick with SQLite database in development def self.create_new(subdir_name, email, title) t1 = Thread.new { git_clone(subdir_name) } t1.join remove_neutrino(subdir_name) + update_pg_setup(subdir_name) remove_heroku_name(subdir_name) email_update(subdir_name, email) remove_badges(subdir_name) update_titles(subdir_name, title) update_todo(subdir_name) @@ -25,9 +27,15 @@ File.delete("#{subdir_name}/config/heroku_name.txt") end def self.remove_neutrino(subdir_name) File.delete("#{subdir_name}/neutrino.sh") + end + + def self.update_pg_setup(subdir_name) + open("#{subdir_name}/pg_setup.sh", 'w') do |f| + f.write open('https://gist.githubusercontent.com/jhsu802701/e4d60a972893f78da0f6906a0beeac06/raw/293bd0e74adbfa6b47c81332aa81b84d89770518/pg_setup.sh').read + end end def self.git_clone(subdir_name) puts '------------------------------------' puts 'Downloading the Generic App Template'