markdown_proofer 0.1.0 → 0.1.1

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: ccb65b045f3452c5a17722b6f8c463b9954d8dec
4
- data.tar.gz: c2ee0b5d3af41ad7c04ae34ed202c8d70d12796a
3
+ metadata.gz: 9b1b4dd3bfae8015dce1ad86a54c88ff7d24687c
4
+ data.tar.gz: 7cff5e4c89924f3ead7d93bba22ebe5853b9d224
5
5
  SHA512:
6
- metadata.gz: d6245c341286a73f533a0ca32ba3851da9509b397a6f81c414076920dba97e093bc2852912c1a4403350153c7113e7624b7fb9dcec92178dd4d063023075c14c
7
- data.tar.gz: f3aa8a08a601c620788ce5ed19c1c4296519a59842a876385ea36af6a7162507dfa45e37aa00eed4a5190c7e72bab97f205aa87f6d273bebdb61baa4cd5600e7
6
+ metadata.gz: 193355d4fb693276874d8626bd7406a4d79c086299593b63f5b7540c0f134a49f5ca98c37223db0323c4850cd0b96386ae5f7decee73248d8d22ba325e945042
7
+ data.tar.gz: 545f1ffbf9c743ecf7b853a6af37f7a84e93d09da3b6bb2d763dfa704149be372033e1968816c3bdd94e8742e6b71ded31afe0010f77ecc7b6ec1133484a289c
data/README.md CHANGED
@@ -11,7 +11,7 @@ Requires Ruby 2.0+. Create the following files:
11
11
 
12
12
  source 'https://rubygems.org'
13
13
 
14
- gem 'markdown_proofer'
14
+ gem 'markdown_proofer', '~> 0.1.1'
15
15
  gem 'rake'
16
16
  ```
17
17
 
@@ -34,7 +34,7 @@ task default: :validate_markdown
34
34
 
35
35
  `MarkdownProofer::RakeTask.run` accepts the following named parameters:
36
36
 
37
- * `excludes` – An Array of [Regexp](http://www.ruby-doc.org/core-2.1.1/Regexp.html)s. Any file paths that match will be excluded from validation. Defaults to excluding test-related files.
37
+ * `excludes` – An Array of regular expressions. Any file paths that match will be excluded from validation. Defaults to excluding test-related files.
38
38
  * `html_proofer` – Options passed to HTML::Proofer. See [the HTML::Proofer documentation](https://github.com/gjtorikian/html-proofer#configuration).
39
39
  * `path` – The relative path to the file/directory that you want to validate. Defaults to the top-level directory.
40
40
 
@@ -59,8 +59,10 @@ class MarkdownProofer
59
59
 
60
60
  # do validation on the file
61
61
  html_proofer = HTML::Proofer.new(output_file, self.html_proofer)
62
- output = self.capture_stderr { html_proofer.run }
63
- errors = output.split("\n")
62
+ self.capture_stderr { html_proofer.run }
63
+
64
+ # TODO add getter in HTML::Proofer
65
+ errors = html_proofer.instance_variable_get(:@failed_tests)
64
66
  self.errors.concat(errors)
65
67
  ensure
66
68
  # clean up the file
@@ -17,9 +17,9 @@ class MarkdownProofer
17
17
  proofer = self.create_proofer(*args)
18
18
  proofer.run
19
19
  if proofer.errors.any?
20
- raise "Failed! #{proofer.errors.join("\n")}"
20
+ raise "FAILED!\n#{proofer.errors.join("\n")}"
21
21
  else
22
- puts "Success!"
22
+ puts "SUCCESS!"
23
23
  end
24
24
  end
25
25
  module_function :run
@@ -1,3 +1,3 @@
1
1
  class MarkdownProofer
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
@@ -18,8 +18,10 @@ Gem::Specification.new do |spec|
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
20
20
 
21
+ spec.required_ruby_version = '~> 2.0'
22
+
21
23
  spec.add_dependency 'github-markdown', '~> 0.6.5'
22
- spec.add_dependency 'html-pipeline', '~> 1.8'
24
+ spec.add_dependency 'html-pipeline', '< 2'
23
25
  spec.add_dependency 'html-proofer', '~> 0.6.7'
24
26
 
25
27
  spec.add_development_dependency 'bundler', '~> 1.5'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: markdown_proofer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aidan Feldman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-05-06 00:00:00.000000000 Z
11
+ date: 2014-05-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: github-markdown
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: html-pipeline
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - <
32
32
  - !ruby/object:Gem::Version
33
- version: '1.8'
33
+ version: '2'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - <
39
39
  - !ruby/object:Gem::Version
40
- version: '1.8'
40
+ version: '2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: html-proofer
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -173,9 +173,9 @@ require_paths:
173
173
  - lib
174
174
  required_ruby_version: !ruby/object:Gem::Requirement
175
175
  requirements:
176
- - - '>='
176
+ - - ~>
177
177
  - !ruby/object:Gem::Version
178
- version: '0'
178
+ version: '2.0'
179
179
  required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  requirements:
181
181
  - - '>='
@@ -183,7 +183,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
183
183
  version: '0'
184
184
  requirements: []
185
185
  rubyforge_project:
186
- rubygems_version: 2.0.3
186
+ rubygems_version: 2.2.2
187
187
  signing_key:
188
188
  specification_version: 4
189
189
  summary: Validates for your Markdown files