Fix bug.
This commit is contained in:
parent
ba1d01d4ff
commit
474ab7d2e3
15
faq.gemspec
15
faq.gemspec
|
@ -2,12 +2,14 @@ $:.push File.expand_path("../lib", __FILE__)
|
|||
|
||||
# Maintain your gem's version:
|
||||
require "faq/version"
|
||||
env_pwd = ENV['PWD']
|
||||
app_path = File.expand_path(__dir__)
|
||||
template_path = env_pwd + '/app/templates'
|
||||
all_template = Dir.glob(template_path+'/*/')
|
||||
default_faq_index_info = JSON.parse(File.read("#{app_path}/modules/faq/info.json"))["frontend"].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
|
||||
env_pwd = ENV['PWD']
|
||||
app_path = File.expand_path(__dir__)
|
||||
template_path = env_pwd + '/app/templates'
|
||||
all_template = Dir.glob(template_path+'/*/')
|
||||
default_faq_index_info = JSON.parse(File.read("#{app_path}/modules/faq/info.json"))["frontend"].sort_by{|h| h["filename"].to_i} rescue []
|
||||
all_template.each do |folder|
|
||||
if !folder.include?('mobile')
|
||||
info_json_file = "#{folder}modules/faq/info.json"
|
||||
if File.exist?(info_json_file)
|
||||
|
@ -64,6 +66,7 @@ all_template.each do |folder|
|
|||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
# Describe your gem and declare its dependencies:
|
||||
Gem::Specification.new do |s|
|
||||
|
|
Loading…
Reference in New Issue