cancer_predict/cancerpredict.gemspec

65 lines
7.5 KiB
Ruby

# -*- encoding: utf-8 -*-
# stub: cancerpredict 0.0.1 ruby lib
routes_text = File.read(ENV['PWD']+'/config/routes.rb')
insert_texts = ['get "cancerpredictResult",to: "cancerpredicts#calculate"','post "cancerpredictResult",to: "cancerpredicts#calculate"']
insert_flag = 0
insert_texts.each do |insert_text|
if !routes_text.include?(insert_text)
insert_index = routes_text.index('get "/admin/license_denied" => "store_api#render_license_denied"')
routes_text.insert(insert_index,insert_text+"\n")
insert_flag = 1
end
end
app_path = File.expand_path(__dir__)
if insert_flag == 1
f = File.open(ENV['PWD']+'/config/routes.rb','w')
f.write(routes_text)
f.close
end
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')
if folder.split('/')[-1] != 'mobile'
begin
system ('cp -r '+ app_path + '/modules/. ' + folder+'/modules/.')
rescue
puts 'error copy'
end
end
texts = File.read(folder+'partial/_head.html.erb')
insert_flag = 0
if texts.include?(check_texts)
texts.gsub(check_texts,edit_texts)
insert_flag = 1
end
if insert_flag == 1
f = File.open(folder+'partial/_head.html.erb','w')
f.write(texts)
f.close
end
end
end
Gem::Specification.new do |s|
s.name = "cancerpredict"
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 = "2019-12-09"
s.description = "Cancer_Predict for Orbit"
s.email = ["orbit@rulingcom.com"]
s.files = ["MIT-LICENSE", "README.rdoc", "Rakefile", "app/assets/images/cancerpredict", "app/assets/images/cancerpredict/triangle_add.png", "app/assets/images/cancerpredict/triangle_sub.png", "app/assets/javascripts/admin/cancerpredict.js", "app/assets/javascripts/cancer_predict.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/cancerpredict.css", "app/assets/stylesheets/cancer_predict.css", "app/controllers/admin/cancerpredicts_controller.rb", "app/controllers/cancerpredicts_controller.rb", "app/helpers/admin/cancerpredicts_helper.rb", "app/models/cancerpredictfields.rb", "app/views/admin/cancerpredicts", "app/views/admin/cancerpredicts/_form.html.erb", "app/views/admin/cancerpredicts/_form_file.html.erb", "app/views/admin/cancerpredicts/_form_link.html.erb", "app/views/admin/cancerpredicts/_index.html.erb", "app/views/admin/cancerpredicts/index.html.erb", "app/views/admin/cancerpredicts/new.html.erb", "app/views/admin/cancerpredicts/settings.html.erb", "app/views/admin/cancerpredicts/update.html.erb", "app/views/cancerpredicts", "app/views/cancerpredicts/index.html.erb", "config/locales/en.yml", "config/locales/zh_tw.yml", "config/routes.rb", "lib/cancerpredict", "lib/cancerpredict.rb", "lib/cancerpredict/engine.rb", "lib/cancerpredict/version.rb", "lib/tasks/cancerpredict_tasks.rake", "test/cancerpredict_test.rb", "test/controllers/admin/cancerpredicts_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/cancerpredicts_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/cancerpredict_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/cancerpredicts_helper_test.rb", "test/controllers/admin/cancerpredicts_controller_test.rb", "test/integration/navigation_test.rb"]
s.installed_by_version = "2.2.2" if s.respond_to? :installed_by_version
end