Skip to content

Commit 15d637d

Browse files
committed
Check -> Checks
It reads better this way.
1 parent cf5c2d6 commit 15d637d

File tree

7 files changed

+8
-8
lines changed

7 files changed

+8
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,14 +76,14 @@ In the above, there would be a maximum length of 50 characters for the title (ra
7676

7777
## Roll Your Own
7878

79-
You can also add your own checks. To do so, create a class in the `Jekyll::PreCommit::Check` module and and define a `check` method. Your class should extend the `Jekyll::PreCommit::Check::Check` class and return the `@result` instance variable.
79+
You can also add your own checks. To do so, create a class in the `Jekyll::PreCommit::Checks` module and and define a `check` method. Your class should extend the `Jekyll::PreCommit::Checks::Check` class and return the `@result` instance variable.
8080

8181
For example...
8282

8383
```ruby
8484
module Jekyll
8585
module PreCommit
86-
module Check
86+
module Checks
8787
class DoesNothing < Check
8888
def check(staged, not_staged, site, args)
8989
@result

lib/jekyll-pre-commit/checks/check.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Jekyll
22
module PreCommit
3-
module Check
3+
module Checks
44
class Check
55
def initialize
66
@result = { :ok => true, :message => "" }

lib/jekyll-pre-commit/checks/front_matter_variable_exists.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Jekyll
22
module PreCommit
3-
module Check
3+
module Checks
44
class FrontMatterVariableExists < Check
55
def check(staged, not_staged, site, args)
66
if !args["variables"]

lib/jekyll-pre-commit/checks/front_matter_variable_is_not_duplicate.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Jekyll
22
module PreCommit
3-
module Check
3+
module Checks
44
class FrontMatterVariableIsNotDuplicate < Check
55
def check(staged, not_staged, site, args)
66
if !args["variables"]

lib/jekyll-pre-commit/checks/front_matter_variable_meets_length_requirements.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Jekyll
22
module PreCommit
3-
module Check
3+
module Checks
44
class FrontMatterVariableMeetsLengthRequirements < Check
55

66
DEFAULT_LENGTH_REQUIREMENTS = {

lib/jekyll-pre-commit/runner.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def run(site, staged_files)
2929

3030
site.config["pre-commit"].each do |c|
3131
begin
32-
o = Object.const_get("Jekyll::PreCommit::Check::" + c["check"]).new
32+
o = Object.const_get("Jekyll::PreCommit::Checks::" + c["check"]).new
3333
rescue
3434
result[:ok] = false
3535
result[:messages].push("The check #{c["check"]} does not exist! Please fix your configuration.")

spec/fixtures/_plugins/custom_check.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
module Jekyll
22
module PreCommit
3-
module Check
3+
module Checks
44
class CustomCheck < Check
55
def check(staged, not_staged, site, args)
66
@result[:message] += "I was created."

0 commit comments

Comments
 (0)