danger-prose 2.0.4 → 2.0.5

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: f09413f72b2e58d7e5d6a3d86e110d17999e7594
4
- data.tar.gz: 6483ac3b556427b1debbed54c4c07f23719b0fbd
3
+ metadata.gz: 175ef2fd408df4f9ab570fbe55e1691198a79b02
4
+ data.tar.gz: 67c89b4fb1de6cd1f3e77a9518f095e3e39c52db
5
5
  SHA512:
6
- metadata.gz: 6c23179053f947d8be3bc2654ad8967b0d9b487a66051c043e121ac911a0b31258005070f6f77e5fabf562c7dcfde845387d9c819924adeca9869817e841dcc6
7
- data.tar.gz: 93d94353ef9ca6d35f43a2245708e17ef386c2882a057bd7836f3189648529d2f853244e874d94ee0f7f406846c86d6bb565f650d8af558acf14f6308f0c8651
6
+ metadata.gz: bf8b908df7f848b1601da0ff2dade9b641a89aec74cf4fa7a1bb4e95094570af12096f27acf2a52f353fcb223df94defbb68e65af9108df331d3e92b725904e8
7
+ data.tar.gz: 67f56f3082e21cd1058ff4841c36137430ce8ce36c14641e5fb37107ac9eb78e411163a92861f6152bf3beea3e5a06bc7dbecc4d8d2b35cbeb1beb437fe3596a
data/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ 2.0.5
2
+ - Fix based on danger changing how `FileList` is implemented (dbgrandi)
3
+
4
+ 2.0.4
5
+ - Make sure proselint success results are filtered out (zhusee2)
6
+
7
+ 2.0.1
8
+ - Fix typo in module name (suchow)
9
+
10
+ 2.0.0
11
+ - Fix a bunch of things (orta)
12
+
13
+ 1.0.0
14
+ - Initial release
data/Gemfile.lock CHANGED
@@ -1,47 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- danger-prose (2.0.2)
4
+ danger-prose (2.0.5)
5
5
  danger
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- addressable (2.4.0)
10
+ addressable (2.5.1)
11
+ public_suffix (~> 2.0, >= 2.0.2)
11
12
  bacon (1.2.0)
12
- claide (1.0.0)
13
- claide-plugins (0.9.1)
13
+ claide (1.0.2)
14
+ claide-plugins (0.9.2)
14
15
  cork
15
16
  nap
16
17
  open4 (~> 1.3)
17
18
  coderay (1.1.1)
18
- colored (1.2)
19
- cork (0.2.0)
20
- colored (~> 1.2)
21
- danger (3.0.3)
19
+ colored2 (3.1.2)
20
+ cork (0.3.0)
21
+ colored2 (~> 3.1)
22
+ danger (5.3.2)
22
23
  claide (~> 1.0)
23
- claide-plugins (> 0.9.0)
24
- colored (~> 1.2)
24
+ claide-plugins (>= 0.9.2)
25
+ colored2 (~> 3.1)
25
26
  cork (~> 0.1)
26
27
  faraday (~> 0.9)
27
28
  faraday-http-cache (~> 1.0)
28
29
  git (~> 1)
29
- gitlab (~> 3.7.0)
30
30
  kramdown (~> 1.5)
31
31
  octokit (~> 4.2)
32
32
  terminal-table (~> 1)
33
- diff-lcs (1.2.5)
34
- faraday (0.9.2)
33
+ diff-lcs (1.3)
34
+ faraday (0.12.1)
35
35
  multipart-post (>= 1.2, < 3)
36
36
  faraday-http-cache (1.3.1)
37
37
  faraday (~> 0.8)
38
- ffi (1.9.10)
38
+ ffi (1.9.18)
39
39
  formatador (0.2.5)
40
40
  git (1.3.0)
41
- gitlab (3.7.0)
42
- httparty (~> 0.13.0)
43
- terminal-table
44
- guard (2.14.0)
41
+ guard (2.14.1)
45
42
  formatador (>= 0.2.4)
46
43
  listen (>= 2.7, < 4.0)
47
44
  lumberjack (~> 1.0)
@@ -51,66 +48,64 @@ GEM
51
48
  shellany (~> 0.0)
52
49
  thor (>= 0.18.1)
53
50
  guard-compat (1.2.1)
54
- guard-rspec (4.7.2)
51
+ guard-rspec (4.7.3)
55
52
  guard (~> 2.1)
56
53
  guard-compat (~> 1.1)
57
54
  rspec (>= 2.99.0, < 4.0)
58
- httparty (0.13.7)
59
- json (~> 1.8)
60
- multi_xml (>= 0.5.2)
61
- json (1.8.3)
62
- kramdown (1.12.0)
55
+ kramdown (1.14.0)
63
56
  listen (3.0.7)
64
57
  rb-fsevent (>= 0.9.3)
65
58
  rb-inotify (>= 0.9.7)
