jekyll-test 0.2.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +10 -4
- data/LICENSE.md +22 -0
- data/README.md +14 -1
- data/jekyll-test.gemspec +3 -0
- data/lib/jekyll/test/jekyll.rake +12 -3
- data/lib/jekyll/test/travis.rake +34 -0
- data/lib/jekyll/test/version.rb +1 -1
- metadata +33 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57a20ed116645e39f276c63220bc22fa4c49f2af
|
4
|
+
data.tar.gz: eb980c363e9b903d170c641ef14ce973489a379d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13cfd511ae8e100fe13afe56ebcc9157a68e76cf784158d4ba99ed57a29c6ad64f6bf9b2f990240800cc9f0350c313bfe0431704244396027b7b3fd87cbf039d
|
7
|
+
data.tar.gz: a52484d8a079cd4f7ab576d32e1df412ca93027b66c57ea1595bdc77557f56d9794406906c493c1510302aa066eadb1f864526e910de02a34bbb5a29a4cfccfe
|
data/CHANGELOG.md
CHANGED
@@ -1,9 +1,15 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
|
3
|
+
## 1.0.0
|
4
4
|
|
5
|
-
*
|
5
|
+
* Added `jekyll:configure:travis` task to automatically configure travis matrix builds.
|
6
|
+
* Added jekyll itself as a dependency
|
7
|
+
* Use correct destination directory for builds and tests
|
6
8
|
|
7
|
-
|
9
|
+
## 0.2.0
|
8
10
|
|
9
|
-
*
|
11
|
+
* Add Rake tasks to check validity and links.
|
12
|
+
|
13
|
+
## 0.1.0
|
14
|
+
|
15
|
+
* initial release, pulls in required dependencies for testing.
|
data/LICENSE.md
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
## Copyright (c) 2017 jekyll-test contributors
|
2
|
+
|
3
|
+
# MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
CHANGED
@@ -30,9 +30,22 @@ We suggest making `jekyll:check` your default task by adding this to your Rakefi
|
|
30
30
|
task default: "jekyll:check"
|
31
31
|
```
|
32
32
|
|
33
|
+
### Travis configuration
|
34
|
+
|
35
|
+
To configure a travis build to run these tests, run:
|
36
|
+
|
37
|
+
```
|
38
|
+
rake jekyll:configure:travis
|
39
|
+
```
|
40
|
+
|
41
|
+
This will initialise your repo for use on travis, if necessary, then write a multi-build configuration which will run both checks together. The link check is allowed to fail, so it will not impact your CI success / failure.
|
42
|
+
|
43
|
+
WARNING: This will aggressively overwrite bits of `.travis.yml`, so if you already have one, make sure it's committed or backed up so you can check the changes.
|
44
|
+
|
45
|
+
It's a good idea to run the task with each new release of this gem to get the latest configuration.
|
46
|
+
|
33
47
|
## Coming soon
|
34
48
|
|
35
|
-
* travis setup for using these tasks in a CI environment
|
36
49
|
* spellchecking
|
37
50
|
|
38
51
|
## Contributing
|
data/jekyll-test.gemspec
CHANGED
@@ -6,6 +6,7 @@ require "jekyll/test/version"
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "jekyll-test"
|
8
8
|
spec.version = Jekyll::Test::VERSION
|
9
|
+
spec.licenses = ['MIT']
|
9
10
|
spec.authors = ["James Smith"]
|
10
11
|
spec.email = ["james@floppy.org.uk"]
|
11
12
|
|
@@ -28,9 +29,11 @@ Gem::Specification.new do |spec|
|
|
28
29
|
|
29
30
|
spec.required_ruby_version = ["~> 2.2", "< 2.5"]
|
30
31
|
|
32
|
+
spec.add_dependency "jekyll", "~> 3.0"
|
31
33
|
spec.add_dependency "rspec", "~> 3.0"
|
32
34
|
spec.add_dependency "rake", "~> 12.0"
|
33
35
|
spec.add_dependency 'html-proofer', "~> 3.7"
|
36
|
+
spec.add_dependency 'travis', "~> 1.8"
|
34
37
|
spec.add_dependency 'rspec-html-matchers', "~> 0.9"
|
35
38
|
|
36
39
|
spec.add_development_dependency "bundler", "~> 1.15"
|
data/lib/jekyll/test/jekyll.rake
CHANGED
@@ -9,13 +9,22 @@ def check_site(options = {})
|
|
9
9
|
timeout: 3,
|
10
10
|
},
|
11
11
|
}
|
12
|
-
HTMLProofer.check_directory(
|
12
|
+
HTMLProofer.check_directory(jekyll_site_directory, defaults.merge(options)).run
|
13
|
+
end
|
14
|
+
|
15
|
+
def jekyll_site_directory
|
16
|
+
dir = "./_site"
|
17
|
+
if File.exist?('_config.yml')
|
18
|
+
config = YAML.load_file("_config.yml")
|
19
|
+
dir = config["destination"] || dir
|
20
|
+
end
|
21
|
+
dir
|
13
22
|
end
|
14
23
|
|
15
24
|
namespace :jekyll do
|
16
25
|
|
17
26
|
task :rebuild do
|
18
|
-
sh "rm -rf
|
27
|
+
sh "rm -rf #{jekyll_site_directory}"
|
19
28
|
sh "bundle exec jekyll build"
|
20
29
|
end
|
21
30
|
|
@@ -36,5 +45,5 @@ namespace :jekyll do
|
|
36
45
|
check_external_hash: true,
|
37
46
|
)
|
38
47
|
end
|
39
|
-
|
48
|
+
|
40
49
|
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
namespace :jekyll do
|
2
|
+
|
3
|
+
namespace :configure do
|
4
|
+
|
5
|
+
task :travis do
|
6
|
+
# Initialise travis
|
7
|
+
unless File.exist?(".travis.yml")
|
8
|
+
sh "bundle exec travis init"
|
9
|
+
end
|
10
|
+
# Load existing configuration
|
11
|
+
travis = {}
|
12
|
+
travis = YAML.load_file(".travis.yml")
|
13
|
+
# Update configuration
|
14
|
+
travis["rvm"] = ["2.4.1"]
|
15
|
+
travis["sudo"] = false
|
16
|
+
travis["cache"] = "bundler"
|
17
|
+
travis["env"] = [
|
18
|
+
%Q{TASK='jekyll:check'},
|
19
|
+
%Q{TASK='jekyll:check_external_links'},
|
20
|
+
]
|
21
|
+
travis["matrix"] = {
|
22
|
+
"fast_finish" => true,
|
23
|
+
"allow_failures" => [{
|
24
|
+
"env" => %Q{TASK='jekyll:check_external_links'}
|
25
|
+
}]
|
26
|
+
}
|
27
|
+
travis["script"] = "bundle exec rake $TASK"
|
28
|
+
# Output
|
29
|
+
File.write(".travis.yml", travis.to_yaml)
|
30
|
+
end
|
31
|
+
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
data/lib/jekyll/test/version.rb
CHANGED
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.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Smith
|
@@ -10,6 +10,20 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2017-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3.0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: rspec
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -52,6 +66,20 @@ dependencies:
|
|
52
66
|
- - "~>"
|
53
67
|
- !ruby/object:Gem::Version
|
54
68
|
version: '3.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: travis
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.8'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.8'
|
55
83
|
- !ruby/object:Gem::Dependency
|
56
84
|
name: rspec-html-matchers
|
57
85
|
requirement: !ruby/object:Gem::Requirement
|
@@ -93,6 +121,7 @@ files:
|
|
93
121
|
- CHANGELOG.md
|
94
122
|
- CODE_OF_CONDUCT.md
|
95
123
|
- Gemfile
|
124
|
+
- LICENSE.md
|
96
125
|
- README.md
|
97
126
|
- Rakefile
|
98
127
|
- bin/console
|
@@ -101,9 +130,11 @@ files:
|
|
101
130
|
- lib/jekyll/test.rb
|
102
131
|
- lib/jekyll/test/jekyll.rake
|
103
132
|
- lib/jekyll/test/tasks.rb
|
133
|
+
- lib/jekyll/test/travis.rake
|
104
134
|
- lib/jekyll/test/version.rb
|
105
135
|
homepage: https://github.com/Floppy/jekyll-test
|
106
|
-
licenses:
|
136
|
+
licenses:
|
137
|
+
- MIT
|
107
138
|
metadata:
|
108
139
|
allowed_push_host: https://rubygems.org
|
109
140
|
post_install_message:
|