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
|
rescue => e
|
||||||
puts [e.to_s,e.backtrace]
|
puts [e.to_s,e.backtrace]
|
||||||
end
|
end
|
||||||
require "json"
|
bundle_update_flag = ARGV[0]=='update' || ARGV[0]=='install'
|
||||||
env_pwd = ENV['PWD']
|
if bundle_update_flag
|
||||||
app_path = File.expand_path(__dir__)
|
require "json"
|
||||||
template_path = env_pwd + '/app/templates'
|
env_pwd = ENV['PWD']
|
||||||
all_template = Dir.glob(template_path+'/*/')
|
app_path = File.expand_path(__dir__)
|
||||||
default_seminar_widget_info = JSON.parse(File.read("#{app_path}/modules/seminar/info.json"))["widgets"].sort_by{|h| h["filename"].to_i} rescue []
|
template_path = env_pwd + '/app/templates'
|
||||||
all_template.each do |folder|
|
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')
|
if !folder.include?('mobile')
|
||||||
info_json_file = "#{folder}modules/seminar/info.json"
|
info_json_file = "#{folder}modules/seminar/info.json"
|
||||||
if File.exist?(info_json_file)
|
if File.exist?(info_json_file)
|
||||||
|
@ -72,6 +74,7 @@ all_template.each do |folder|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
end
|
end
|
||||||
Gem::Specification.new do |s|
|
Gem::Specification.new do |s|
|
||||||
s.name = "seminar"
|
s.name = "seminar"
|
||||||
|
|
Loading…
Reference in New Issue