lib/generic_app.rb in generic_app-3.0.16 vs lib/generic_app.rb in generic_app-3.0.17
- old
+ new
@@ -1,6 +1,6 @@
-URL_TEMPLATE = 'https://github.com/rubyonracetracks/rails-20180509-192844-678.git'.freeze
+URL_TEMPLATE = 'https://github.com/rubyonracetracks/rails-20181109-195933-081.git'.freeze
require 'generic_app/version'
require 'string_in_file'
require 'line_containing'
require 'remove_double_blank'
@@ -19,11 +19,10 @@
update_titles(subdir_name, title)
update_todo(subdir_name)
remove_travis(subdir_name)
update_origin(subdir_name)
print_end_msg(subdir_name)
- git_init(subdir_name) # Goes last
end
def self.remove_heroku_name(subdir_name)
File.delete("#{subdir_name}/config/heroku_name.txt")
end
@@ -53,10 +52,11 @@
StringInFile.replace(email_orig, email, path3)
end
def self.remove_badges(subdir_name)
path_readme = "#{subdir_name}/README.md"
+ LineContaining.delete_between('BEGIN: badges', 'END: badges', path_readme)
LineContaining.delete('[![CircleCI](https://circleci.com', path_readme)
LineContaining.delete('[![Build Status](https://travis-ci.org', path_readme)
LineContaining.delete('[![Dependency Status](https://gemnasium.com', path_readme)
LineContaining.delete('[![security](https://hakiri.io', path_readme)
LineContaining.delete('[![Code Climate](https://codeclimate.com', path_readme)
@@ -115,17 +115,9 @@
def self.update_todo(subdir_name)
url_todo = 'https://github.com/rubyonracetracks/cheat_sheets/blob/master/post_generic_app.md'
msg_todo = "Go to #{url_todo} for further instructions."
StringInFile.write("#{msg_todo}\n", "#{subdir_name}/README-to_do.txt")
- end
-
- def self.git_init(subdir_name)
- puts '-----------------------'
- puts 'Removing old Git record'
- system("cd #{subdir_name} && rm -rf .git")
- system("cd #{subdir_name} && git init")
- system("cd #{subdir_name} && git add .")
end
def self.print_end_msg(subdir_name)
puts '-------------------------'
puts 'Rails Neutrino timestamp:'