58 lines
7.5 KiB
Ruby
58 lines
7.5 KiB
Ruby
|
# -*- encoding: utf-8 -*-
|
||
|
# stub: coloncancerpredict1 0.0.1 ruby lib
|
||
|
bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install'
|
||
|
if bundle_update_flag
|
||
|
insert_flag = 0
|
||
|
app_path = File.expand_path(__dir__)
|
||
|
template_path = ENV['PWD'] + '/app/templates'
|
||
|
all_template = Dir.glob(template_path+'/*/')
|
||
|
puts 'copying module'
|
||
|
check_texts = '<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.2/js/bootstrap.min.js"%>'
|
||
|
edit_texts = '<%= javascript_include_tag "//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.7/js/bootstrap.min.js"%>'
|
||
|
all_template.each do |folder|
|
||
|
if !folder.include?('mobile')
|
||
|
begin
|
||
|
if folder.split('/')[-1] != 'mobile'
|
||
|
begin
|
||
|
system ('cp -r '+ app_path + '/modules/. ' + folder+'/modules/.')
|
||
|
puts "finish copy module coloncancerpredict1 to #{folder}"
|
||
|
rescue
|
||
|
puts 'error copy'
|
||
|
end
|
||
|
end
|
||
|
texts = File.read(folder+'partial/_head.html.erb')
|
||
|
insert_flag = 0
|
||
|
if texts.include?(check_texts)
|
||
|
texts = texts.gsub(check_texts,edit_texts)
|
||
|
insert_flag = 1
|
||
|
end
|
||
|
if insert_flag == 1
|
||
|
puts 'editing _head.html.erb'
|
||
|
f = File.open(folder+'partial/_head.html.erb','w')
|
||
|
f.write(texts)
|
||
|
f.close
|
||
|
end
|
||
|
rescue
|
||
|
puts "not found _head.html.erb in #{folder}"
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
end
|
||
|
Gem::Specification.new do |s|
|
||
|
s.name = "coloncancerpredict1"
|
||
|
s.version = "0.0.1"
|
||
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
||
|
s.require_paths = ["lib"]
|
||
|
s.authors = ["Ruling Digital"]
|
||
|
s.date = "2022-02-07"
|
||
|
s.description = "Colon Cancer Predict for Orbit"
|
||
|
s.email = ["orbit@rulingcom.com"]
|
||
|
s.files = ["MIT-LICENSE", "README.rdoc", "Rakefile", "app/assets/images/coloncancerpredict1", "app/assets/images/coloncancerpredict1/triangle_add.png", "app/assets/images/coloncancerpredict1/triangle_sub.png", "app/assets/javascripts/admin/coloncancerpredict1.js", "app/assets/javascripts/colon_cancer_predict1.js", "app/assets/javascripts/jquery.smartmenus.bootstrap.min.js", "app/assets/javascripts/jquery.smartmenus.min.js", "app/assets/javascripts/react.js", "app/assets/stylesheets/admin/coloncancerpredict1.css", "app/assets/stylesheets/colon_cancer_predict1.css", "app/controllers/admin/coloncancerpredict1s_controller.rb", "app/controllers/coloncancerpredict1s_controller.rb", "app/helpers/admin/coloncancerpredict1s_helper.rb", "app/models/coloncancerpredictfields1s.rb", "app/views/admin/coloncancerpredict1s", "app/views/admin/coloncancerpredict1s/_form.html.erb", "app/views/admin/coloncancerpredict1s/_form_file.html.erb", "app/views/admin/coloncancerpredict1s/_form_link.html.erb", "app/views/admin/coloncancerpredict1s/_index.html.erb", "app/views/admin/coloncancerpredict1s/index.html.erb", "app/views/admin/coloncancerpredict1s/new.html.erb", "app/views/admin/coloncancerpredict1s/settings.html.erb", "app/views/admin/coloncancerpredict1s/update.html.erb", "app/views/coloncancerpredict1s", "app/views/coloncancerpredict1s/index.html.erb", "config/locales/en.yml", "config/locales/zh_tw.yml", "config/routes.rb", "lib/coloncancerpredict1", "lib/coloncancerpredict1.rb", "lib/coloncancerpredict1/engine.rb", "lib/coloncancerpredict1/version.rb", "lib/tasks/coloncancerpredict1_tasks.rake", "test/coloncancerpredict1_test.rb", "test/controllers/admin/coloncancerpredict1s_controller_test.rb", "test/dummy", "test/dummy/README.rdoc", "test/dummy/Rakefile", "test/dummy/app", "test/dummy/app/assets", "test/dummy/app/assets/images", "test/dummy/app/assets/javascripts", "test/dummy/app/assets/javascripts/application.js", "test/dummy/app/assets/stylesheets", "test/dummy/app/assets/stylesheets/application.css", "test/dummy/app/controllers", "test/dummy/app/controllers/application_controller.rb", "test/dummy/app/controllers/concerns", "test/dummy/app/helpers", "test/dummy/app/helpers/application_helper.rb", "test/dummy/app/mailers", "test/dummy/app/models", "test/dummy/app/models/concerns", "test/dummy/app/views", "test/dummy/app/views/layouts", "test/dummy/app/views/layouts/application.html.erb", "test/dummy/bin", "test/dummy/bin/bundle", "test/dummy/bin/rails", "test/dummy/bin/rake", "test/dummy/config", "test/dummy/config.ru", "test/dummy/config/application.rb", "test/dummy/config/boot.rb", "test/dummy/config/environment.rb", "test/dummy/config/environments", "test/dummy/config/environments/development.rb", "test/dummy/config/environments/production.rb", "test/dummy/config/environments/test.rb", "test/dummy/config/initializers", "test/dummy/config/initializers/backtrace_silencers.rb", "test/dummy/config/initializers/cookies_serializer.rb", "test/dummy/config/initializers/filter_parameter_logging.rb", "test/dummy/config/initializers/inflections.rb", "test/dummy/config/initializers/mime_types.rb", "test/dummy/config/initializers/session_store.rb", "test/dummy/config/initializers/wrap_parameters.rb", "test/dummy/config/locales", "test/dummy/config/locales/en.yml", "test/dummy/config/routes.rb", "test/dummy/config/secrets.yml", "test/dummy/lib", "test/dummy/lib/assets", "test/dummy/log", "test/dummy/public", "test/dummy/public/404.html", "test/dummy/public/422.html", "test/dummy/public/500.html", "test/dummy/public/favicon.ico", "test/helpers/admin/coloncancerpredict1s_helper_test.rb", "test/integration/navigation_test.rb", "test/test_helper.rb"]
|
||
|
s.homepage = "http://www.rulingcom.com"
|
||
|
s.licenses = ["MIT"]
|
||
|
s.rubygems_version = "2.2.2"
|
||
|
s.summary = "Cancer_Predict for Orbit"
|
||
|
s.test_files = ["test/coloncancerpredict1_test.rb", "test/dummy", "test/dummy/README.rdoc", "test/dummy/bin", "test/dummy/bin/bundle", "test/dummy/bin/rake", "test/dummy/bin/rails", "test/dummy/log", "test/dummy/app", "test/dummy/app/assets", "test/dummy/app/assets/javascripts", "test/dummy/app/assets/javascripts/application.js", "test/dummy/app/assets/images", "test/dummy/app/assets/stylesheets", "test/dummy/app/assets/stylesheets/application.css", "test/dummy/app/mailers", "test/dummy/app/helpers", "test/dummy/app/helpers/application_helper.rb", "test/dummy/app/controllers", "test/dummy/app/controllers/application_controller.rb", "test/dummy/app/controllers/concerns", "test/dummy/app/views", "test/dummy/app/views/layouts", "test/dummy/app/views/layouts/application.html.erb", "test/dummy/app/models", "test/dummy/app/models/concerns", "test/dummy/Rakefile", "test/dummy/lib", "test/dummy/lib/assets", "test/dummy/public", "test/dummy/public/422.html", "test/dummy/public/500.html", "test/dummy/public/favicon.ico", "test/dummy/public/404.html", "test/dummy/config.ru", "test/dummy/config", "test/dummy/config/environments", "test/dummy/config/environments/production.rb", "test/dummy/config/environments/development.rb", "test/dummy/config/environments/test.rb", "test/dummy/config/environment.rb", "test/dummy/config/boot.rb", "test/dummy/config/routes.rb", "test/dummy/config/application.rb", "test/dummy/config/secrets.yml", "test/dummy/config/locales", "test/dummy/config/locales/en.yml", "test/dummy/config/initializers", "test/dummy/config/initializers/wrap_parameters.rb", "test/dummy/config/initializers/cookies_serializer.rb", "test/dummy/config/initializers/mime_types.rb", "test/dummy/config/initializers/inflections.rb", "test/dummy/config/initializers/backtrace_silencers.rb", "test/dummy/config/initializers/filter_parameter_logging.rb", "test/dummy/config/initializers/session_store.rb", "test/test_helper.rb", "test/helpers/admin/coloncancerpredict1s_helper_test.rb", "test/controllers/admin/coloncancerpredict1s_controller_test.rb", "test/integration/navigation_test.rb"]
|
||
|
s.installed_by_version = "2.2.2" if s.respond_to? :installed_by_version
|
||
|
end
|