danger-mention 0.4.0 → 0.5.0

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: c15c140c232de314f7e29f13171bd5ab11192655
4
- data.tar.gz: 422979de0bd74c63f311fce4cfaf3896ccfc9ea4
3
+ metadata.gz: 213247ca462fd48119c8878ad2495521991b2859
4
+ data.tar.gz: c5c7dfbaee22aececc7eb8426d9824e270d554fa
5
5
  SHA512:
6
- metadata.gz: 3c626c992aa0d0acf6ddac75978130a123d4d8d50d28e6e8830fe56ae000058d0fcfc4b8b4a08161dc8fff183c4195b14eda833599c1a01965d6d8df5fe0bd16
7
- data.tar.gz: 05047aaa830369a1a981bcd08665d187999fa6996438fa1c8be81a7cfea7b90adc2f0200c0914463784f197c8b605d9e3918c294a838b7d8871d2a9de49aad90
6
+ metadata.gz: 343e44cf2467a419aaeb748b955b94c2631466d36b44cd0fb6bbd1bc6bc6a37b8abad378cd27c28b9263c8710d11f800e45021ecb5e4183b73cdfe2f6cd44230
7
+ data.tar.gz: eba2f24c5b40df8303395e21318869913a75e3a597a3220fb2bc09a05475e61ff66c957bd687a213deaa94e7179125cb485f5ae6665f92ec66bc33ac737455f9
data/.travis.yml ADDED
@@ -0,0 +1,8 @@
1
+ language: ruby
2
+ sudo: false
3
+ cache: bundler
4
+
5
+ rvm:
6
+ - 2.3.1
7
+ - 2.1.9
8
+ - 2.0
data/Gemfile.lock CHANGED
@@ -1,47 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-mention (0.4.0)
5
- danger
4
+ danger-mention (0.5.0)
5
+ danger (>= 2.0.0)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.4.0)
10
+ addressable (2.5.0)
11
+ public_suffix (~> 2.0, >= 2.0.2)
11
12
  ast (2.3.0)
12
- claide (1.0.0)
13
- claide-plugins (0.9.1)
13
+ claide (1.0.1)
14
+ claide-plugins (0.9.2)
14
15
  cork
15
16
  nap
16
17
  open4 (~> 1.3)
17
18
  coderay (1.1.1)
18
19
  colored (1.2)
20
+ colored2 (3.1.1)
19
21
  cork (0.2.0)
20
22
  colored (~> 1.2)
21
- danger (3.0.3)
23
+ danger (4.2.1)
22
24
  claide (~> 1.0)
23
- claide-plugins (> 0.9.0)
24
- colored (~> 1.2)
25
+ claide-plugins (>= 0.9.2)
26
+ colored2 (~> 3.1)
25
27
  cork (~> 0.1)
26
28
  faraday (~> 0.9)
27
29
  faraday-http-cache (~> 1.0)
28
30
  git (~> 1)
29
- gitlab (~> 3.7.0)
30
31
  kramdown (~> 1.5)
31
32
  octokit (~> 4.2)
32
33
  terminal-table (~> 1)
33
- yard (~> 0.9.5)
34
34
  diff-lcs (1.2.5)
35
- faraday (0.9.2)
35
+ faraday (0.11.0)
36
36
  multipart-post (>= 1.2, < 3)
37
37
  faraday-http-cache (1.3.1)
38
38
  faraday (~> 0.8)
39
39
  ffi (1.9.14)
40
40
  formatador (0.2.5)
41
41
  git (1.3.0)
42
- gitlab (3.7.0)
43
- httparty (~> 0.13.0)
44
- terminal-table
45
42
  guard (2.14.0)
46
43
  formatador (>= 0.2.4)
47
44
  listen (>= 2.7, < 4.0)
@@ -56,25 +53,20 @@ GEM
56
53
  guard (~> 2.1)
57
54
  guard-compat (~> 1.1)
58
55
  rspec (>= 2.99.0, < 4.0)
59
- httparty (0.13.7)
60
- json (~> 1.8)
61
- multi_xml (>= 0.5.2)
62
- json (1.8.3)
63
- kramdown (1.12.0)
56
+ kramdown (1.13.2)
64
57
  listen (3.0.7)
65
58
  rb-fsevent (>= 0.9.3)
66
59
  rb-inotify (>= 0.9.7)
67
60
  lumberjack (1.0.10)
68
61
  method_source (0.8.2)
69
- multi_xml (0.5.5)
70
62
  multipart-post (2.0.0)
71
63
  nap (1.1.0)
72
64
  nenv (0.3.0)
73
65
  notiffany (0.1.1)
74
66
  nenv (~> 0.1)
75
67
  shellany (~> 0.0)
76
- octokit (4.3.0)
77
- sawyer (~> 0.7.0, >= 0.5.3)
68
+ octokit (4.6.2)
69
+ sawyer (~> 0.8.0, >= 0.5.3)
78
70
  open4 (1.3.4)
79
71
  parser (2.3.1.2)
80
72
  ast (~> 2.2)
@@ -83,6 +75,7 @@ GEM
83
75
  coderay (~> 1.1.0)
84
76
  method_source (~> 0.8.1)
