Update jquery ui version.
This commit is contained in:
parent
a64a749774
commit
fcb49c9576
|
@ -41,7 +41,7 @@ class Filefield
|
|||
},:status=>0} ,
|
||||
"accessibility"=>{:files=>{'back_end@html@erb'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>@views_path+'layouts/'},
|
||||
'_form@html@erb'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>@views_path+'page_parts/'},
|
||||
'jquery-ui-1@12@1/'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>Rails.root.to_s + '/app/assets/stylesheets/lib/jquery-ui-1.12.1/'},
|
||||
'jquery-ui-1@13@2/'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>Rails.root.to_s + '/app/assets/stylesheets/lib/jquery-ui-1.13.2/'},
|
||||
'orbit_bar/'=>{:status=>0, :sc=>@app_path+'/updatefiles/accessibility/', :dest=>@views_path+'orbit_bar/'}
|
||||
},:status=>0}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
$:.push File.expand_path("../lib", __FILE__)
|
||||
# Maintain your gem's version:
|
||||
require "patchfile/version"
|
||||
bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install'
|
||||
if bundle_update_flag
|
||||
app_path = File.expand_path(__dir__)
|
||||
dir_pwd = ENV['PWD']
|
||||
template_path = dir_pwd + '/app/templates'
|
||||
|
@ -10,7 +12,7 @@ all_template = Dir.glob(template_path+'/*/')
|
|||
puts "copying jquery-ui"
|
||||
begin
|
||||
`cp -rf "#{app_path}/updatefiles/javascripts/." "#{dir_pwd}/app/assets/javascripts/"`
|
||||
`cp -r "#{app_path}/updatefiles/accessibility/jquery-ui-1.12.1/." "#{dir_pwd}/app/assets/stylesheets/lib/jquery-ui-1.12.1/"`
|
||||
`cp -r "#{app_path}/updatefiles/accessibility/jquery-ui-1.13.2/." "#{dir_pwd}/app/assets/stylesheets/lib/jquery-ui-1.13.2/"`
|
||||
rescue
|
||||
puts "There is an error in coppying jquery-ui"
|
||||
end
|
||||
|
@ -74,8 +76,13 @@ all_template.each do |folder|
|
|||
require 'nokogiri'
|
||||
rescue ScriptError => e
|
||||
system('gem install nokogiri -v 1.7.0.1')
|
||||
gem_home = ENV["GEM_HOME"]
|
||||
if gem_home.present?
|
||||
$LOAD_PATH << "#{gem_home}/gems/nokogiri-1.7.0.1/lib"
|
||||
$LOAD_PATH << "#{gem_home}/extensions/#{RUBY_PLATFORM}/#{RUBY_VERSION}/nokogiri-1.7.0.1"
|
||||
require 'nokogiri'
|
||||
end
|
||||
end
|
||||
puts "changing header.html.erb in #{folder}/home/header.html.erb"
|
||||
if folder.split('/')[-1] != 'mobile'
|
||||
filename = folder+'home/header.html.erb'
|
||||
|
@ -132,15 +139,16 @@ end
|
|||
#rescue => e
|
||||
# puts "Permission denied in #{ENV['PWD']}/app/helpers/application_helper.rb"
|
||||
#end
|
||||
end
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "patchfile"
|
||||
s.version = Patchfile::VERSION
|
||||
s.authors = ["Ruling Digital"]
|
||||
s.email = ["orbit@rulingcom.com"]
|
||||
s.email = ["bohung@rulingcom.com"]
|
||||
s.homepage = "http://www.rulingcom.com"
|
||||
s.summary = "Patch_file for Orbit"
|
||||
s.description = "Patch_file for Orbit"
|
||||
s.summary = "Patch file for Orbit"
|
||||
s.description = "Patch file for Orbit"
|
||||
s.license = "MIT"
|
||||
s.add_dependency "nokogiri"
|
||||
s.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.rdoc"]
|
||||
|
|
Loading…
Reference in New Issue