lita-jira 0.7.1 → 0.7.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: eca25015401127d628654b155f01c2186adee367
4
- data.tar.gz: 8ecded11919390a55da963235b9b7eeb9f272382
3
+ metadata.gz: 60daa5d9457d96452b4a5173475ea8d0100e3599
4
+ data.tar.gz: dbe9dd305a9fb2d16131f3aadbd45de6371d60cf
5
5
  SHA512:
6
- metadata.gz: f736bd91ff2ff195ec600a289f44b1d58397b6eb874643597b4f6fd024c6e6c3fb053eccdc0175f0952354e2ae809ffe63f3a50923bbe9299f3e017daba4de69
7
- data.tar.gz: dd89520f0235451055bd7243b011aabf3d65ec6a0334b1937e9139032ff9a5bf14956fd69f38ba137daa734f4ee67e5ae0edab4523ff02b703c1750a626bea83
6
+ metadata.gz: 26a7c84e39b53e8efd70fa120b1917f6662df89162b947d2e8cb5b9c2f1048550c8e85a70deebb79d5f8583daff6d42465b6c71cf9d9a059b11afcace65f12ba
7
+ data.tar.gz: 75e000b407485a88e511940c8aeacae0264914196de243fc6f1ba3643756d3414e996d632a3d639500b1571c3b4f3f4d25bf28a047993aa58b98cb33ecbc0266
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --color --profile 5
data/CHANGELOG.md ADDED
@@ -0,0 +1,16 @@
1
+ # CHANGELOG
2
+
3
+ All notable changes to this project will be documented in this file.
4
+ This project adheres to [Semantic Versioning] and [Keep A Changelog].
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.7.2] - 2015-12-01
9
+ ### Fixed
10
+ - Updated Simplecov invocation to newer style
11
+ - Adjusted ambient issue detection to avoid triggering on URL-like strings
12
+
13
+ [Unreleased]: https://github.com/esigler/lita-jira/compare/v0.7.2...HEAD
14
+ [0.7.2]: https://github.com/esigler/lita-jira/compare/v0.7.1...v0.7.2
15
+ [Semantic Versioning]: http://semver.org/
16
+ [Keep A Changelog]: http://keepachangelog.com/
@@ -8,5 +8,6 @@ module JiraHelper
8
8
  PROJECT_PATTERN = /(?<project>[a-zA-Z0-9]{1,10})/
9
9
  ISSUE_PATTERN = /(?<issue>#{PROJECT_PATTERN}-[0-9]{1,5}+)/
10
10
  EMAIL_PATTERN = /(?<email>[\w+\-.]+@[a-z\d\-]+(\.[a-z]+)*\.[a-z]+)/i
11
+ AMBIENT_PATTERN = /\s#{ISSUE_PATTERN}/
11
12
  end
12
13
  end
@@ -67,7 +67,7 @@ module Lita
67
67
  )
68
68
 
69
69
  # Detect ambient JIRA issues in non-command messages
70
- route ISSUE_PATTERN, :ambient, command: false
70
+ route AMBIENT_PATTERN, :ambient, command: false
71
71
 
72
72
  def summary(response)
73
73
  issue = fetch_issue(response.match_data['issue'])
data/lita-jira.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = 'lita-jira'
3
- spec.version = '0.7.1'
3
+ spec.version = '0.7.2'
4
4
  spec.authors = ['Eric Sigler', 'Matt Critchlow']
5
5
  spec.email = ['me@esigler.com', 'matt.critchlow@gmail.com']
6
6
  spec.description = 'A JIRA plugin for Lita.'
@@ -180,8 +180,7 @@ describe Lita::Handlers::Jira, lita_handler: true do
180
180
  end
181
181
 
182
182
  describe '#ambient' do
183
- it 'does not show details for a detected issue by default' do
184
- end
183
+ it 'does not show details for a detected issue by default'
185
184
 
186
185
  context 'when enabled in config' do
187
186
  before(:each) do
@@ -191,7 +190,8 @@ describe Lita::Handlers::Jira, lita_handler: true do
191
190
 
192
191
  it 'shows details for a detected issue in a message' do
193
192
  send_message('foo XYZ-987 bar')
194
- expect(replies.last).to eq("[XYZ-987] Some summary text\nStatus: In Progress, assigned to: A Person, fixVersion: Sprint 2, priority: P0\nhttp://jira.local/browse/XYZ-987")
193
+ send_message('foo XYZ-987?')
194
+ expect(replies.size).to eq(2)
195
195
  end
196
196
 
197
197
  it 'does not show details for a detected issue in a command' do
@@ -199,6 +199,12 @@ describe Lita::Handlers::Jira, lita_handler: true do
199
199
  expect(replies.size).to eq(0)
200
200
  end
201
201
 
202
+ it 'does not show details for a issue in a URL-ish context' do
203
+ send_message('http://www.example.com/XYZ-987.html')
204
+ send_message('http://www.example.com/someother-XYZ-987.html')
205
+ expect(replies.size).to eq(0)
206
+ end
207
+
202
208
  context 'and an ignore list is defined' do
203
209
  before(:each) do
204
210
  @user1 = Lita::User.create('U1', name: 'User 1', mention_name: 'user1')
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  require 'simplecov'
2
2
  require 'coveralls'
3
- SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[
3
+ SimpleCov.formatters = [
4
4
  SimpleCov::Formatter::HTMLFormatter,
5
5
  Coveralls::SimpleCov::Formatter
6
6
  ]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lita-jira
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eric Sigler
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-11 00:00:00.000000000 Z
12
+ date: 2015-12-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: lita
@@ -132,8 +132,10 @@ extensions: []
132
132
  extra_rdoc_files: []
133
133
  files:
134
134
  - ".gitignore"
135
+ - ".rspec"
135
136
  - ".rubocop.yml"
136
137
  - ".travis.yml"
138
+ - CHANGELOG.md
137
139
  - CONTRIBUTING.md
138
140
  - Gemfile
139
141
  - LICENSE