66
- lumberjack (1.0.10)
59
+ lumberjack (1.0.12)
67
60
  metaclass (0.0.4)
68
61
  method_source (0.8.2)
69
- mocha (1.1.0)
62
+ mocha (1.2.1)
70
63
  metaclass (~> 0.0.1)
71
- mocha-on-bacon (0.2.2)
64
+ mocha-on-bacon (0.2.3)
72
65
  mocha (>= 0.13.0)
73
- multi_xml (0.5.5)
74
66
  multipart-post (2.0.0)
75
67
  nap (1.1.0)
76
68
  nenv (0.3.0)
77
- notiffany (0.1.0)
69
+ notiffany (0.1.1)
78
70
  nenv (~> 0.1)
79
71
  shellany (~> 0.0)
80
- octokit (4.3.0)
81
- sawyer (~> 0.7.0, >= 0.5.3)
72
+ octokit (4.7.0)
73
+ sawyer (~> 0.8.0, >= 0.5.3)
82
74
  open4 (1.3.4)
83
75
  prettybacon (0.0.2)
84
76
  bacon (~> 1.2)
85
- pry (0.10.3)
77
+ pry (0.10.4)
86
78
  coderay (~> 1.1.0)
87
79
  method_source (~> 0.8.1)
88
80
  slop (~> 3.4)
81
+ public_suffix (2.0.5)
89
82
  rake (10.5.0)
90
- rb-fsevent (0.9.7)
91
- rb-inotify (0.9.7)
92
- ffi (>= 0.5.0)
93
- rspec (3.4.0)
94
- rspec-core (~> 3.4.0)
95
- rspec-expectations (~> 3.4.0)
96
- rspec-mocks (~> 3.4.0)
97
- rspec-core (3.4.4)
98
- rspec-support (~> 3.4.0)
99
- rspec-expectations (3.4.0)
83
+ rb-fsevent (0.10.2)
84
+ rb-inotify (0.9.10)
85
+ ffi (>= 0.5.0, < 2)
86
+ rspec (3.6.0)
87
+ rspec-core (~> 3.6.0)
88
+ rspec-expectations (~> 3.6.0)
89
+ rspec-mocks (~> 3.6.0)
90
+ rspec-core (3.6.0)
91
+ rspec-support (~> 3.6.0)
92
+ rspec-expectations (3.6.0)
100
93
  diff-lcs (>= 1.2.0, < 2.0)
101
- rspec-support (~> 3.4.0)
102
- rspec-mocks (3.4.1)
94
+ rspec-support (~> 3.6.0)
95
+ rspec-mocks (3.6.0)
103
96
  diff-lcs (>= 1.2.0, < 2.0)
104
- rspec-support (~> 3.4.0)
105
- rspec-support (3.4.1)
106
- sawyer (0.7.0)
107
- addressable (>= 2.3.5, < 2.5)
108
- faraday (~> 0.8, < 0.10)
97
+ rspec-support (~> 3.6.0)
98
+ rspec-support (3.6.0)
99
+ sawyer (0.8.1)
100
+ addressable (>= 2.3.5, < 2.6)
101
+ faraday (~> 0.8, < 1.0)
109
102
  shellany (0.0.1)
110
103
  slop (3.6.0)
111
- terminal-table (1.6.0)
112
- thor (0.19.1)
113
- yard (0.8.7.6)
104
+ terminal-table (1.8.0)
105
+ unicode-display_width (~> 1.1, >= 1.1.1)
106
+ thor (0.19.4)
107
+ unicode-display_width (1.3.0)
108
+ yard (0.9.9)
114
109
 
115
110
  PLATFORMS
116
111
  ruby
data/README.md CHANGED
@@ -4,6 +4,8 @@ A description of danger-prose.
4
4
 
5
5
  ## Installation
6
6
 
7
+ As a pre-requisite, danger-prose requires a node environment for spell checking and a python environment for linting. So, make sure your CI environment has support for either or both of those.
8
+
7
9
  $ gem install danger-prose
8
10
 
9
11
  ### prose
@@ -40,11 +42,11 @@ prose.lint_files</pre>
40
42
 
41
43
 
42
44
  #### Attributes
43
- <tr>
45
+
44
46
  `disable_linters` - Allows you to disable a collection of linters from running. Doesn't work yet.
