mdspell 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/mdspell/text_line.rb +1 -1
- data/spec/examples.cache +58 -58
- data/spec/examples/complete.md +2 -0
- data/spec/examples/spanish_errors.md +4 -0
- data/spec/mdspell/cli_spec.rb +4 -2
- data/spec/mdspell/spell_checker_spec.rb +13 -1
- data/spec/mdspell/text_line_spec.rb +2 -1
- metadata +6 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 498db120436c18f276565d5869d6ae6633bb5874
|
4
|
+
data.tar.gz: de25d5a7b64c13595b116dc1f468c82fe4c04c9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ba929dadf2ef521255dc2cea3c5b92c965003ca632d10b99e782c050d7189c122de14a837a8ab73e06b1947fbe59925a086a2dd09d2cc0b0b075f88af22ff4b7
|
7
|
+
data.tar.gz: 711bdcab6d3c6835deb9afd350df72a3337db5b6406c70b5cb3d263314bd76e29dc9772bcc35e1d976650366f607d379a0c7bfae481f19775a26ea5439f9098b
|
data/README.md
CHANGED
@@ -7,6 +7,8 @@ https://travis-ci.org/mtuchowski/mdspell)
|
|
7
7
|
https://codeclimate.com/github/mtuchowski/mdspell)
|
8
8
|
[![Test Coverage](https://codeclimate.com/github/mtuchowski/mdspell/badges/coverage.svg)](
|
9
9
|
https://codeclimate.com/github/mtuchowski/mdspell/coverage)
|
10
|
+
[![Inline docs](http://inch-ci.org/github/mtuchowski/mdspell.svg?branch=master)](
|
11
|
+
http://inch-ci.org/github/mtuchowski/mdspell)
|
10
12
|
|
11
13
|
A Ruby markdown spell checking tool.
|
12
14
|
|
data/lib/mdspell/text_line.rb
CHANGED
data/spec/examples.cache
CHANGED
@@ -1,58 +1,58 @@
|
|
1
|
-
example_id | status
|
2
|
-
--------------------------------------------- |
|
3
|
-
./spec/mdspell/cli_spec.rb[1:1] | passed
|
4
|
-
./spec/mdspell/cli_spec.rb[1:2] | passed
|
5
|
-
./spec/mdspell/cli_spec.rb[1:3:1] | passed
|
6
|
-
./spec/mdspell/cli_spec.rb[1:4:1:1] | passed
|
7
|
-
./spec/mdspell/cli_spec.rb[1:4:2:1] | passed
|
8
|
-
./spec/mdspell/cli_spec.rb[1:4:3:1] | passed
|
9
|
-
./spec/mdspell/configuration_spec.rb[1:1:1] | passed
|
10
|
-
./spec/mdspell/configuration_spec.rb[1:1:2:1] | passed
|
11
|
-
./spec/mdspell/configuration_spec.rb[1:1:2:2] | passed
|
12
|
-
./spec/mdspell/configuration_spec.rb[1:1:3:1] | passed
|
13
|
-
./spec/mdspell/configuration_spec.rb[1:2:1] | passed
|
14
|
-
./spec/mdspell/configuration_spec.rb[1:2:2:1] | passed
|
15
|
-
./spec/mdspell/configuration_spec.rb[1:2:2:2] | passed
|
16
|
-
./spec/mdspell/configuration_spec.rb[1:3:1] | passed
|
17
|
-
./spec/mdspell/configuration_spec.rb[1:3:2:1] | passed
|
18
|
-
./spec/mdspell/configuration_spec.rb[1:3:2:2] | passed
|
19
|
-
./spec/mdspell/configuration_spec.rb[1:4:1] | passed
|
20
|
-
./spec/mdspell/configuration_spec.rb[1:4:2:1] | passed
|
21
|
-
./spec/mdspell/configuration_spec.rb[1:4:2:2] | passed
|
22
|
-
./spec/mdspell/spell_checker_spec.rb[1:1:1] | passed
|
23
|
-
./spec/mdspell/spell_checker_spec.rb[1:1:2] | passed
|
24
|
-
./spec/mdspell/spell_checker_spec.rb[1:1:3] | passed
|
25
|
-
./spec/mdspell/spell_checker_spec.rb[1:2:1] | passed
|
26
|
-
./spec/mdspell/spell_checker_spec.rb[1:2:2] | passed
|
27
|
-
./spec/mdspell/spell_checker_spec.rb[1:2:3] | passed
|
28
|
-
./spec/mdspell/spell_checker_spec.rb[1:3:1] | passed
|
29
|
-
./spec/mdspell/spell_checker_spec.rb[1:3:2:1] | passed
|
30
|
-
./spec/mdspell/spell_checker_spec.rb[1:4:1] | passed
|
31
|
-
./spec/mdspell/spell_checker_spec.rb[1:5:1] | passed
|
32
|
-
./spec/mdspell/spell_checker_spec.rb[1:5:2] | passed
|
33
|
-
./spec/mdspell/spell_checker_spec.rb[1:5:3] |
|
34
|
-
./spec/mdspell/text_line_spec.rb[1:1:1] | passed
|
35
|
-
./spec/mdspell/text_line_spec.rb[1:1:2] | passed
|
36
|
-
./spec/mdspell/text_line_spec.rb[1:1:3] | passed
|
37
|
-
./spec/mdspell/text_line_spec.rb[1:1:4] | passed
|
38
|
-
./spec/mdspell/text_line_spec.rb[1:2:1] | passed
|
39
|
-
./spec/mdspell/text_line_spec.rb[1:3:1] | passed
|
40
|
-
./spec/mdspell/text_line_spec.rb[1:4:1] | passed
|
41
|
-
./spec/mdspell/text_line_spec.rb[1:5:1] | passed
|
42
|
-
./spec/mdspell/text_line_spec.rb[1:6:1] | passed
|
43
|
-
./spec/mdspell/text_line_spec.rb[1:6:2:1] | passed
|
44
|
-
./spec/mdspell/text_line_spec.rb[1:6:3:1] | passed
|
45
|
-
./spec/mdspell/text_line_spec.rb[1:6:3:2] | passed
|
46
|
-
./spec/mdspell/text_line_spec.rb[1:6:4:1] | passed
|
47
|
-
./spec/mdspell/text_line_spec.rb[1:7:1] | passed
|
48
|
-
./spec/mdspell/text_line_spec.rb[1:7:2] | passed
|
49
|
-
./spec/mdspell/typo_spec.rb[1:1:1] | passed
|
50
|
-
./spec/mdspell/typo_spec.rb[1:1:2] | passed
|
51
|
-
./spec/mdspell/typo_spec.rb[1:1:3] | passed
|
52
|
-
./spec/mdspell/typo_spec.rb[1:2:1] | passed
|
53
|
-
./spec/mdspell/typo_spec.rb[1:2:2] | passed
|
54
|
-
./spec/mdspell/typo_spec.rb[1:2:3] | passed
|
55
|
-
./spec/mdspell/typo_spec.rb[1:3:1] | passed
|
56
|
-
./spec/mdspell/typo_spec.rb[1:4:1] | passed
|
57
|
-
./spec/mdspell/typo_spec.rb[1:5:1] | passed
|
58
|
-
./spec/mdspell/typo_spec.rb[1:5:2] | passed
|
1
|
+
example_id | status | run_time |
|
2
|
+
--------------------------------------------- | ------ | --------------- |
|
3
|
+
./spec/mdspell/cli_spec.rb[1:1] | passed | 0.00011 seconds |
|
4
|
+
./spec/mdspell/cli_spec.rb[1:2] | passed | 0.00011 seconds |
|
5
|
+
./spec/mdspell/cli_spec.rb[1:3:1] | passed | 0.00017 seconds |
|
6
|
+
./spec/mdspell/cli_spec.rb[1:4:1:1] | passed | 0.00042 seconds |
|
7
|
+
./spec/mdspell/cli_spec.rb[1:4:2:1] | passed | 0.00124 seconds |
|
8
|
+
./spec/mdspell/cli_spec.rb[1:4:3:1] | passed | 0.00058 seconds |
|
9
|
+
./spec/mdspell/configuration_spec.rb[1:1:1] | passed | 0.00036 seconds |
|
10
|
+
./spec/mdspell/configuration_spec.rb[1:1:2:1] | passed | 0.00044 seconds |
|
11
|
+
./spec/mdspell/configuration_spec.rb[1:1:2:2] | passed | 0.00041 seconds |
|
12
|
+
./spec/mdspell/configuration_spec.rb[1:1:3:1] | passed | 0.00047 seconds |
|
13
|
+
./spec/mdspell/configuration_spec.rb[1:2:1] | passed | 0.00057 seconds |
|
14
|
+
./spec/mdspell/configuration_spec.rb[1:2:2:1] | passed | 0.00176 seconds |
|
15
|
+
./spec/mdspell/configuration_spec.rb[1:2:2:2] | passed | 0.00039 seconds |
|
16
|
+
./spec/mdspell/configuration_spec.rb[1:3:1] | passed | 0.00039 seconds |
|
17
|
+
./spec/mdspell/configuration_spec.rb[1:3:2:1] | passed | 0.00041 seconds |
|
18
|
+
./spec/mdspell/configuration_spec.rb[1:3:2:2] | passed | 0.00043 seconds |
|
19
|
+
./spec/mdspell/configuration_spec.rb[1:4:1] | passed | 0.00036 seconds |
|
20
|
+
./spec/mdspell/configuration_spec.rb[1:4:2:1] | passed | 0.00045 seconds |
|
21
|
+
./spec/mdspell/configuration_spec.rb[1:4:2:2] | passed | 0.00051 seconds |
|
22
|
+
./spec/mdspell/spell_checker_spec.rb[1:1:1] | passed | 0.00148 seconds |
|
23
|
+
./spec/mdspell/spell_checker_spec.rb[1:1:2] | passed | 0.00072 seconds |
|
24
|
+
./spec/mdspell/spell_checker_spec.rb[1:1:3] | passed | 0.00301 seconds |
|
25
|
+
./spec/mdspell/spell_checker_spec.rb[1:2:1] | passed | 0.00019 seconds |
|
26
|
+
./spec/mdspell/spell_checker_spec.rb[1:2:2] | passed | 0.00014 seconds |
|
27
|
+
./spec/mdspell/spell_checker_spec.rb[1:2:3] | passed | 0.05121 seconds |
|
28
|
+
./spec/mdspell/spell_checker_spec.rb[1:3:1] | passed | 0.00145 seconds |
|
29
|
+
./spec/mdspell/spell_checker_spec.rb[1:3:2:1] | passed | 0.00142 seconds |
|
30
|
+
./spec/mdspell/spell_checker_spec.rb[1:4:1] | passed | 0.00282 seconds |
|
31
|
+
./spec/mdspell/spell_checker_spec.rb[1:5:1] | passed | 0.01528 seconds |
|
32
|
+
./spec/mdspell/spell_checker_spec.rb[1:5:2] | passed | 0.00968 seconds |
|
33
|
+
./spec/mdspell/spell_checker_spec.rb[1:5:3] | passed | 0.05735 seconds |
|
34
|
+
./spec/mdspell/text_line_spec.rb[1:1:1] | passed | 0.00009 seconds |
|
35
|
+
./spec/mdspell/text_line_spec.rb[1:1:2] | passed | 0.0001 seconds |
|
36
|
+
./spec/mdspell/text_line_spec.rb[1:1:3] | passed | 0.00008 seconds |
|
37
|
+
./spec/mdspell/text_line_spec.rb[1:1:4] | passed | 0.00008 seconds |
|
38
|
+
./spec/mdspell/text_line_spec.rb[1:2:1] | passed | 0.00014 seconds |
|
39
|
+
./spec/mdspell/text_line_spec.rb[1:3:1] | passed | 0.00012 seconds |
|
40
|
+
./spec/mdspell/text_line_spec.rb[1:4:1] | passed | 0.00008 seconds |
|
41
|
+
./spec/mdspell/text_line_spec.rb[1:5:1] | passed | 0.00011 seconds |
|
42
|
+
./spec/mdspell/text_line_spec.rb[1:6:1] | passed | 0.00018 seconds |
|
43
|
+
./spec/mdspell/text_line_spec.rb[1:6:2:1] | passed | 0.00011 seconds |
|
44
|
+
./spec/mdspell/text_line_spec.rb[1:6:3:1] | passed | 0.00022 seconds |
|
45
|
+
./spec/mdspell/text_line_spec.rb[1:6:3:2] | passed | 0.00016 seconds |
|
46
|
+
./spec/mdspell/text_line_spec.rb[1:6:4:1] | passed | 0.00009 seconds |
|
47
|
+
./spec/mdspell/text_line_spec.rb[1:7:1] | passed | 0.00015 seconds |
|
48
|
+
./spec/mdspell/text_line_spec.rb[1:7:2] | passed | 0.00355 seconds |
|
49
|
+
./spec/mdspell/typo_spec.rb[1:1:1] | passed | 0.00012 seconds |
|
50
|
+
./spec/mdspell/typo_spec.rb[1:1:2] | passed | 0.00011 seconds |
|
51
|
+
./spec/mdspell/typo_spec.rb[1:1:3] | passed | 0.0001 seconds |
|
52
|
+
./spec/mdspell/typo_spec.rb[1:2:1] | passed | 0.00013 seconds |
|
53
|
+
./spec/mdspell/typo_spec.rb[1:2:2] | passed | 0.00015 seconds |
|
54
|
+
./spec/mdspell/typo_spec.rb[1:2:3] | passed | 0.00021 seconds |
|
55
|
+
./spec/mdspell/typo_spec.rb[1:3:1] | passed | 0.00051 seconds |
|
56
|
+
./spec/mdspell/typo_spec.rb[1:4:1] | passed | 0.00013 seconds |
|
57
|
+
./spec/mdspell/typo_spec.rb[1:5:1] | passed | 0.00011 seconds |
|
58
|
+
./spec/mdspell/typo_spec.rb[1:5:2] | passed | 0.00011 seconds |
|
data/spec/examples/complete.md
CHANGED
data/spec/mdspell/cli_spec.rb
CHANGED
@@ -29,23 +29,25 @@ describe MdSpell::CLI do
|
|
29
29
|
context 'if directory given' do
|
30
30
|
it 'should return all markdown files in that directory' do
|
31
31
|
subject.run(['spec/examples'])
|
32
|
-
expect(subject.files).to have(
|
32
|
+
expect(subject.files).to have(4).item
|
33
33
|
|
34
34
|
expect(subject.files).to include('spec/examples/simple.md')
|
35
35
|
expect(subject.files).to include('spec/examples/complete.md')
|
36
36
|
expect(subject.files).to include('spec/examples/with_errors.md')
|
37
|
+
expect(subject.files).to include('spec/examples/spanish_errors.md')
|
37
38
|
end
|
38
39
|
end
|
39
40
|
|
40
41
|
context 'if both directory and single file given' do
|
41
42
|
it 'should return all files' do
|
42
43
|
subject.run(['README.md', 'spec/examples'])
|
43
|
-
expect(subject.files).to have(
|
44
|
+
expect(subject.files).to have(5).item
|
44
45
|
|
45
46
|
expect(subject.files).to include('README.md')
|
46
47
|
expect(subject.files).to include('spec/examples/simple.md')
|
47
48
|
expect(subject.files).to include('spec/examples/complete.md')
|
48
49
|
expect(subject.files).to include('spec/examples/with_errors.md')
|
50
|
+
expect(subject.files).to include('spec/examples/spanish_errors.md')
|
49
51
|
end
|
50
52
|
end
|
51
53
|
end
|
@@ -65,6 +65,18 @@ describe MdSpell::SpellChecker do
|
|
65
65
|
expect(typos[3].word).to eq 'tobe'
|
66
66
|
end
|
67
67
|
|
68
|
-
it 'should use configured language'
|
68
|
+
it 'should use configured language' do
|
69
|
+
prev_language = MdSpell::Configuration[:language]
|
70
|
+
MdSpell::Configuration[:language] = 'es'
|
71
|
+
|
72
|
+
typos = MdSpell::SpellChecker.new('spec/examples/spanish_errors.md').typos
|
73
|
+
|
74
|
+
expect(typos).to have(3).items
|
75
|
+
expect(typos[0].word).to eq 'vivira'
|
76
|
+
expect(typos[1].word).to eq 'Oscar'
|
77
|
+
expect(typos[2].word).to eq 'Wilde'
|
78
|
+
|
79
|
+
MdSpell::Configuration[:language] = prev_language
|
80
|
+
end
|
69
81
|
end
|
70
82
|
end
|
@@ -103,7 +103,7 @@ describe MdSpell::TextLine do
|
|
103
103
|
it 'should find proper lines' do
|
104
104
|
lines = MdSpell::TextLine.scan(complete_md)
|
105
105
|
|
106
|
-
expect(lines).to have(
|
106
|
+
expect(lines).to have(19).items
|
107
107
|
|
108
108
|
expect(lines[0].content).to eq 'First header'
|
109
109
|
expect(lines[1].content).to eq 'Second Header'
|
@@ -123,6 +123,7 @@ describe MdSpell::TextLine do
|
|
123
123
|
expect(lines[15].content).to eq 'List'
|
124
124
|
expect(lines[16].content).to eq 'Multi-line paragraph'
|
125
125
|
expect(lines[17].content).to eq 'as list item'
|
126
|
+
expect(lines[18].content).to eq "Two quotes: That's one, and here's the other"
|
126
127
|
end
|
127
128
|
end
|
128
129
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mdspell
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marek Tuchowski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: kramdown
|
@@ -40,7 +40,8 @@ dependencies:
|
|
40
40
|
version: '1.1'
|
41
41
|
description: Check markdown files for spelling errors.
|
42
42
|
email: marek@tuchowski.com.pl
|
43
|
-
executables:
|
43
|
+
executables:
|
44
|
+
- mdspell
|
44
45
|
extensions: []
|
45
46
|
extra_rdoc_files:
|
46
47
|
- README.md
|
@@ -60,6 +61,7 @@ files:
|
|
60
61
|
- spec/examples/complete.md
|
61
62
|
- spec/examples/mdspell.config
|
62
63
|
- spec/examples/simple.md
|
64
|
+
- spec/examples/spanish_errors.md
|
63
65
|
- spec/examples/with_errors.md
|
64
66
|
- spec/mdspell/cli_spec.rb
|
65
67
|
- spec/mdspell/configuration_spec.rb
|
@@ -95,6 +97,7 @@ specification_version: 4
|
|
95
97
|
summary: A Ruby markdown spell checking tool.
|
96
98
|
test_files:
|
97
99
|
- spec/spec_helper.rb
|
100
|
+
- spec/examples/spanish_errors.md
|
98
101
|
- spec/examples/with_errors.md
|
99
102
|
- spec/examples/mdspell.config
|
100
103
|
- spec/examples/complete.md
|