85
77
  slop (~> 3.4)
78
+ public_suffix (2.0.5)
86
79
  rainbow (2.1.0)
87
80
  rake (10.5.0)
88
81
  rb-fsevent (0.9.7)
@@ -108,12 +101,13 @@ GEM
108
101
  ruby-progressbar (~> 1.7)
109
102
  unicode-display_width (~> 1.0, >= 1.0.1)
110
103
  ruby-progressbar (1.8.1)
111
- sawyer (0.7.0)
112
- addressable (>= 2.3.5, < 2.5)
113
- faraday (~> 0.8, < 0.10)
104
+ sawyer (0.8.1)
105
+ addressable (>= 2.3.5, < 2.6)
106
+ faraday (~> 0.8, < 1.0)
114
107
  shellany (0.0.1)
115
108
  slop (3.6.0)
116
- terminal-table (1.6.0)
109
+ terminal-table (1.7.0)
110
+ unicode-display_width (~> 1.1)
117
111
  thor (0.19.1)
118
112
  unicode-display_width (1.1.0)
119
113
  yard (0.9.5)
@@ -132,4 +126,4 @@ DEPENDENCIES
132
126
  yard (~> 0.8)
133
127
 
134
128
  BUNDLED WITH
135
- 1.11.2
129
+ 1.13.6
data/README.md CHANGED
@@ -14,11 +14,24 @@ The easiest way to use is just add this to your Dangerfile:
14
14
  mention.run
15
15
  ```
16
16
 
17
- Additionally you can set up maximum number of people to ping in the PR message, regexes of ignored files and list of users that will never be mentioned.
18
-
19
- ```rb
20
- mention.run(2, ["Pods/"], ["wojteklu"])
21
- ```
17
+ <blockquote>Running plugin with reviewers count specified
18
+ <pre>
19
+ # Find maximum two reviewers
20
+ mention.run(2, [], [])</pre>
21
+ </blockquote>
22
+
23
+ <blockquote>Running plugin with some files blacklisted
24
+ <pre>
25
+ # Find reviewers without parsing blame information
26
+ # from files matching to 'Pods/*'
27
+ mention.run(2, ["Pods/*"], [])</pre>
28
+ </blockquote>
29
+
30
+ <blockquote>Running plugin with some users blacklisted
31
+ <pre>
32
+ # Find reviewers ignoring users 'wojteklu' and 'danger'
33
+ mention.run(2, [], ["wojteklu", "danger"])</pre>
34
+ </blockquote>
22
35
 
23
36
  ## License
24
37
 
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files`.split($/)
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_dependency 'danger'
19
+ spec.add_dependency 'danger', '>= 2.0.0'
20
20
 
21
21
  # General ruby development
22
22
  spec.add_development_dependency 'bundler', '~> 1.3'
data/lib/danger_plugin.rb CHANGED
@@ -75,7 +75,7 @@ module Danger
75
75
  def compose_urls(files)
76
76
  host = 'https://' + env.request_source.host
77
77
  repo_slug = env.ci_source.repo_slug
78
- path = host + '/' + repo_slug + '/' + 'blame' + '/' + branch_for_base
78
+ path = host + '/' + repo_slug + '/' + 'blame' + '/' + github.branch_for_base
79
79
 
80
80
  urls = []
81
81
  files.each do |file|
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DangerMention
2
- VERSION = '0.4.0'.freeze
2
+ VERSION = '0.5.0'.freeze
3
3
  DESCRIPTION = 'Danger plugin to automatically mention potential reviewers on pull requests'
4
4
  end
@@ -34,7 +34,7 @@ module Danger
34
34
  before do
35
35
  allow(@mention).to receive_message_chain('env.request_source.host').and_return('host')
36
36
  allow(@mention).to receive_message_chain('env.ci_source.repo_slug').and_return('slug')
37
- allow(@mention).to receive_message_chain('branch_for_base').and_return('branch')
37
+ allow(@mention).to receive_message_chain('github.branch_for_base').and_return('branch')
38
38
  end
39
39
 
40
40
  it 'composes urls for files' do
@@ -81,7 +81,7 @@ module Danger
81
81
 
82
82
  it 'mentions potential reviewers' do
83
83
  @mention.run
84
- output = @mention.status_report[:markdowns].first
84
+ output = @mention.status_report[:markdowns].first.message
85
85
 
86
86
  expect(output).to_not be_empty
87
87
  expect(output).to include('@user1')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-mention
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Wojtek Lukaszuk
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-26 00:00:00.000000000 Z
11
+ date: 2017-02-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 2.0.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: '0'
26
+ version: 2.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -130,6 +130,7 @@ extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
132
  - ".gitignore"
133
+ - ".travis.yml"
133
134
  - Gemfile
134
135
  - Gemfile.lock
135
136
  - Guardfile
@@ -162,7 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
162
163
  version: '0'
163
164
  requirements: []
164
165
  rubyforge_project:
165
- rubygems_version: 2.6.6
166
+ rubygems_version: 2.2.2
166
167
  signing_key:
167
168
  specification_version: 4
168
169
  summary: Danger plugin to automatically mention potential reviewers on pull requests.