Sha256: 3e7dbbde6b2d1bd8080ce1612bc25f714b2f82cbd16cd3432cec067d36f3ba20
Contents?: true
Size: 1008 Bytes
Versions: 2
Compression:
Stored size: 1008 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_code_hashes puts "==>Now you can 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 puts "==>NsServicePack has installed into application, ^^caory"
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
ns_service_pack-0.0.4 | lib/ns_service_pack.rb |
ns_service_pack-0.0.3 | lib/ns_service_pack.rb |