Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ gemspec
gem "rake"
gem "rspec"
gem "simplecov", require: false
gem "standard", "1.54.0", require: false
gem "standard", "1.55.0", require: false
gem "rubocop", require: false
gem "rubocop-disable_syntax", require: false
gem "rubocop-performance", require: false
Expand Down
33 changes: 17 additions & 16 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ GEM
ast (2.4.3)
diff-lcs (1.6.2)
docile (1.4.1)
json (2.19.8)
json (2.19.9)
language_server-protocol (3.17.0.5)
lint_roller (1.1.0)
parallel (1.28.0)
parallel (2.1.0)
parser (3.3.11.1)
ast (~> 2.4.1)
racc
Expand All @@ -34,11 +34,11 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.7)
rubocop (1.84.2)
rubocop (1.87.0)
json (~> 2.3)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.1.0)
parallel (~> 1.10)
parallel (>= 1.10)
parser (>= 3.3.0.2)
rainbow (>= 2.2.2, < 4.0)
regexp_parser (>= 2.9.3, < 3.0)
Expand All @@ -58,20 +58,21 @@ GEM
rubocop-rake (0.7.1)
lint_roller (~> 1.1)
rubocop (>= 1.72.1)
rubocop-rspec (3.9.0)
rubocop-rspec (3.10.2)
lint_roller (~> 1.1)
rubocop (~> 1.81)
regexp_parser (>= 2.0)
rubocop (~> 1.86, >= 1.86.2)
ruby-progressbar (1.13.0)
simplecov (0.22.0)
docile (~> 1.1)
simplecov-html (~> 0.11)
simplecov_json_formatter (~> 0.1)
simplecov-html (0.13.2)
simplecov_json_formatter (0.1.4)
standard (1.54.0)
standard (1.55.0)
language_server-protocol (~> 3.17.0.2)
lint_roller (~> 1.0)
rubocop (~> 1.84.0)
rubocop (~> 1.87.0)
standard-custom (~> 1.0.0)
standard-performance (~> 1.8)
standard-custom (1.0.2)
Expand All @@ -98,18 +99,18 @@ DEPENDENCIES
rubocop-rake
rubocop-rspec
simplecov
standard (= 1.54.0)
standard (= 1.55.0)

