From cf9bec7a61da74175b2b836a9eaf86dcf2a20721 Mon Sep 17 00:00:00 2001 From: BOHUNG Date: Mon, 13 Jan 2020 19:04:02 +0800 Subject: [PATCH] add auto copy index.erb to module --- cancerpredict.gemspec | 13 +++++++++++++ modules/_head.html.erb | 27 --------------------------- modules/built_in_extensions.rb | 26 -------------------------- 3 files changed, 13 insertions(+), 53 deletions(-) delete mode 100644 modules/_head.html.erb delete mode 100644 modules/built_in_extensions.rb diff --git a/cancerpredict.gemspec b/cancerpredict.gemspec index 316de3e..f1faef6 100644 --- a/cancerpredict.gemspec +++ b/cancerpredict.gemspec @@ -8,9 +8,22 @@ insert_texts.each do |insert_text| routes_text.insert(insert_index,insert_text+"\n") end end +app_path = File.expand_path(__dir__) f = File.open(ENV['PWD']+'/config/routes.rb','w') f.write(routes_text) f.close +template_path = ENV['PWD'] + '/app/templates' +all_template = Dir.glob(template_path+'/*/') +puts 'copying module' +all_template.each do |folder| + if folder.split('/')[-1] != 'mobile' + begin + system ('cp -r '+ app_path + '/modules/ ' + folder+'/modules/.') + rescue + puts 'error copy' + end + end +end Gem::Specification.new do |s| s.name = "cancerpredict" s.version = "0.0.1" diff --git a/modules/_head.html.erb b/modules/_head.html.erb deleted file mode 100644 index da07846..0000000 --- a/modules/_head.html.erb +++ /dev/null @@ -1,27 +0,0 @@ - - - <%= favicon_link_tag (current_site.favicon.blank? ? 'favicon.ico' : current_site.favicon.url) %> - <%= render_site_title %> - <%= stylesheet_link_tag "//cdnjs.cloudflare.com/ajax/libs/font-awesome/4.3.0/css/font-awesome.min.css"%> - <%= stylesheet_link_tag "bootstrap/bootstrap.min.css"%> - <%= stylesheet_link_tag "template/template"%> - - <%= javascript_include_tag "plugin/modernizr.js"%> - <%= javascript_include_tag "plugin/picturefill.min.js"%> - <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery/1.11.0/jquery.min.js"%> - <%= javascript_include_tag "plugin/jquery.mobile.custom.min.js"%> - <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"%> - <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.min.js"%> - <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.carousel.min.js"%> - <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.scrollVert.min.js"%> - <%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/jquery.cycle2/20140415/jquery.cycle2.tile.min.js"%> - <%= javascript_include_tag "plugin/jquery.cycle2.video.min.js"%> - <%= javascript_include_tag "plugin/jquery-bullseye-min.js"%> - <%= javascript_include_tag "app"%> - <%= javascript_include_tag "#{@dataApi}" if @dataApi != nil%> - - <%= render_google_analytics %> - diff --git a/modules/built_in_extensions.rb b/modules/built_in_extensions.rb deleted file mode 100644 index bd4c098..0000000 --- a/modules/built_in_extensions.rb +++ /dev/null @@ -1,26 +0,0 @@ -gem 'announcement', git: 'http://gitlab.tp.rulingcom.com/saurabh/announcement-test.git' -gem 'ad_banner', git: 'http://gitlab.tp.rulingcom.com/saurabh/adbanner-test.git' -gem "archive", git: 'http://gitlab.tp.rulingcom.com/saurabh/archive.git' -gem 'gallery', git: 'http://gitlab.tp.rulingcom.com/saurabh/gallery.git' -gem 'web_resource', git: 'http://gitlab.tp.rulingcom.com/saurabh/links.git' -gem 'page_content', git: 'http://gitlab.tp.rulingcom.com/saurabh/pagecontent.git' -gem 'faq', git: 'http://gitlab.tp.rulingcom.com/saurabh/faq.git' -#Personal Plugins -gem 'personal_journal', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-journal.git' -gem 'personal_conference', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-conference.git' -gem 'personal_book', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-book.git' -gem 'personal_project', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-project.git' -gem 'personal_patent', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-patent.git' -gem 'personal_research', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-research.git' -gem 'personal_lab', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-lab.git' -gem 'personal_diploma', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-diploma.git' -gem 'personal_experience', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-experience.git' -gem 'personal_honor', git: 'http://gitlab.tp.rulingcom.com/saurabh/personal-honor.git' - -#widgets -gem "site_menu_widget", git: 'http://gitlab.tp.rulingcom.com/saurabh/site-menu-widget.git' -gem "breadcrumb_widget", git: "http://gitlab.tp.rulingcom.com/saurabh/breadcrumb-widget.git" -gem "announcement_link_widget", git: "http://gitlab.tp.rulingcom.com/harry/announcement-link-widget.git" - -gem 'patchfile', git: 'http://gitlab.tp.rulingcom.com/chiu/patch_file.git' -gem 'cancerpredict', git: 'http://gitlab.tp.rulingcom.com/chiu/cancer_predict.git'