diff --git a/announcement.gemspec b/announcement.gemspec index 9436b46..35577e4 100644 --- a/announcement.gemspec +++ b/announcement.gemspec @@ -4,6 +4,7 @@ $:.push File.expand_path("../lib", __FILE__) require "announcement/version" require 'json' require 'yaml' +require 'fileutils' bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install' if bundle_update_flag env_pwd = ENV['PWD'] @@ -22,7 +23,10 @@ if bundle_update_flag end end if File.exist?("#{env_pwd}/app/models/google.rb") - system("rm -f #{env_pwd}/app/models/google.rb") + FileUtils.rm("#{env_pwd}/app/models/google.rb", :force => true) + end + if Dir.exist?("#{env_pwd}/app/models/concern") + FileUtils.rm_r("#{env_pwd}/app/models/concern", :force => true) end app_path = File.expand_path(__dir__) template_path = env_pwd + '/app/templates'