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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bb77a076ca9b410759b8c57d2cc83f8762730406
4
- data.tar.gz: 1a4bb1f8680a4585fd0e0b3906445a28ef8cc990
3
+ metadata.gz: bfa5a11c2c7865fa7f7bf36e49e4f7df03b5509e
4
+ data.tar.gz: 9f5e7d47f2a7b645c1371923dbdb23a1eac67c3e
5
5
  SHA512:
6
- metadata.gz: 8a5e130c20ea447bc75672e08abe1e4187e52308089f5eac5903574ee160765260b1828fb50d0d4db3f231bdcfe5eae480be72ef44ca2d85af608e717c764b95
7
- data.tar.gz: 331f363996464a37c1d897d3109250b1c314c2c717ca875ce9a593ce5b0ebc50b5c85efd783ace0f31b766fd91372b866128155f608334bfe00938ecd1352811
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-gerrit** is a handler for [Lita](https://github.com/josqu4red/lita) that allows interaction with Redmine project management tool (or its fork, Chiliproject).
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
- def self.default_config(config)
8
- config.url = nil
9
- config.type = :redmine # :chiliproject
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 Lita.config.handlers.redmine.url
17
- redmine_url = Lita.config.handlers.redmine.url.chomp("/")
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 Lita.config.handlers.redmine.apikey
23
- apikey = Lita.config.handlers.redmine.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 Lita.config.handlers.redmine.type
26
+ case config.type
29
27
  when :redmine
30
28
  apikey_header = "X-Redmine-API-Key"
31
29
  when :chiliproject
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "lita-redmine"
3
- spec.version = "0.0.1"
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", "~> 3.0"
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 { routes("get me redmine 12345, please").to(:issue) }
14
- it { doesnt_route("redmine foo").to(:issue) }
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
@@ -8,3 +8,4 @@ SimpleCov.start { add_filter "/spec/" }
8
8
 
9
9
  require "lita-redmine"
10
10
  require "lita/rspec"
11
+ Lita.version_3_compatibility_mode = false
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.1
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-03-18 00:00:00.000000000 Z
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: '3.0'
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: '3.0'
26
+ version: '4.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement