middleman-spellcheck 0.2 → 0.3
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6aa4111fb86107b945fe10d5837d57a04420d148
|
4
|
+
data.tar.gz: 77d631034f260e1d24936e197446e352f68566fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 835e8c476a4988f9f609e7f20191761c645617ffcea5488db25f080f8d4be8c3e0acc9f9d51c219bf30bc632392257df51248f5a3add0694faf03dd4b8bc5896
|
7
|
+
data.tar.gz: 5b70712eb2453f1a74109f4dd94516edf344c8d51ab11d3ea978f6078aededa02ddb90aedf26d3fd81093f3de3b492dd7744fab13833a0d9b945f88f81778b1e
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Middleman
|
1
|
+
# Middleman-Spellchecker
|
2
2
|
|
3
3
|
Run a spell checker job after the app is built. Requires 'aspell'.
|
4
4
|
|
@@ -43,3 +43,7 @@ activate :spellcheck, allow: ["Gooby", "pls"]
|
|
43
43
|
3. Commit your changes (`git commit -am 'Add some feature'`)
|
44
44
|
4. Push to the branch (`git push origin my-new-feature`)
|
45
45
|
5. Create new Pull Request
|
46
|
+
|
47
|
+
## Thanks
|
48
|
+
|
49
|
+
Special thanks to [Readbeard-Tech](https://rubygems.org/profiles/redbeard-tech) for the [spellchecker](https://rubygems.org/gems/spellchecker) gem, which this code is based upon.
|
@@ -4,6 +4,7 @@ require 'nokogiri'
|
|
4
4
|
module Middleman
|
5
5
|
module Spellcheck
|
6
6
|
class SpellcheckExtension < Extension
|
7
|
+
REJECTED_EXTS = %w(.css)
|
7
8
|
option :page, "/*", "Run only pages that match the regex through the spellchecker"
|
8
9
|
option :tags, [], "Run spellcheck only on some tags from the output"
|
9
10
|
option :allow, [], "Allow specific words to be misspelled"
|
@@ -55,6 +56,7 @@ module Middleman
|
|
55
56
|
|
56
57
|
def filter_resources(app, pattern)
|
57
58
|
app.sitemap.resources.select { |resource| resource.url.match(pattern) }
|
59
|
+
.reject { |resource| REJECTED_EXTS.include? resource.ext }
|
58
60
|
end
|
59
61
|
|
60
62
|
def run_check(text, dictionary="en")
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-spellcheck
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.3'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Zarea
|
@@ -87,6 +87,7 @@ files:
|
|
87
87
|
- fixtures/allow_app/config.rb
|
88
88
|
- fixtures/allow_app/source/index.html.erb
|
89
89
|
- fixtures/correct_spelling_app/config.rb
|
90
|
+
- fixtures/correct_spelling_app/source/index.css
|
90
91
|
- fixtures/correct_spelling_app/source/index.html.erb
|
91
92
|
- fixtures/incorrect_spelling_app/config.rb
|
92
93
|
- fixtures/incorrect_spelling_app/source/index.html.erb
|