lita-gitlab-ci-hipchat 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +6 -4
- data/lib/lita/handlers/gitlab_ci_hipchat.rb +6 -4
- data/lita-gitlab-ci-hipchat.gemspec +2 -2
- data/spec/lita/handlers/gitlab_ci_hipchat_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 393585ffcc420680a4f02501cc41fd82c9f44a7c
|
4
|
+
data.tar.gz: 5553312d9ab9f2f9fdfe143708839f45d0cbe644
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0352a2d7ce5a05aeca20f6182790b8ac37eff722172fd846b6639c8bfd0cc775fd49a727f7322411b5a51b9adb28c257149cb70c0df93305135481087bb15057
|
7
|
+
data.tar.gz: b36e093919c0f7a016c64a6268415c45efa47c2ee9cbcd4d6aee31ae27b453dda5ded93f09dac002164dfbcabb6f6cc045d2c44395bb65add32fcf8c627be4fa
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# lita-gitlab-ci-hipchat
|
2
2
|
|
3
|
-
[![Build Status](https://travis-ci.org/Flink/lita-gitlab-ci-hipchat.svg?branch=develop)](https://travis-ci.org/Flink/lita-gitlab-ci-hipchat) [![Coverage Status](https://coveralls.io/repos/Flink/lita-gitlab-ci-hipchat/badge.png?branch=develop)](https://coveralls.io/r/Flink/lita-gitlab-ci-hipchat?branch=develop) [![Code Climate](https://codeclimate.com/github/Flink/lita-gitlab-ci-hipchat/badges/gpa.svg)](https://codeclimate.com/github/Flink/lita-gitlab-ci-hipchat)
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/lita-gitlab-ci-hipchat.svg)](http://badge.fury.io/rb/lita-gitlab-ci-hipchat) [![Build Status](https://travis-ci.org/Flink/lita-gitlab-ci-hipchat.svg?branch=develop)](https://travis-ci.org/Flink/lita-gitlab-ci-hipchat) [![Coverage Status](https://coveralls.io/repos/Flink/lita-gitlab-ci-hipchat/badge.png?branch=develop)](https://coveralls.io/r/Flink/lita-gitlab-ci-hipchat?branch=develop) [![Code Climate](https://codeclimate.com/github/Flink/lita-gitlab-ci-hipchat/badges/gpa.svg)](https://codeclimate.com/github/Flink/lita-gitlab-ci-hipchat) [![Dependency Status](https://gemnasium.com/Flink/lita-gitlab-ci-hipchat.svg)](https://gemnasium.com/Flink/lita-gitlab-ci-hipchat)
|
4
4
|
|
5
5
|
Receive and display nicely web hooks from GitLab CI in HipChat.
|
6
6
|
|
@@ -9,10 +9,12 @@ Receive and display nicely web hooks from GitLab CI in HipChat.
|
|
9
9
|
Add lita-gitlab-ci-hipchat to your Lita instance's Gemfile:
|
10
10
|
|
11
11
|
``` ruby
|
12
|
-
gem 'lita-gitlab-ci-hipchat'
|
12
|
+
gem 'lita-gitlab-ci-hipchat', '~> 1.1'
|
13
13
|
```
|
14
14
|
|
15
15
|
|
16
|
+
For Lita 3.x, use the 1.0 version of this gem.
|
17
|
+
|
16
18
|
## Configuration
|
17
19
|
|
18
20
|
```ruby
|
@@ -20,14 +22,14 @@ Lita.configure do |config|
|
|
20
22
|
# The API token for your bot’s user
|
21
23
|
config.handlers.gitlab_ci_hipchat.api_token = 'token'
|
22
24
|
# The room to be notified (HipChat name, not JID)
|
23
|
-
config.handlers.gitlab_ci_hipchat.room
|
25
|
+
config.handlers.gitlab_ci_hipchat.room = 'my_room'
|
24
26
|
end
|
25
27
|
```
|
26
28
|
|
27
29
|
## Usage
|
28
30
|
|
29
31
|
This handler add a HTTP route at `/gitlab-ci`. So you have to add a web
|
30
|
-
hook pointing to that URL (http://lita-bot.tld/gitlab-ci).
|
32
|
+
hook pointing to that URL in GitLab CI (http://lita-bot.tld/gitlab-ci).
|
31
33
|
|
32
34
|
## License
|
33
35
|
|
@@ -1,10 +1,12 @@
|
|
1
1
|
module Lita
|
2
2
|
module Handlers
|
3
|
-
class GitlabCiHipchat
|
4
|
-
|
3
|
+
class GitlabCiHipchat
|
4
|
+
extend Lita::Handler::HTTPRouter
|
5
5
|
|
6
|
-
|
7
|
-
|
6
|
+
config :api_token, type: String, required: true
|
7
|
+
config :room, type: String, required: true
|
8
|
+
|
9
|
+
http.post '/gitlab-ci', :receive
|
8
10
|
|
9
11
|
def receive(request, response)
|
10
12
|
json_data = JSON.parse(request.body.read)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-gitlab-ci-hipchat"
|
3
|
-
spec.version = "1.
|
3
|
+
spec.version = "1.1.0"
|
4
4
|
spec.authors = ["Loïc Guitaut"]
|
5
5
|
spec.email = ["flink@belfalas.eu"]
|
6
6
|
spec.description = %q{Receive and display nicely web hooks from GitLab CI in HipChat.}
|
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
|
|
14
14
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
15
15
|
spec.require_paths = ["lib"]
|
16
16
|
|
17
|
-
spec.add_runtime_dependency "lita", "
|
17
|
+
spec.add_runtime_dependency "lita", "~> 4.0"
|
18
18
|
spec.add_runtime_dependency "hipchat", "~> 1.3.0"
|
19
19
|
|
20
20
|
spec.add_development_dependency "bundler", "~> 1.3"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require "spec_helper"
|
2
2
|
|
3
3
|
describe Lita::Handlers::GitlabCiHipchat, lita_handler: true do
|
4
|
-
it {
|
4
|
+
it { is_expected.to route_http(:post, '/gitlab-ci').to(:receive) }
|
5
5
|
|
6
6
|
describe '#receive(request, response)' do
|
7
7
|
let(:request) { double(Rack::Request) }
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-gitlab-ci-hipchat
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loïc Guitaut
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-10-
|
11
|
+
date: 2014-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '4.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '4.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: hipchat
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|