module Redmine

Redmine command line API

This gem provides a command-line API to the popular Redmine issue tracking system, using its REST API.

Constants

VERSION

Public Instance Methods

cli(args) click to toggle source
# File lib/redmine.rb, line 28
def cli(args)
  cache = PStore.new(configuration.http_cache)
  base_uri = URI.parse(configuration.base_uri)
  rest_client = RestClient.new(
    base_uri: base_uri,
    default_headers: {
      'X-Redmine-Api-Key' => configuration.api_token
    }
  )
  rest_client = AcceptJson.new(HttpCaching.new(rest_client, cache))
  Cli.new(
    redmine_client: Client.new(rest_client: rest_client)
  ).call(args)
end
configuration() click to toggle source
# File lib/redmine.rb, line 18
def configuration
  @configuration ||= Configuration.autoload
end
configure() { |configuration| ... } click to toggle source
# File lib/redmine.rb, line 22
def configure
  @configuration = Configuration.autoload
  yield @configuration
  @configuration.freeze
end