Sha256: a270054fbcb1b27a8fd5d67f36631be015660830e985e85c09ae39f8ac4e0028
Contents?: true
Size: 1.13 KB
Versions: 79
Compression:
Stored size: 1.13 KB
Contents
require 'active_resource' module EgovUtils module Redmine def self.config EgovUtils::Settings.redmine end def self.configured? config['url'] && config['project_id'] end class Issue < ActiveResource::Base self.site = EgovUtils::Redmine.config['url'] self.ssl_options = {verify_mode: OpenSSL::SSL::VERIFY_NONE} headers["X-Redmine-API-Key"] = EgovUtils::Redmine.config['api_key'] if EgovUtils::Redmine.config['api_key'] def self.collection_path(prefix_options = {},query_options=nil) super query_options[:query_id] ||= EgovUtils::Redmine.config['query_id'] if EgovUtils::Redmine.config['query_id'] prefix_options[:project_id] ||= EgovUtils::Redmine.config['project_id'] "/projects/#{prefix_options[:project_id]}/#{collection_name}.#{format.extension}#{query_string(query_options)}" end def self.instantiate_collection(collection, original_params = {}, prefix_options = {}) collection = collection[collection_name] if collection[collection_name].is_a?(Array) super(collection, original_params, prefix_options) end end end end
Version data entries
79 entries across 79 versions & 1 rubygems