prpr 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +8 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CODE_OF_CONDUCT.md +13 -0
- data/CONTRIBUTING.md +3 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +77 -0
- data/LICENSE.txt +21 -0
- data/MEMBERS.md +1 -0
- data/README.md +64 -0
- data/Rakefile +6 -0
- data/bin/prpr +9 -0
- data/bin/server +22 -0
- data/docs/webhook.png +0 -0
- data/lib/prpr.rb +16 -0
- data/lib/prpr/action/base.rb +16 -0
- data/lib/prpr/config/env.rb +31 -0
- data/lib/prpr/config/github.rb +32 -0
- data/lib/prpr/event/commit_comment.rb +6 -0
- data/lib/prpr/event/event.rb +30 -0
- data/lib/prpr/event/issue_comment.rb +6 -0
- data/lib/prpr/event/pull_request.rb +8 -0
- data/lib/prpr/event/pull_request_review_comment.rb +6 -0
- data/lib/prpr/event/push.rb +6 -0
- data/lib/prpr/handler/base.rb +48 -0
- data/lib/prpr/publisher/adapter/base.rb +23 -0
- data/lib/prpr/publisher/adapter/console.rb +11 -0
- data/lib/prpr/publisher/message.rb +21 -0
- data/lib/prpr/repository/github.rb +45 -0
- data/lib/prpr/runner.rb +17 -0
- data/lib/prpr/version.rb +3 -0
- data/prpr.gemspec +31 -0
- metadata +190 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 1a7cd0ee0e956e0f78c0bc03fe8627019869b4ce
|
4
|
+
data.tar.gz: bc8378dc5458e5e95a72e5ea7219b47359f76bf9
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: a111a19e2c001267189eacc5d4cc7f0e47cef7ca615f310b9abff4f176bcf870510b5a1820526b4caa160fe672b10426fe96ea9be35e9a6680ad5ddf5859a99c
|
7
|
+
data.tar.gz: f911008a115e369296010d45c7fb452dff0db147b7e643127fc30ede0a53678ea1e6c9beecdcf6b454b0eefaebed1750fbe46ec60d548266f9b1e12230cbdd7a
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,13 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
|
4
|
+
|
5
|
+
We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, ethnicity, age, or religion.
|
6
|
+
|
7
|
+
Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
|
8
|
+
|
9
|
+
Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
|
10
|
+
|
11
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
|
12
|
+
|
13
|
+
This Code of Conduct is adapted from the [Contributor Covenant](http://contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
|
data/CONTRIBUTING.md
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
prpr (0.1.0)
|
5
|
+
hashie
|
6
|
+
octokit
|
7
|
+
sinatra
|
8
|
+
|
9
|
+
GEM
|
10
|
+
remote: https://rubygems.org/
|
11
|
+
specs:
|
12
|
+
addressable (2.3.8)
|
13
|
+
codeclimate-test-reporter (0.4.8)
|
14
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
15
|
+
coderay (1.1.0)
|
16
|
+
diff-lcs (1.2.5)
|
17
|
+
docile (1.1.5)
|
18
|
+
faraday (0.9.1)
|
19
|
+
multipart-post (>= 1.2, < 3)
|
20
|
+
hashie (3.4.2)
|
21
|
+
json (1.8.3)
|
22
|
+
method_source (0.8.2)
|
23
|
+
multipart-post (2.0.0)
|
24
|
+
octokit (4.1.0)
|
25
|
+
sawyer (~> 0.6.0, >= 0.5.3)
|
26
|
+
pry (0.10.1)
|
27
|
+
coderay (~> 1.1.0)
|
28
|
+
method_source (~> 0.8.1)
|
29
|
+
slop (~> 3.4)
|
30
|
+
rack (1.6.4)
|
31
|
+
rack-protection (1.5.3)
|
32
|
+
rack
|
33
|
+
rake (10.4.2)
|
34
|
+
rspec (3.3.0)
|
35
|
+
rspec-core (~> 3.3.0)
|
36
|
+
rspec-expectations (~> 3.3.0)
|
37
|
+
rspec-mocks (~> 3.3.0)
|
38
|
+
rspec-core (3.3.2)
|
39
|
+
rspec-support (~> 3.3.0)
|
40
|
+
rspec-expectations (3.3.1)
|
41
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
42
|
+
rspec-support (~> 3.3.0)
|
43
|
+
rspec-mocks (3.3.2)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.3.0)
|
46
|
+
rspec-support (3.3.0)
|
47
|
+
sawyer (0.6.0)
|
48
|
+
addressable (~> 2.3.5)
|
49
|
+
faraday (~> 0.8, < 0.10)
|
50
|
+
simplecov (0.10.0)
|
51
|
+
docile (~> 1.1.0)
|
52
|
+
json (~> 1.8)
|
53
|
+
simplecov-html (~> 0.10.0)
|
54
|
+
simplecov-html (0.10.0)
|
55
|
+
sinatra (1.4.6)
|
56
|
+
rack (~> 1.4)
|
57
|
+
rack-protection (~> 1.4)
|
58
|
+
tilt (>= 1.3, < 3)
|
59
|
+
slop (3.6.0)
|
60
|
+
tilt (2.0.1)
|
61
|
+
ultrahook (0.1.4)
|
62
|
+
json (>= 1.8.0)
|
63
|
+
|
64
|
+
PLATFORMS
|
65
|
+
ruby
|
66
|
+
|
67
|
+
DEPENDENCIES
|
68
|
+
bundler (~> 1.10)
|
69
|
+
codeclimate-test-reporter
|
70
|
+
prpr!
|
71
|
+
pry
|
72
|
+
rake (~> 10.0)
|
73
|
+
rspec
|
74
|
+
ultrahook
|
75
|
+
|
76
|
+
BUNDLED WITH
|
77
|
+
1.10.6
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 mzp
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/MEMBERS.md
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
* @mzp: @mzp_other_name
|
data/README.md
ADDED
@@ -0,0 +1,64 @@
|
|
1
|
+
# Prpr [![Build Status](https://travis-ci.org/mzp/prpr.svg?branch=master)](https://travis-ci.org/mzp/prpr) [![Code Climate](https://codeclimate.com/github/mzp/prpr/badges/gpa.svg)](https://codeclimate.com/github/mzp/prpr)
|
2
|
+
|
3
|
+
Prpr is pull requests' reaction bot.
|
4
|
+
|
5
|
+
## Plugins
|
6
|
+
### Handler
|
7
|
+
Handler provides various behaviors.
|
8
|
+
|
9
|
+
* [prpr-checklist](https://github.com/mzp/prpr-checklist)
|
10
|
+
* [prpr-conflict_label](https://github.com/mzp/prpr-conflict_label)
|
11
|
+
* [prpr-review_label](https://github.com/mzp/prpr-review_label)
|
12
|
+
* [prpr-mention_comment](https://github.com/mzp/prpr-mention_comment)
|
13
|
+
* [prpr-gemfile](https://github.com/mzp/prpr-gemfile)
|
14
|
+
|
15
|
+
### Publisher adapter
|
16
|
+
Publish adapter provides bridge to some chat service.
|
17
|
+
|
18
|
+
* [prpr-slack](https://github.com/mzp/prpr-slack)
|
19
|
+
|
20
|
+
## Configuration
|
21
|
+
### Env
|
22
|
+
Store configuration value in envorinment variables.
|
23
|
+
They are easy to change between deploys without changing any code.
|
24
|
+
|
25
|
+
```
|
26
|
+
GITHUB_ACCESS_TOKEN - access token for your bot
|
27
|
+
GITHUB_HOST - github host for github enterprise
|
28
|
+
```
|
29
|
+
|
30
|
+
Your personal access token could be created at [settings](https://github.com/settings/tokens).
|
31
|
+
|
32
|
+
### Gemfile
|
33
|
+
|
34
|
+
All you need to use your favorite plugins is to write their names into Gemfile.
|
35
|
+
Prpr will load them before running.
|
36
|
+
|
37
|
+
```ruby
|
38
|
+
# Gemfile
|
39
|
+
gem "prpr", github: "mzp/prpr"
|
40
|
+
gem "prpr-slack", github: "mzp/prpr-slack"
|
41
|
+
gem "prpr-checklist", github: "mzp/prpr-checklist"
|
42
|
+
gem "prpr-conflict_label", github: "mzp/prpr-conflict_label"
|
43
|
+
....
|
44
|
+
```
|
45
|
+
|
46
|
+
## Setup
|
47
|
+
### Deploy
|
48
|
+
See [prpr-template](https://github.com/mzp/prpr-template) for example.
|
49
|
+
|
50
|
+
[![Deploy](https://www.herokucdn.com/deploy/button.png)](https://heroku.com/deploy?template=https://github.com/mzp/prpr-template)
|
51
|
+
|
52
|
+
### Setup webhook
|
53
|
+
|
54
|
+
Open webhook setting of your github repository, and input lik following.
|
55
|
+
|
56
|
+
* Payload URL: http://prpr.example.com
|
57
|
+
* Content type: `application/x-www-form-url-encoded`
|
58
|
+
* Which events would you like to trigger this webhook?: `Send me everytihng`
|
59
|
+
|
60
|
+
![Webhook](https://raw.githubusercontent.com/mzp/prpr/master/docs/webhook.png)
|
61
|
+
|
62
|
+
## LICENSE
|
63
|
+
|
64
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/prpr
ADDED
data/bin/server
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
require 'prpr'
|
6
|
+
require "sinatra/base"
|
7
|
+
|
8
|
+
class PrprServer < Sinatra::Base
|
9
|
+
enable :logging
|
10
|
+
|
11
|
+
post '/' do
|
12
|
+
begin
|
13
|
+
Prpr::Runner.new.call params['payload'], event: request.env['HTTP_X_GITHUB_EVENT']
|
14
|
+
'ok'
|
15
|
+
rescue => e
|
16
|
+
logger.error e.message
|
17
|
+
"Error: #{e.message}\n#{e.backtrace}"
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
run!
|
22
|
+
end
|
data/docs/webhook.png
ADDED
Binary file
|
data/lib/prpr.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require 'prpr/version'
|
2
|
+
require 'prpr/runner'
|
3
|
+
require 'prpr/config/env'
|
4
|
+
require 'prpr/config/github'
|
5
|
+
require 'prpr/repository/github'
|
6
|
+
require 'prpr/event/event'
|
7
|
+
require 'prpr/event/commit_comment'
|
8
|
+
require 'prpr/event/issue_comment'
|
9
|
+
require 'prpr/event/pull_request'
|
10
|
+
require 'prpr/event/pull_request_review_comment'
|
11
|
+
require 'prpr/event/push'
|
12
|
+
require 'prpr/action/base'
|
13
|
+
require 'prpr/handler/base'
|
14
|
+
require 'prpr/publisher/message'
|
15
|
+
require 'prpr/publisher/adapter/base'
|
16
|
+
require 'prpr/publisher/adapter/console'
|
@@ -0,0 +1,31 @@
|
|
1
|
+
module Prpr
|
2
|
+
module Config
|
3
|
+
class Env
|
4
|
+
class << self
|
5
|
+
def default
|
6
|
+
@default ||= new
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def [](name)
|
11
|
+
ENV[name.to_s.upcase]
|
12
|
+
end
|
13
|
+
|
14
|
+
def format(name, params = {})
|
15
|
+
self[name].to_s % symbolize_keys(params.to_h)
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def symbolize_keys(hash)
|
21
|
+
ret = {}
|
22
|
+
|
23
|
+
hash.keys.each do|key|
|
24
|
+
ret[key.to_sym] = hash[key]
|
25
|
+
end
|
26
|
+
|
27
|
+
ret
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'open-uri'
|
2
|
+
|
3
|
+
module Prpr
|
4
|
+
module Config
|
5
|
+
class Github
|
6
|
+
attr_reader :repository, :branch
|
7
|
+
|
8
|
+
def initialize(repository, branch: 'master')
|
9
|
+
@repository = repository
|
10
|
+
@branch = branch
|
11
|
+
end
|
12
|
+
|
13
|
+
def read(path)
|
14
|
+
decode_content(path).tap { |s| s.force_encoding('utf-8') }
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def decode_content(path)
|
20
|
+
Base64.decode64 resource(path).content
|
21
|
+
end
|
22
|
+
|
23
|
+
def resource(path)
|
24
|
+
github.content(repository, path: path, ref: branch)
|
25
|
+
end
|
26
|
+
|
27
|
+
def github
|
28
|
+
@github ||= Prpr::Repository::Github.default
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'prpr/event/pull_request'
|
2
|
+
require 'json'
|
3
|
+
|
4
|
+
module Prpr
|
5
|
+
module Event
|
6
|
+
class UnknownEvent < StandardError
|
7
|
+
end
|
8
|
+
|
9
|
+
class Event
|
10
|
+
class << self
|
11
|
+
def parse(payload, event:)
|
12
|
+
case event
|
13
|
+
when 'pull_request'
|
14
|
+
PullRequest.new(JSON.parse(payload))
|
15
|
+
when 'push'
|
16
|
+
Push.new(JSON.parse(payload))
|
17
|
+
when 'issue_comment'
|
18
|
+
IssueComment.new(JSON.parse(payload))
|
19
|
+
when 'commit_comment'
|
20
|
+
CommitComment.new(JSON.parse(payload))
|
21
|
+
when 'pull_request_review_comment'
|
22
|
+
PullRequestReviewComment.new(JSON.parse(payload))
|
23
|
+
else
|
24
|
+
fail UnknownEvent, event
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,48 @@
|
|
1
|
+
module Prpr
|
2
|
+
module Handler
|
3
|
+
class Base
|
4
|
+
class Entry < Struct.new(:klass, :event, :queries, :handler)
|
5
|
+
end
|
6
|
+
|
7
|
+
AnyEvent = Object
|
8
|
+
|
9
|
+
class << self
|
10
|
+
def handle(event, queries = {}, &handler)
|
11
|
+
entries << Entry.new(self, event, queries, handler)
|
12
|
+
end
|
13
|
+
|
14
|
+
def entries
|
15
|
+
@@entries ||= []
|
16
|
+
end
|
17
|
+
|
18
|
+
def on_event(event)
|
19
|
+
entries
|
20
|
+
.select { |entry| match?(entry, event) }
|
21
|
+
.each { |entry| invoke(entry, event) }
|
22
|
+
end
|
23
|
+
|
24
|
+
private
|
25
|
+
|
26
|
+
def match?(entry, event)
|
27
|
+
entry.event === event &&
|
28
|
+
entry.queries.all? { |query| query_match?(query, event) }
|
29
|
+
end
|
30
|
+
|
31
|
+
def query_match?(query, event)
|
32
|
+
key, value = *query
|
33
|
+
value === event.send(key)
|
34
|
+
end
|
35
|
+
|
36
|
+
def invoke(entry, event)
|
37
|
+
obj = entry.klass.new(event)
|
38
|
+
obj.instance_eval(&entry.handler)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
attr_reader :event
|
43
|
+
def initialize(event)
|
44
|
+
@event = event
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
module Prpr
|
2
|
+
module Publisher
|
3
|
+
module Adapter
|
4
|
+
class Base
|
5
|
+
class << self
|
6
|
+
def inherited(adapter)
|
7
|
+
adapters << adapter.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def adapters
|
11
|
+
@@adapters ||= []
|
12
|
+
end
|
13
|
+
|
14
|
+
def broadcast(message)
|
15
|
+
adapters.each do |adapter|
|
16
|
+
adapter.publish(message)
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Prpr
|
2
|
+
module Publisher
|
3
|
+
class Message
|
4
|
+
def initialize(orininal={})
|
5
|
+
@original = orininal
|
6
|
+
end
|
7
|
+
|
8
|
+
def body
|
9
|
+
@original[:body]
|
10
|
+
end
|
11
|
+
|
12
|
+
def from
|
13
|
+
OpenStruct.new @original[:from]
|
14
|
+
end
|
15
|
+
|
16
|
+
def room
|
17
|
+
@original[:room]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,45 @@
|
|
1
|
+
require 'octokit'
|
2
|
+
|
3
|
+
module Prpr
|
4
|
+
module Repository
|
5
|
+
class Github
|
6
|
+
class << self
|
7
|
+
def default
|
8
|
+
Octokit::Client.new(client_options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def client_options
|
12
|
+
client_options_with_nil_value.reject {|key, value| value.nil? }
|
13
|
+
end
|
14
|
+
|
15
|
+
def client_options_with_nil_value
|
16
|
+
{
|
17
|
+
access_token: access_token,
|
18
|
+
api_endpoint: api_endpoint,
|
19
|
+
web_endpoint: web_endpoint,
|
20
|
+
}
|
21
|
+
end
|
22
|
+
|
23
|
+
def web_endpoint
|
24
|
+
"https://#{github_host}/" if github_host
|
25
|
+
end
|
26
|
+
|
27
|
+
def api_endpoint
|
28
|
+
"https://#{github_host}/api/v3" if github_host
|
29
|
+
end
|
30
|
+
|
31
|
+
def env
|
32
|
+
@env ||= Prpr::Config::Env.default
|
33
|
+
end
|
34
|
+
|
35
|
+
def access_token
|
36
|
+
env[:github_access_token]
|
37
|
+
end
|
38
|
+
|
39
|
+
def github_host
|
40
|
+
env[:github_host]
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
data/lib/prpr/runner.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
module Prpr
|
2
|
+
class Runner
|
3
|
+
def initialize
|
4
|
+
bundle
|
5
|
+
end
|
6
|
+
|
7
|
+
def call(payload, event:)
|
8
|
+
e = Prpr::Event::Event.parse(payload, event: event)
|
9
|
+
Prpr::Handler::Base.on_event e
|
10
|
+
end
|
11
|
+
|
12
|
+
def bundle
|
13
|
+
::Bundler.require
|
14
|
+
rescue ::Bundler::GemfileNotFound
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
data/lib/prpr/version.rb
ADDED
data/prpr.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'prpr/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "prpr"
|
8
|
+
spec.version = Prpr::VERSION
|
9
|
+
spec.authors = ["mzp"]
|
10
|
+
spec.email = ["mzpppp@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = "Prpr is pull requests' reaction bot."
|
13
|
+
spec.description = "Prpr is pull requests' reaction bot framework. It is extended by gems."
|
14
|
+
spec.homepage = "https://github.com/mzp/prpr"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "bin"
|
19
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.add_dependency "sinatra"
|
23
|
+
spec.add_dependency "octokit"
|
24
|
+
spec.add_dependency "hashie"
|
25
|
+
|
26
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
27
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
+
spec.add_development_dependency "rspec"
|
29
|
+
spec.add_development_dependency "pry"
|
30
|
+
spec.add_development_dependency "ultrahook"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,190 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: prpr
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- mzp
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sinatra
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: octokit
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: hashie
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.10'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.10'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: pry
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: ultrahook
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
description: Prpr is pull requests' reaction bot framework. It is extended by gems.
|
126
|
+
email:
|
127
|
+
- mzpppp@gmail.com
|
128
|
+
executables:
|
129
|
+
- prpr
|
130
|
+
- server
|
131
|
+
extensions: []
|
132
|
+
extra_rdoc_files: []
|
133
|
+
files:
|
134
|
+
- ".gitignore"
|
135
|
+
- ".rspec"
|
136
|
+
- ".travis.yml"
|
137
|
+
- CODE_OF_CONDUCT.md
|
138
|
+
- CONTRIBUTING.md
|
139
|
+
- Gemfile
|
140
|
+
- Gemfile.lock
|
141
|
+
- LICENSE.txt
|
142
|
+
- MEMBERS.md
|
143
|
+
- README.md
|
144
|
+
- Rakefile
|
145
|
+
- bin/prpr
|
146
|
+
- bin/server
|
147
|
+
- docs/webhook.png
|
148
|
+
- lib/prpr.rb
|
149
|
+
- lib/prpr/action/base.rb
|
150
|
+
- lib/prpr/config/env.rb
|
151
|
+
- lib/prpr/config/github.rb
|
152
|
+
- lib/prpr/event/commit_comment.rb
|
153
|
+
- lib/prpr/event/event.rb
|
154
|
+
- lib/prpr/event/issue_comment.rb
|
155
|
+
- lib/prpr/event/pull_request.rb
|
156
|
+
- lib/prpr/event/pull_request_review_comment.rb
|
157
|
+
- lib/prpr/event/push.rb
|
158
|
+
- lib/prpr/handler/base.rb
|
159
|
+
- lib/prpr/publisher/adapter/base.rb
|
160
|
+
- lib/prpr/publisher/adapter/console.rb
|
161
|
+
- lib/prpr/publisher/message.rb
|
162
|
+
- lib/prpr/repository/github.rb
|
163
|
+
- lib/prpr/runner.rb
|
164
|
+
- lib/prpr/version.rb
|
165
|
+
- prpr.gemspec
|
166
|
+
homepage: https://github.com/mzp/prpr
|
167
|
+
licenses:
|
168
|
+
- MIT
|
169
|
+
metadata: {}
|
170
|
+
post_install_message:
|
171
|
+
rdoc_options: []
|
172
|
+
require_paths:
|
173
|
+
- lib
|
174
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
|
+
requirements:
|
181
|
+
- - ">="
|
182
|
+
- !ruby/object:Gem::Version
|
183
|
+
version: '0'
|
184
|
+
requirements: []
|
185
|
+
rubyforge_project:
|
186
|
+
rubygems_version: 2.4.5.1
|
187
|
+
signing_key:
|
188
|
+
specification_version: 4
|
189
|
+
summary: Prpr is pull requests' reaction bot.
|
190
|
+
test_files: []
|