Sha256: 2b403cede55d158718a9050d3bc1e4d2d1a1cd362a32fc1b2cad363a495af512
Contents?: true
Size: 920 Bytes
Versions: 11
Compression:
Stored size: 920 Bytes
Contents
#coding: utf-8 NS_GEM_ROOT = File.expand_path('../..', __FILE__) #debug this gem #$LOAD_PATH.unshift("#{NS_GEM_ROOT}/lib") require 'fileutils' require 'ns_service_pack/code_hash' require 'ns_service_pack/global_const' require 'ns_service_pack/field_mapping' require 'ns_service_pack/result_packer' require 'ns_service_pack/application_controller_module' module NsServicePack #初始安装设置 def self.install init_file = "#{Rails.root}/config/initializers/ns_service_pack.rb" unless File.exists?(init_file) FileUtils.cp("#{NS_GEM_ROOT}/config/initializers/ns_service_pack.rb", init_file) puts "==>I have installed a intializer file: #{init_file}" GlobalConst.setup_sample puts "==>Now config your constants in folder: #{GlobalConst::APP_CODE_HASHES}" else puts "==>It seems you have installed ns service pack, happy with it or bug report to caory!" end end end
Version data entries
11 entries across 11 versions & 1 rubygems