45
47
  You can get a list of [them here](https://github.com/amperser/proselint#checks)
46
48
  defaults to `["misc.scare_quotes", "typography.symbols"]` when it's nil.
47
- <tr>
49
+
48
50
  `ignored_words` - Allows you to add a collection of words to skip in spellchecking.
49
51
  defaults to `[""]` when it's nil.
50
52
 
data/lib/danger_plugin.rb CHANGED
@@ -59,7 +59,7 @@ module Danger
59
59
  to_disable = disable_linters || ["misc.scare_quotes", "typography.symbols"]
60
60
  with_proselint_disabled(to_disable) do
61
61
  # Convert paths to proselint results
62
- result_jsons = Hash[markdown_files.uniq.collect { |v| [v, get_proselint_json(v)] }]
62
+ result_jsons = Hash[markdown_files.to_a.uniq.collect { |v| [v, get_proselint_json(v)] }]
63
63
  proses = result_jsons.select { |_, prose| prose['data']['errors'].count > 0 }
64
64
  end
65
65
 
@@ -123,7 +123,7 @@ module Danger
123
123
 
124
124
  skip_words = ignored_words || []
125
125
  File.write(".spelling", skip_words.join("\n"))
126
- result_texts = Hash[markdown_files.uniq.collect { |md| [md, `mdspell #{md} -r`.strip] }]
126
+ result_texts = Hash[markdown_files.to_a.uniq.collect { |md| [md, `mdspell #{md} -r`.strip] }]
127
127
  spell_issues = result_texts.select { |path, output| output.include? "spelling errors found" }
128
128
  File.unlink(".spelling")
129
129
 
data/lib/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module DangerProse
2
- VERSION = '2.0.4'.freeze
2
+ VERSION = '2.0.5'.freeze
3
3
  end
@@ -39,7 +39,7 @@ module Danger
39
39
  # The request source's PR JSON typically looks like
40
40
  # https://raw.githubusercontent.com/danger/danger/bffc246a11dac883d76fc6636319bd6c2acd58a3/spec/fixtures/pr_response.json
41
41
 
42
- @prose.env.request_source.pr_json = { head: { ref: 'my_fake_branch' } }
42
+ @prose.env.request_source.pr_json = { "head" => { "ref" => 'my_fake_branch' } }
43
43
  end
44
44
 
45
45
  it 'handles a known JSON report from proselint' do
@@ -47,11 +47,11 @@ module Danger
47
47
  output = @prose.status_report[:markdowns].first
48
48
 
49
49
  # A title
50
- expect(output).to include('Proselint found issues')
50
+ expect(output.message).to include('Proselint found issues')
51
51
  # A warning
52
- expect(output).to include('!!! is hyperbolic. | warning')
52
+ expect(output.message).to include('!!! is hyperbolic. | warning')
53
53
  # A link to the file inside the fixtures dir
54
- expect(output).to include('[spec/fixtures/blog_post.md](/artsy/eigen/tree/my_fake_branch/spec/fixtures/blog_post.md)')
54
+ expect(output.message).to include('[spec/fixtures/blog_post.md](/artsy/eigen/tree/my_fake_branch/spec/fixtures/blog_post.md)')
55
55
  end
56
56
  end
57
57
  end
@@ -82,7 +82,7 @@ module Danger
82
82
  # The request source's PR JSON typically looks like
83
83
  # https://raw.githubusercontent.com/danger/danger/bffc246a11dac883d76fc6636319bd6c2acd58a3/spec/fixtures/pr_response.json
84
84
 
85
- @prose.env.request_source.pr_json = { head: { ref: 'my_fake_branch' } }
85
+ @prose.env.request_source.pr_json = { "head" => { "ref" => 'my_fake_branch' } }
86
86
  end
87
87
 
88
88
  it 'handles a known JSON report from mdspell' do
@@ -90,11 +90,11 @@ module Danger
90
90
  output = @prose.status_report[:markdowns].first
91
91
 
92
92
  # A title
93
- expect(output).to include('Spell Checker found issues')
93
+ expect(output.message).to include('Spell Checker found issues')
94
94
  # A typo, in bold
95
- expect(output).to include('**tpyo**')
95
+ expect(output.message).to include('**tpyo**')
96
96
  # A link to the file inside the fixtures dir
97
- expect(output).to include('[spec/fixtures/blog_post.md](/artsy/eigen/tree/my_fake_branch/spec/fixtures/blog_post.md)')
97
+ expect(output.message).to include('[spec/fixtures/blog_post.md](/artsy/eigen/tree/my_fake_branch/spec/fixtures/blog_post.md)')
98
98
  end
99
99
  end
100
100
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-prose
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.4
4
+ version: 2.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Grandinetti
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-05-20 00:00:00.000000000 Z
12
+ date: 2017-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: danger
@@ -147,6 +147,7 @@ extra_rdoc_files: []
147
147
  files:
148
148
  - ".gitignore"
149
149
  - ".travis.yml"
150
+ - CHANGELOG.md
150
151
  - Gemfile
151
152
  - Gemfile.lock
152
153
  - Guardfile
@@ -180,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
181
  version: '0'
181
182
  requirements: []
182
183
  rubyforge_project:
183
- rubygems_version: 2.2.2
184
+ rubygems_version: 2.4.8
184
185
  signing_key:
185
186
  specification_version: 4
186
187
  summary: A danger plugin for working with bodies of markdown prose.