danger-todoist 1.2.0 → 1.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.codeclimate.yml +3 -0
- data/CHANGELOG.md +4 -0
- data/lib/todoist/gem_version.rb +1 -1
- data/lib/todoist/plugin.rb +6 -5
- data/spec/diff_todo_finder_spec.rb +1 -0
- data/spec/todoist_spec.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 910d2aa0929cc3af3260a88dfbf1a98fe27f3435
|
4
|
+
data.tar.gz: 18aa2c8dafb84287ff5e97051cb7d31f2cae6b8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c52239b8a95725323d644886222bd174f3a5cc90d57ffde7b37a0b750ef8269aada7977dc557b1bf29a3459a0b2943c7c07e1473813686ef0471b4f658f07daf
|
7
|
+
data.tar.gz: 5e2a73ded27db0de67804511aa9cb7d23892f6725e1f3c3f70c09d8b1210571780aaf0e6c7b9fc3ca612900acf015ace3bf072f100bc5aafdc1d10cdc0bc864e
|
data/.codeclimate.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/lib/todoist/gem_version.rb
CHANGED
data/lib/todoist/plugin.rb
CHANGED
@@ -113,22 +113,23 @@ module Danger
|
|
113
113
|
end
|
114
114
|
|
115
115
|
def keywords
|
116
|
-
|
117
|
-
DEFAULT_KEYWORDS
|
116
|
+
@keywords || DEFAULT_KEYWORDS
|
118
117
|
end
|
119
118
|
|
120
119
|
def message
|
121
|
-
|
122
|
-
DEFAULT_MESSAGE
|
120
|
+
@message || DEFAULT_MESSAGE
|
123
121
|
end
|
124
122
|
|
125
123
|
def files_of_interest
|
126
124
|
git.modified_files + git.added_files
|
127
125
|
end
|
128
126
|
|
127
|
+
# for whatever reason nils/false weird things creep
|
128
|
+
# into the files_of_interest. We have to make sure to only
|
129
|
+
# try to look up diffs for actual filepaths (strings)
|
129
130
|
def diffs_of_interest
|
130
131
|
files_of_interest
|
131
|
-
.
|
132
|
+
.select { |file| file.is_a?(String) }
|
132
133
|
.map { |file| git.diff_for_file(file) }
|
133
134
|
end
|
134
135
|
end
|
data/spec/todoist_spec.rb
CHANGED
@@ -2,6 +2,7 @@ require File.expand_path("../spec_helper", __FILE__)
|
|
2
2
|
|
3
3
|
# rubocop:disable Metrics/ModuleLength
|
4
4
|
module Danger
|
5
|
+
# rubocop:disable Metrics/BlockLength
|
5
6
|
describe Danger::DangerTodoist do
|
6
7
|
it "should be a plugin" do
|
7
8
|
expect(Danger::DangerTodoist.new(nil)).to be_a Danger::Plugin
|
@@ -131,9 +132,9 @@ PATCH
|
|
131
132
|
end
|
132
133
|
|
133
134
|
it "does not raise when git returns nil" do
|
134
|
-
invalid = [nil]
|
135
|
+
invalid = [nil, 0, false]
|
135
136
|
allow(@dangerfile.git).to receive(:modified_files).and_return(invalid)
|
136
|
-
allow(@dangerfile.git).to receive(:added_files).and_return(
|
137
|
+
allow(@dangerfile.git).to receive(:added_files).and_return(invalid)
|
137
138
|
|
138
139
|
expect { @todoist.warn_for_todos }.to_not raise_error
|
139
140
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger-todoist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Hannes Käufler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: danger-plugin-api
|
@@ -226,7 +226,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
226
|
version: '0'
|
227
227
|
requirements: []
|
228
228
|
rubyforge_project:
|
229
|
-
rubygems_version: 2.
|
229
|
+
rubygems_version: 2.6.8
|
230
230
|
signing_key:
|
231
231
|
specification_version: 4
|
232
232
|
summary: Marking something with a todo is very common during implementing a new feature.
|