Skip to content

Commit 945dd4a

Browse files
committed
Validate with validator.nu jar on travis
1 parent 96864f4 commit 945dd4a

File tree

5 files changed

+43
-8
lines changed

5 files changed

+43
-8
lines changed

.travis-install_start_validator_nu.sh

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env sh
2+
3+
VALIDATOR_NU_VERSION=16.6.29
4+
VALIDATOR_NU_PORT=8888
5+
VALIDATOR_NU_ZIP=vnu.jar_${VALIDATOR_NU_VERSION}.zip
6+
VALIDATOR_NU_DL_BASE="https://github.com/validator/validator/releases/download"
7+
VALIDATOR_NU_DL_URL="${VALIDATOR_NU_DL_BASE}/${VALIDATOR_NU_VERSION}/${VALIDATOR_NU_ZIP}"
8+
VALIDATOR_NU_DEST="${HOME}/validator"
9+
VALIDATOR_NU_PATH="${VALIDATOR_NU_DEST}/dist/vnu.jar"
10+
11+
if [ ! -f "${VALIDATOR_NU_PATH}" ]; then
12+
wget "${VALIDATOR_NU_DL_URL}" -O "/tmp/${VALIDATOR_NU_ZIP}"
13+
unzip -o -d "${VALIDATOR_NU_DEST}" "/tmp/${VALIDATOR_NU_ZIP}"
14+
fi
15+
16+
echo "Validator.nu version"
17+
java -jar "${VALIDATOR_NU_PATH}" --version
18+
19+
nohup java -cp "${VALIDATOR_NU_PATH}" nu.validator.servlet.Main \
20+
"${VALIDATOR_NU_PORT}" </dev/null 2>&1 &

.travis.yml

+8
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,16 @@
11
language: ruby
22
sudo: false
33
rvm: 2.3.1
4+
jdk: oraclejdk8
5+
env:
6+
VALIDATOR_NU_URL: "http://0.0.0.0:8888/"
47
cache:
58
bundler: true
9+
directories:
10+
- "${HOME}/validator"
11+
before_script: ./.travis-install_start_validator_nu.sh
12+
script:
13+
- bundle exec rake check:markup
614
# Notifications, used by our Gitter channel.
715
notifications:
816
webhooks:

Gemfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ gem 'rack-protection'
1313

1414
group :development do
1515
gem 'spidr', '~> 0.4'
16-
gem 'validate-website', '~> 0.9'
16+
gem 'validate-website', '~> 1.5.8'
1717
end

Gemfile.lock

+10-6
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ GEM
22
remote: https://rubygems.org/
33
specs:
44
colorator (0.1)
5+
crass (1.0.2)
56
ffi (1.9.10)
67
jekyll (3.1.5)
78
colorator (~> 0.1)
@@ -30,7 +31,7 @@ GEM
3031
multipart_body (0.2.1)
3132
nokogiri (1.6.7.2)
3233
mini_portile2 (~> 2.0.0.rc2)
33-
paint (0.9.0)
34+
paint (1.0.1)
3435
rack (1.6.4)
3536
rack-protection (1.5.3)
3637
rack
@@ -45,15 +46,18 @@ GEM
4546
rouge (1.10.1)
4647
safe_yaml (1.0.4)
4748
sass (3.4.22)
49+
slop (4.3.0)
4850
spidr (0.5.0)
4951
nokogiri (~> 1.3)
5052
unicorn (5.1.0)
5153
kgio (~> 2.6)
5254
raindrops (~> 0.7)
53-
validate-website (0.9.5)
55+
validate-website (1.5.8)
56+
crass (~> 1)
5457
multipart_body (~> 0.2)
55-
paint (~> 0.8)
56-
spidr (~> 0.4)
58+
paint (~> 1)
59+
slop (~> 4.2)
60+
spidr (~> 0.5)
5761

5862
PLATFORMS
5963
ruby
@@ -68,10 +72,10 @@ DEPENDENCIES
6872
rouge (~> 1.10)
6973
spidr (~> 0.4)
7074
unicorn
71-
validate-website (~> 0.9)
75+
validate-website (~> 1.5.8)
7276

7377
RUBY VERSION
7478
ruby 2.3.1p112
7579

7680
BUNDLED WITH
77-
1.12.3
81+
1.12.5

Rakefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,10 @@ namespace :check do
206206
require 'jekyll'
207207
options = Jekyll.configuration
208208
Dir.chdir('_site') do
209-
system("validate-website-static --site '#{options['url']}/' --quiet")
209+
system("validate-website-static " \
210+
"--verbose " \
211+
"--exclude 'examples' " \
212+
"--site '#{options['url']}/'")
210213
exit($?.exitstatus)
211214
end
212215
end

0 commit comments

Comments
 (0)