forked from spen/seminar
Fix bug.
This commit is contained in:
parent
72a5ed3360
commit
4118f5d7f6
|
@ -8,13 +8,15 @@ begin
|
|||
rescue => e
|
||||
puts [e.to_s,e.backtrace]
|
||||
end
|
||||
require "json"
|
||||
env_pwd = ENV['PWD']
|
||||
app_path = File.expand_path(__dir__)
|
||||
template_path = env_pwd + '/app/templates'
|
||||
all_template = Dir.glob(template_path+'/*/')
|
||||
default_seminar_widget_info = JSON.parse(File.read("#{app_path}/modules/seminar/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
||||
all_template.each do |folder|
|
||||
bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install'
|
||||
if bundle_update_flag
|
||||
require "json"
|
||||
env_pwd = ENV['PWD']
|
||||
app_path = File.expand_path(__dir__)
|
||||
template_path = env_pwd + '/app/templates'
|
||||
all_template = Dir.glob(template_path+'/*/')
|
||||
default_seminar_widget_info = JSON.parse(File.read("#{app_path}/modules/seminar/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
||||
all_template.each do |folder|
|
||||
if !folder.include?('mobile')
|
||||
info_json_file = "#{folder}modules/seminar/info.json"
|
||||
if File.exist?(info_json_file)
|
||||
|
@ -72,6 +74,7 @@ all_template.each do |folder|
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Gem::Specification.new do |s|
|
||||
s.name = "seminar"
|
||||
|
|
Loading…
Reference in New Issue