Skip to content

Modernize #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 16 commits into
base: master
Choose a base branch
from
Draft
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
.bundle
.config
.yardoc
Gemfile.lock
InstalledFiles
_yardoc
coverage
Expand All @@ -18,3 +17,4 @@ tmp
*.swp
.rspec
vendor/bundle
.idea/
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.1.6
9 changes: 0 additions & 9 deletions .travis.yml

This file was deleted.

3 changes: 3 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec
248 changes: 248 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,248 @@
PATH
remote: .
specs:
errbit_github_plugin (0.4.0)
errbit_plugin
octokit
railties (>= 6.1.0)

GEM
remote: https://rubygems.org/
specs:
actionpack (7.2.2.1)
actionview (= 7.2.2.1)
activesupport (= 7.2.2.1)
nokogiri (>= 1.8.5)
racc
rack (>= 2.2.4, < 3.2)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
useragent (~> 0.16)
actionview (7.2.2.1)
activesupport (= 7.2.2.1)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activesupport (7.2.2.1)
base64
benchmark (>= 0.3)
bigdecimal
concurrent-ruby (~> 1.0, >= 1.3.1)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
logger (>= 1.4.2)
minitest (>= 5.1)
securerandom (>= 0.3)
tzinfo (~> 2.0, >= 2.0.5)
addressable (2.8.7)
public_suffix (>= 2.0.2, < 7.0)
base64 (0.2.0)
benchmark (0.4.0)
bigdecimal (3.1.9)
builder (3.3.0)
coderay (1.1.3)
concurrent-ruby (1.3.5)
connection_pool (2.5.0)
coveralls (0.8.23)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
term-ansicolor (~> 1.3)
thor (>= 0.19.4, < 2.0)
tins (~> 1.6)
crass (1.0.6)
date (3.4.1)
diff-lcs (1.6.0)
docile (1.4.1)
drb (2.2.1)
errbit_plugin (0.6.0)
erubi (1.13.1)
faraday (2.12.2)
faraday-net_http (>= 2.0, < 3.5)
json
logger
faraday-net_http (3.4.0)
net-http (>= 0.5.0)
ffi (1.17.1)
ffi (1.17.1-aarch64-linux-gnu)
ffi (1.17.1-aarch64-linux-musl)
ffi (1.17.1-arm-linux-gnu)
ffi (1.17.1-arm-linux-musl)
ffi (1.17.1-arm64-darwin)
ffi (1.17.1-x86-linux-gnu)
ffi (1.17.1-x86-linux-musl)
ffi (1.17.1-x86_64-darwin)
ffi (1.17.1-x86_64-linux-gnu)
ffi (1.17.1-x86_64-linux-musl)
formatador (1.1.0)
guard (2.19.1)
formatador (>= 0.2.4)
listen (>= 2.7, < 4.0)
logger (~> 1.6)
lumberjack (>= 1.0.12, < 2.0)
nenv (~> 0.1)
notiffany (~> 0.0)
ostruct (~> 0.6)
pry (>= 0.13.0)
shellany (~> 0.0)
thor (>= 0.18.1)
guard-compat (1.2.1)
guard-rspec (4.7.3)
guard (~> 2.1)
guard-compat (~> 1.1)
rspec (>= 2.99.0, < 4.0)
i18n (1.14.7)
concurrent-ruby (~> 1.0)
io-console (0.8.0)
irb (1.15.1)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
json (2.10.2)
listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.6.6)
loofah (2.24.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
lumberjack (1.2.10)
method_source (1.1.0)
mini_portile2 (2.8.8)
minitest (5.25.5)
nenv (0.3.0)
net-http (0.6.0)
uri
nokogiri (1.18.5)
mini_portile2 (~> 2.8.2)
racc (~> 1.4)
nokogiri (1.18.5-aarch64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.5-aarch64-linux-musl)
racc (~> 1.4)
nokogiri (1.18.5-arm-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.5-arm-linux-musl)
racc (~> 1.4)
nokogiri (1.18.5-arm64-darwin)
racc (~> 1.4)
nokogiri (1.18.5-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.18.5-x86_64-linux-gnu)
racc (~> 1.4)
nokogiri (1.18.5-x86_64-linux-musl)
racc (~> 1.4)
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
octokit (9.2.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
ostruct (0.6.1)
pp (0.6.2)
prettyprint
prettyprint (0.2.0)
pry (0.15.2)
coderay (~> 1.1)
method_source (~> 1.0)
psych (5.2.3)
date
stringio
public_suffix (6.0.1)
racc (1.8.1)
rack (3.1.12)
rack-session (2.1.0)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.2.0)
rack (>= 1.3)
rackup (2.2.1)
rack (>= 3)
rails-dom-testing (2.2.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.2.2.1)
actionpack (= 7.2.2.1)
activesupport (= 7.2.2.1)
irb (~> 1.13)
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rdoc (6.12.0)
psych (>= 4.0.0)
reline (0.6.0)
io-console (~> 0.5)
rspec (3.13.0)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.3)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-support (3.13.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
securerandom (0.4.1)
shellany (0.0.1)
simplecov (0.16.1)
docile (~> 1.1)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
stringio (3.1.5)
sync (0.5.0)
term-ansicolor (1.11.2)
tins (~> 1.0)
thor (1.3.2)
tins (1.38.0)
bigdecimal
sync
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (1.0.3)
useragent (0.16.11)
zeitwerk (2.6.18)

PLATFORMS
aarch64-linux-gnu
aarch64-linux-musl
arm-linux-gnu
arm-linux-musl
arm64-darwin
ruby
x86-linux-gnu
x86-linux-musl
x86_64-darwin
x86_64-linux-gnu
x86_64-linux-musl

DEPENDENCIES
activesupport
bundler
coveralls
errbit_github_plugin!
guard
guard-rspec
rake
rspec

BUNDLED WITH
2.6.6
5 changes: 1 addition & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
# Errbit Github Plugin [![TravisCI][travis-img-url]][travis-ci-url]

[travis-img-url]: https://travis-ci.org/errbit/errbit_github_plugin.svg?branch=master
[travis-ci-url]: http://travis-ci.org/errbit/errbit_github_plugin
# Errbit GitHub Plugin

This plugin provides GitHub issue tracker integration for Errbit and it is the
only plugin included by default in Errbit.
2 changes: 2 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
# frozen_string_literal: true

require "bundler/gem_tasks"
1 change: 1 addition & 0 deletions app/assets/config/errbit_github_plugin.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
//= link_tree ../images
File renamed without changes
4 changes: 3 additions & 1 deletion errbit_github_plugin.gemspec
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# coding: utf-8
# frozen_string_literal: true

lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'errbit_github_plugin/version'
Expand All @@ -20,6 +21,7 @@ Gem::Specification.new do |spec|
spec.require_paths = ['lib']

spec.add_dependency 'errbit_plugin'
spec.add_dependency 'railties', ">= 6.1.0"
spec.add_dependency 'octokit'

spec.add_development_dependency 'rspec'
Expand Down
14 changes: 5 additions & 9 deletions lib/errbit_github_plugin.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,11 @@
# frozen_string_literal: true

require "errbit_github_plugin/version"
require 'errbit_github_plugin/error'
require 'errbit_github_plugin/issue_tracker'
require "errbit_github_plugin/engine"
require "errbit_github_plugin/error"
require "errbit_github_plugin/issue_tracker"

module ErrbitGithubPlugin
def self.root
File.expand_path '../..', __FILE__
end

def self.read_static_file(file)
File.read(File.join(self.root, 'static', file))
end
end

ErrbitPlugin::Registry.add_issue_tracker(ErrbitGithubPlugin::IssueTracker)
11 changes: 11 additions & 0 deletions lib/errbit_github_plugin/engine.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# frozen_string_literal: true

require "rails/engine"

module ErrbitGithubPlugin
class Engine < ::Rails::Engine
initializer :assets do
Rails.application.config.assets.paths << root.join("app", "assets", "images", "errbit_github_plugin")
end
end
end
5 changes: 4 additions & 1 deletion lib/errbit_github_plugin/error.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# frozen_string_literal: true

module ErrbitGithubPlugin
class AuthenticationError < Exception; end
class AuthenticationError < Exception
end
end
24 changes: 10 additions & 14 deletions lib/errbit_github_plugin/issue_tracker.rb
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
# frozen_string_literal: true

require 'octokit'

module ErrbitGithubPlugin
class IssueTracker < ErrbitPlugin::IssueTracker

LABEL = 'github'

NOTE = 'Please configure your github repository in the <strong>GITHUB ' <<
'REPO</strong> field above.<br/> Instead of providing your ' <<
'username & password, you can link your Github account to your ' <<
'user profile, and allow Errbit to create issues using your ' <<
NOTE = 'Please configure your github repository in the <strong>GitHub '
'repo</strong> field above.<br> Instead of providing your '
'username & password, you can link your GitHub account to your '
'user profile, and allow Errbit to create issues using your '
'OAuth token.'

FIELDS = {
Expand All @@ -33,16 +35,10 @@ def self.fields
end

def self.icons
@icons ||= {
create: [
'image/png', ErrbitGithubPlugin.read_static_file('github_create.png')
],
goto: [
'image/png', ErrbitGithubPlugin.read_static_file('github_goto.png'),
],
inactive: [
'image/png', ErrbitGithubPlugin.read_static_file('github_inactive.png'),
]
{
create: "github_create.png",
goto: "github_goto.png",
inactive: "github_inactive.png"
}
end

Expand Down
4 changes: 3 additions & 1 deletion lib/errbit_github_plugin/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
# frozen_string_literal: true

module ErrbitGithubPlugin
VERSION = '0.3.0'
VERSION = '0.4.0'
end
Loading