jekyll-test 0.1.0 → 0.2.0

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: 260d065347629dc86581f4b787ffd66e30950ba1
4
- data.tar.gz: f8ba273a7265db21789b070c1cf2a2fb061b198b
3
+ metadata.gz: b006f21b3357879ec08439ed3f0edb01761887d9
4
+ data.tar.gz: 760706b545b80f1d402ca05bcd5c721a8b5950aa
5
5
  SHA512:
6
- metadata.gz: 228766922c22133195c45e44be99d8799af6d20b34e07c58a82aa41e32ec333d96563041b9ac5df25ed40779f8ace1a0cba386693b757e307201ba89b21fa78d
7
- data.tar.gz: 76a872d57401fed3a10eb7c7544ebdd46e81715fd346bfc9a88ecf8e132d38af8e4d429a4650fd4495fa247c24e1fbea32e8df4b4f97ab63bbd1042e4495f9d1
6
+ metadata.gz: 43c75fed06e6ab263e3cdcd24b9db4ff7f5acaf53930cdc76570c12e1ab34ad13e75947bcb5d91715538b76606999325d26b00697f82d97b2b62179b53cad75e
7
+ data.tar.gz: 7bab9b15c9a9e8a1eae2163e324a5f358ebd4182b62de59ba94660d87d980cf87d78affdf175065328e04a1e1e16b9e2396bc71e257e7296da27ec318ec42b33
@@ -0,0 +1,9 @@
1
+ # Changelog
2
+
3
+ # v0.2.0
4
+
5
+ * Add Rake tasks to check validity and links
6
+
7
+ # v0.1.0
8
+
9
+ * initial release, pulls in required dependencies for testing
data/README.md CHANGED
@@ -1,39 +1,44 @@
1
- # Jekyll::Test
1
+ # Jekyll-Test
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/jekyll/test`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ `jekyll-test` is a highly opinionated test configuration for Jekyll sites to let you create well-formed sites with minimal configuration.
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
5
+ It provides two rake tasks:
6
6
 
7
- ## Installation
7
+ `jekyll:check` will test your site for HTML validity, internal link correctness, alt tags, OpenGraph validity, https usage, and a load more. It will complain about as much as it can. You want this to pass.
8
8
 
9
- Add this line to your application's Gemfile:
9
+ `jekyll:check_external_links` will check all outgoing links as well. This is a separate task as this often fails due to network errors, etc, and you don't want to depend on it passing. Use it for information only.
10
10
 
11
- ```ruby
12
- gem 'jekyll-test'
13
- ```
14
-
15
- And then execute:
11
+ ## Usage
16
12
 
17
- $ bundle
13
+ Add this line to your site's Gemfile and run `bundle`:
18
14
 
19
- Or install it yourself as:
15
+ ```ruby
16
+ group :test do
17
+ gem 'jekyll-test'
18
+ end
19
+ ```
20
20
 
21
- $ gem install jekyll-test
21
+ In your Rakefile, then add:
22
22
 
23
- ## Usage
23
+ ```ruby
24
+ require 'jekyll/test/tasks'
25
+ ```
24
26
 
25
- TODO: Write usage instructions here
27
+ We suggest making `jekyll:check` your default task by adding this to your Rakefile:
26
28
 
27
- ## Development
29
+ ```rake
30
+ task default: "jekyll:check"
31
+ ```
28
32
 
29
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
33
+ ## Coming soon
30
34
 
31
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
35
+ * travis setup for using these tasks in a CI environment
36
+ * spellchecking
32
37
 
33
38
  ## Contributing
34
39
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/jekyll-test. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
40
+ Bug reports and pull requests are welcome on GitHub at https://github.com/Floppy/jekyll-test. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
41
 
37
42
  ## Code of Conduct
38
43
 
39
- Everyone interacting in the Jekyll::Test project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-test/blob/master/CODE_OF_CONDUCT.md).
44
+ Everyone interacting in the Jekyll::Test project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/jekyll-test/blob/master/CODE_OF_CONDUCT.md).
@@ -0,0 +1,40 @@
1
+ require 'html-proofer'
2
+
3
+ def check_site(options = {})
4
+ defaults = {
5
+ assume_extension: ".html",
6
+ typhoeus: {
7
+ ssl_verifypeer: false,
8
+ ssl_verifyhost: 0,
9
+ timeout: 3,
10
+ },
11
+ }
12
+ HTMLProofer.check_directory("./_site", defaults.merge(options)).run
13
+ end
14
+
15
+ namespace :jekyll do
16
+
17
+ task :rebuild do
18
+ sh "rm -rf _site"
19
+ sh "bundle exec jekyll build"
20
+ end
21
+
22
+ task :check => :rebuild do
23
+ check_site(
24
+ check_html: true,
25
+ check_favicon: true,
26
+ #check_sri: true, #soon!
27
+ check_img_http: true,
28
+ check_opengraph: true,
29
+ disable_external: true,
30
+ )
31
+ end
32
+
33
+ task :check_external_links => :rebuild do
34
+ check_site(
35
+ url_ignore: [],
36
+ check_external_hash: true,
37
+ )
38
+ end
39
+
40
+ end
@@ -0,0 +1,2 @@
1
+ $VERBOSE = nil
2
+ Dir["#{File.dirname(__FILE__)}/*.rake"].each { |ext| load ext }
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Test
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-test
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Smith
@@ -90,6 +90,7 @@ files:
90
90
  - ".gitignore"
91
91
  - ".rspec"
92
92
  - ".travis.yml"
93
+ - CHANGELOG.md
93
94
  - CODE_OF_CONDUCT.md
94
95
  - Gemfile
95
96
  - README.md
@@ -98,6 +99,8 @@ files:
98
99
  - bin/setup
99
100
  - jekyll-test.gemspec
100
101
  - lib/jekyll/test.rb
102
+ - lib/jekyll/test/jekyll.rake
103
+ - lib/jekyll/test/tasks.rb
101
104
  - lib/jekyll/test/version.rb
102
105
  homepage: https://github.com/Floppy/jekyll-test
103
106
  licenses: []