gem_name = File.basename(__FILE__).gsub File.extname(__FILE__), '' require "#{gem_name}/version" require "#{gem_name}/hook_script" require "#{gem_name}/hook_code" require "#{gem_name}/git" require "#{gem_name}/service" require "#{gem_name}/service_helper" module CommitMsgUrlShortener DEFAULT_SERVICE = 'svel.to' HOOK_CODE_SRV_TOKEN = 'SERVICE' ROOT_PATH = File.dirname File.expand_path(__FILE__) HOOK_CODES = Dir[File.join ROOT_PATH, "#{GEM_NAME}/hook_codes/*.*"].map do |path| hook_code = HookCode.fabricate path path = hook_code end SERVICES = Dir[File.join ROOT_PATH, "#{GEM_NAME}/services/*.rb"].map do |path| service = Service.fabricate path path = service if service end.compact INTERPRETERS = HOOK_CODES.map {|hook_code| hook_code = hook_code.interpreter} end