CHECKSUMS
ast (2.4.3) sha256=954615157c1d6a382bc27d690d973195e79db7f55e9765ac7c481c60bdb4d383
bundler (4.0.13) sha256=19f08be7f27022cf0b89f27da0b044ae075e8270a9ef44ad248a932614e1ca3b
bundler (4.0.14) sha256=d09a0a965cf772266a7e49e83610be7c2f4e49e61134c42a56804bb383cc24b8
diff-lcs (1.6.2) sha256=9ae0d2cba7d4df3075fe8cd8602a8604993efc0dfa934cff568969efb1909962
docile (1.4.1) sha256=96159be799bfa73cdb721b840e9802126e4e03dfc26863db73647204c727f21e
errbit_plugin (0.7.0)
json (2.19.8) sha256=6354310fd76ef69b87d5bd1f38b40d730613baf90b6803d2d0a48f618d32dfaa
json (2.19.9) sha256=9b9025b7cdddafa38d316eca0b2358488e42d417045c1b90d216a9fefe46b79a
language_server-protocol (3.17.0.5) sha256=fd1e39a51a28bf3eec959379985a72e296e9f9acfce46f6a79d31ca8760803cc
lint_roller (1.1.0) sha256=2c0c845b632a7d172cb849cc90c1bce937a28c5c8ccccb50dfd46a485003cc87
parallel (1.28.0) sha256=33e6de1484baf2524792d178b0913fc8eb94c628d6cfe45599ad4458c638c970
parallel (2.1.0) sha256=b35258865c2e31134c5ecb708beaaf6772adf9d5efae28e93e99260877b09356
parser (3.3.11.1) sha256=d17ace7aabe3e72c3cc94043714be27cc6f852f104d81aa284c2281aecc65d54
prism (1.9.0) sha256=7b530c6a9f92c24300014919c9dcbc055bf4cdf51ec30aed099b06cd6674ef85
racc (1.8.1) sha256=4a7f6929691dbec8b5209a0b373bc2614882b55fc5d2e447a21aaa691303d62f
Expand All @@ -121,21 +122,21 @@ CHECKSUMS
rspec-expectations (3.13.5) sha256=33a4d3a1d95060aea4c94e9f237030a8f9eae5615e9bd85718fe3a09e4b58836
rspec-mocks (3.13.8) sha256=086ad3d3d17533f4237643de0b5c42f04b66348c28bf6b9c2d3f4a3b01af1d47
rspec-support (3.13.7) sha256=0640e5570872aafefd79867901deeeeb40b0c9875a36b983d85f54fb7381c47c
rubocop (1.84.2) sha256=5692cea54168f3dc8cb79a6fe95c5424b7ea893c707ad7a4307b0585e88dbf5f
rubocop (1.87.0) sha256=b9d9ddf55116a513f8ef2c7ae660662d8b49301f118d3f0df61865b33a5c188d
rubocop-ast (1.49.1) sha256=4412f3ee70f6fe4546cc489548e0f6fcf76cafcfa80fa03af67098ffed755035
rubocop-disable_syntax (0.2.0) sha256=1e61645773b3fc2f74e995ec65f605f7db59437c274fdfd4f385f60bf86af73e
rubocop-performance (1.26.1) sha256=cd19b936ff196df85829d264b522fd4f98b6c89ad271fa52744a8c11b8f71834
rubocop-rake (0.7.1) sha256=3797f2b6810c3e9df7376c26d5f44f3475eda59eb1adc38e6f62ecf027cbae4d
rubocop-rspec (3.9.0) sha256=8fa70a3619408237d789aeecfb9beef40576acc855173e60939d63332fdb55e2
rubocop-rspec (3.10.2) sha256=0b3e2ecc592cd10ecbf0095bb58d1e357905276e069643523cc19eb7495f65e2
ruby-progressbar (1.13.0) sha256=80fc9c47a9b640d6834e0dc7b3c94c9df37f08cb072b7761e4a71e22cff29b33
simplecov (0.22.0) sha256=fe2622c7834ff23b98066bb0a854284b2729a569ac659f82621fc22ef36213a5
simplecov-html (0.13.2) sha256=bd0b8e54e7c2d7685927e8d6286466359b6f16b18cb0df47b508e8d73c777246
simplecov_json_formatter (0.1.4) sha256=529418fbe8de1713ac2b2d612aa3daa56d316975d307244399fa4838c601b428
standard (1.54.0) sha256=7a4b08f83d9893083c8f03bc486f0feeb6a84d48233b40829c03ef4767ea0100
standard (1.55.0) sha256=8a8f2c3e681a4db3aafde1b301561b0f3d7c5f06c160167cb744a4d7baf0426e
standard-custom (1.0.2) sha256=424adc84179a074f1a2a309bb9cf7cd6bfdb2b6541f20c6bf9436c0ba22a652b
standard-performance (1.9.0) sha256=49483d31be448292951d80e5e67cdcb576c2502103c7b40aec6f1b6e9c88e3f2
unicode-display_width (3.2.0) sha256=0cdd96b5681a5949cdbc2c55e7b420facae74c4aaf9a9815eee1087cb1853c42
unicode-emoji (4.2.0) sha256=519e69150f75652e40bf736106cfbc8f0f73aa3fb6a65afe62fefa7f80b0f80f

BUNDLED WITH
4.0.13
4.0.14
48 changes: 24 additions & 24 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ Errbit plugins.

## Creating plugins

ErrbitPlugins are Ruby gems that extend the functionality of Errbit. To get
started, create a Ruby gem and add 'errbit_plugin' as a dependency in your
Errbit plugins are Ruby gems that extend the functionality of Errbit. To get
started, create a Ruby gem and add `errbit_plugin` as a dependency in your
gem's gemspec.

Now you can start adding plugins. At the moment, there is only one kind of
Expand All @@ -18,32 +18,32 @@ plugin you can create, and that is the issue tracker.
### Issue Trackers

