forked from spen/seminar
Merge branch 'master' into 'master'
Fix bug. See merge request spen/seminar!30
This commit is contained in:
commit
98b2f10b1e
|
@ -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