Class: Issuesrc::Issuers::IssuerInterface

Inherits:
Object
  • Object
show all
Defined in:
lib/issuers/issuers.rb

Overview

This class is here for documentation only. All classes in the Issuers module that want to be considered issuers need to implement this interface.

Instance Method Summary collapse

Constructor Details

#initialize(args, config, event_loop) ⇒ IssuerInterface

Returns a new instance of IssuerInterface.

Parameters:

  • args

    Command line arguments, as key => value.

  • config

    Arguments from the configuration file, as key => value.

  • event_loop (Issuesrc::EventLoop)

    An event loop that can be used to make asynchronous I/O.



20
# File 'lib/issuers/issuers.rb', line 20

def initialize(args, config, event_loop); end

Instance Method Details

#async_close_issue(issue_id) {|The| ... } ⇒ Object

Closes an issue.

Parameters:

  • issue_id

    The ID of the issue that should be closed.

Yield Parameters:



47
# File 'lib/issuers/issuers.rb', line 47

def async_close_issue(issue_id, &block); end

#async_create_issue(tag) {|The| ... } ⇒ Object

Opens a new issue with the information hold in tag. Sets the just created issue ID as tag‘s issue_id attribute.

Parameters:

Yield Parameters:



34
# File 'lib/issuers/issuers.rb', line 34

def async_create_issue(tag, &block); end

#async_load_issuesIssuesrc::Issuers::Issues

Loads all the open issues marked with DEFAULT_LABEL (or the label chose in the config) from the issue tracker.



27
# File 'lib/issuers/issuers.rb', line 27

def async_load_issues(); end

#async_update_issue(issue_id, tag) {|The| ... } ⇒ Object

Updates an existing issue with the information hold in tag.

Parameters:

  • issue_id

    The ID of the issue that should be updated.

  • tag (Issuesrc::Tag)

Yield Parameters:



41
# File 'lib/issuers/issuers.rb', line 41

def async_update_issue(issue_id, tag, &block); end

#async_update_or_close_issues(prev_issues, tags_by_issue_id) {|issue_id, tag, action| ... } ⇒ Object

Updates and closes a bunch of issues.

It matches the issues that are currently open in the issue tracker with the tags found in the source code. Those that are only in the issue tracker are closed. Those that are in both are updated with the information from the source code.

Reports what is being done to the passed block.

Parameters:

  • prev_issues

    An array of issues, as they are returned from async_load_issues.

  • tags_by_issue_id

Yield Parameters:

  • issue_id

    The ID of an issue.

  • tag (Issuesrc::Tag)

    The tag associated with the issue.

  • action

    Either :updated or :closed.



64
65
# File 'lib/issuers/issuers.rb', line 64

def async_update_or_close_issues(prev_issues, tags_by_issue_id, &block)
end