lita-redmine 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/lita/handlers/redmine.rb +8 -10
- data/lita-redmine.gemspec +2 -2
- data/spec/lita/handlers/redmine_spec.rb +2 -2
- data/spec/spec_helper.rb +1 -0
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bfa5a11c2c7865fa7f7bf36e49e4f7df03b5509e
|
4
|
+
data.tar.gz: 9f5e7d47f2a7b645c1371923dbdb23a1eac67c3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cbe1be44d39e61c64b13015347d6e3eb7d4cb6328745f872fe59ba876b7cb0681e93942617528cf95cf2b39583f582b7dc793e74616514a4592cd92c593769b4
|
7
|
+
data.tar.gz: 410b4807a82fbe10ed3021b06153a54b3a2e7b819768b682fb8b1d9cbdf1ca896e0d17737fcaa6f5f49afe8ab3810386be8f909d717ac437af6d8fae0d30e1b8
|
data/README.md
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
[![Build Status](https://travis-ci.org/josqu4red/lita-redmine.png?branch=master)](https://travis-ci.org/josqu4red/lita-redmine)
|
4
4
|
[![Coverage Status](https://coveralls.io/repos/josqu4red/lita-redmine/badge.png)](https://coveralls.io/r/josqu4red/lita-redmine)
|
5
5
|
|
6
|
-
**lita-
|
6
|
+
**lita-redmine** is a handler for [Lita](https://github.com/jimmycuadra/lita) that allows interaction with Redmine project management tool (or its fork, Chiliproject).
|
7
7
|
|
8
8
|
## Installation
|
9
9
|
|
@@ -4,28 +4,26 @@ module Lita
|
|
4
4
|
module Handlers
|
5
5
|
class Redmine < Handler
|
6
6
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
config.apikey = nil
|
11
|
-
end
|
7
|
+
config :type, default: :redmine # valid values: [:chiliproject, :redmine]
|
8
|
+
config :url
|
9
|
+
config :apikey
|
12
10
|
|
13
11
|
route /redmine\s+(\d+)/, :issue, help: { "redmine <issue #>" => "Displays issue url and subject" }
|
14
12
|
|
15
13
|
def issue(response)
|
16
|
-
if
|
17
|
-
redmine_url =
|
14
|
+
if config.url
|
15
|
+
redmine_url = config.url.chomp("/")
|
18
16
|
else
|
19
17
|
raise "Redmine URL must be defined ('config.handlers.redmine.url')"
|
20
18
|
end
|
21
19
|
|
22
|
-
if
|
23
|
-
apikey =
|
20
|
+
if config.apikey
|
21
|
+
apikey = config.apikey
|
24
22
|
else
|
25
23
|
raise "Redmine API key must be defined ('config.handlers.redmine.apikey')"
|
26
24
|
end
|
27
25
|
|
28
|
-
case
|
26
|
+
case config.type
|
29
27
|
when :redmine
|
30
28
|
apikey_header = "X-Redmine-API-Key"
|
31
29
|
when :chiliproject
|
data/lita-redmine.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = "lita-redmine"
|
3
|
-
spec.version = "0.0.
|
3
|
+
spec.version = "0.0.2"
|
4
4
|
spec.authors = ["Jonathan Amiez"]
|
5
5
|
spec.email = ["jonathan.amiez@gmail.com"]
|
6
6
|
spec.description = "Redmine interaction through Lita"
|
@@ -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
|
|
19
19
|
spec.add_development_dependency "bundler", "~> 1.3"
|
20
20
|
spec.add_development_dependency "rake"
|
@@ -10,8 +10,8 @@ describe Lita::Handlers::Redmine, lita_handler: true do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
-
it {
|
14
|
-
it {
|
13
|
+
it { is_expected.to route("get me redmine 12345, please").to(:issue) }
|
14
|
+
it { is_expected.not_to route("redmine foo").to(:issue) }
|
15
15
|
|
16
16
|
describe "#issue" do
|
17
17
|
let(:response) do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-redmine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jonathan Amiez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|
@@ -16,14 +16,14 @@ dependencies:
|
|
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: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|