32 lines
1.1 KiB
Ruby
32 lines
1.1 KiB
Ruby
$:.push File.expand_path("lib", __dir__)
|
|
|
|
# Maintain your gem's version:
|
|
require "ruling_weather/version"
|
|
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+'/*/')
|
|
all_template.each do |folder|
|
|
if !folder.include?('mobile')
|
|
moudle_path = "#{folder}modules/ruling_weather/"
|
|
if !Dir.exist?(moudle_path) && Dir.exist?(File.dirname(moudle_path))
|
|
Bundler.with_clean_env{system ('cp -r '+ app_path + '/modules/* ' + folder + '/modules/.')}
|
|
end
|
|
end
|
|
end
|
|
end
|
|
# Describe your gem and declare its dependencies:
|
|
Gem::Specification.new do |spec|
|
|
spec.name = "ruling_weather"
|
|
spec.version = RulingWeather::VERSION
|
|
spec.authors = ["Bohung Chiu"]
|
|
spec.email = ["bohung@rulingcom.com"]
|
|
spec.homepage = "https://w3.rulingcom.com/"
|
|
spec.summary = "Ruling Weather"
|
|
spec.description = "Ruling Weather"
|
|
spec.license = "MIT"
|
|
spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
|
|
end
|