An issue tracker plugin is a Ruby class that enables you to link errors within
errbit to an issue in an external issue tracker like GitHub. An app within
errbit can be associated an issue tracker or not. When there is an association,
errbit users can choose 'create issue' from an error page which will both
create an issue on the external issue tracker out of the given error and link
that issue to the errbit error. Likewise, a user can also choose 'close issue'
to close the issue on the external issue tracker, if your plugin provides a
method to do so.
Errbit to an issue in an external issue tracker like GitHub. An app within
Errbit can be associated with an issue tracker or not. When there is an
association, Errbit users can choose 'create issue' from an error page which
will both create an issue on the external issue tracker out of the given
error and link that issue to the Errbit error. Likewise, a user can also
choose 'close issue' to close the issue on the external issue tracker, if your
plugin provides a method to do so.

Your issue tracker plugin is responsible for providing the interface defined by
ErrbitPlugin::IssueTracker. All of the required methods must be implemented and
the class must extend ErrbitPlugin::IssueTracker. Here's an example:
`ErrbitPlugin::IssueTracker`. All the required methods must be implemented and
the class must extend `ErrbitPlugin::IssueTracker`. Here's an example:

```ruby
class MyIssueTracker < ErrbitPlugin::IssueTracker

# A unique label for your tracker plugin used internally by errbit
# A unique label for your tracker plugin used internally by Errbit
def self.label
'my-tracker'
"my-tracker"
end

def self.note
'a note about this tracker that users will see'
"a note about this tracker that users will see"
end

# Form fields that will be presented to the administrator when setting up
# or editing the errbit app. The values we collect will be availble for use
# or editing the Errbit app. The values we collect will be available for use
# later when we have an instance of this class.
def self.fields
{
Expand All @@ -63,14 +63,14 @@ class MyIssueTracker < ErrbitPlugin::IssueTracker
# and the binary icon data.
def self.icons
@icons ||= {
create: [ 'image/png', File.read('./path/to/create.png') ],
goto: [ 'image/png', File.read('./path/to/goto.png') ],
inactive: [ 'image/png', File.read('./path/to/inactive.png') ],
create: [ "image/png", File.read("./path/to/create.png") ],
goto: [ "image/png", File.read("./path/to/goto.png") ],
inactive: [ "image/png", File.read("./path/to/inactive.png") ],
}
end

# If this tracker can be in a configured or non-configured state, you can let
# errbit know by returning a Boolean here
# Errbit know by returning a Boolean here
def configured?
# In this case, we'll say this issue tracker is configured when username
# and password are set
Expand All @@ -83,7 +83,7 @@ class MyIssueTracker < ErrbitPlugin::IssueTracker
if options[:username]
{}
else
{ field_one: 'username must be present' }
{ field_one: "username must be present" }
end
Comment on lines 83 to 87
end

Expand All @@ -95,7 +95,7 @@ class MyIssueTracker < ErrbitPlugin::IssueTracker
def create_issue(title, body, user: {})
# Create an issue! Then update the problem to link it.

'http://sometracker.com/my/issue/123'
"https://sometracker.com/my/issue/123"
end

# This method is optional. Errbit will create body text for your issue by
Expand All @@ -107,10 +107,10 @@ class MyIssueTracker < ErrbitPlugin::IssueTracker
# If you don't implement this method, Errbit will render a body using a
# default template
#
# @see http://apidock.com/rails/ActionController/Base/render_to_string
# @see https://apidock.com/rails/ActionController/Base/render_to_string
def render_body_args
# In this example, we want to render a special file
['/path/to/some/template', formats: [:rdoc]]
["/path/to/some/template", formats: [:rdoc]]
end

# This method is optional, and is where you actually go close the issue on
Expand All @@ -124,7 +124,7 @@ class MyIssueTracker < ErrbitPlugin::IssueTracker

# The URL for your remote issue tracker
def url
'http://some-remote-tracker.com'
"https://some-remote-tracker.com"
end
end
```
Expand Down