Skip to content

Commit 4fbb7c8

Browse files
committedNov 18, 2014
Squashed commit of the following:
commit b7f74ad Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:51:09 2014 +0000 Ignore Empty content commit c927252 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:50:55 2014 +0000 No, don't test those commit ea23279 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:32:33 2014 +0000 For debugging, replace back http://localhost to https://w3id.org/ commit a6421f4 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:24:37 2014 +0000 and cat the checking-uris.txt commit fa18f53 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:24:03 2014 +0000 RewriteEngine On again for bundle commit 1c2bb09 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:23:07 2014 +0000 About security/ commit f33df65 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:20:59 2014 +0000 README for 3rs commit d36982d Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:13:33 2014 +0000 Order of sed matters! :) commit b9a3453 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:11:32 2014 +0000 No.. we need full sed first! commit 0055527 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:06:58 2014 +0000 test: What if REwriteEngine Off commit 452b47c Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:06:33 2014 +0000 error log to &2 commit 17e6243 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:05:48 2014 +0000 Avoid double "Command exited with 0" in travis commit ced3062 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 16:00:17 2014 +0000 Modify checking-URIs commit 7314ec9 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:57:31 2014 +0000 Expose captured URIs commit a98ab9f Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:56:27 2014 +0000 No need for tailing access.log commit c43f2bb Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:55:54 2014 +0000 Uups.. commit 16cf5e7 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:52:42 2014 +0000 More README.. commit b24a14c Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:50:31 2014 +0000 Markdown........ commit cacf173 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:49:38 2014 +0000 this -> perma-id/w3id.org (as it would be forked allover) commit f808c5b Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:48:36 2014 +0000 pull request commit 6075e50 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:47:31 2014 +0000 Markdown.. commit 13bf93e Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:45:59 2014 +0000 README about README.md .. commit d42bd04 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:42:19 2014 +0000 Undo temporary syntax error (avoid 500 error) commit 2a3ba83 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:42:11 2014 +0000 Only README.md commit 0040c51 Merge: 10fae74 ca25dfa Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:38:00 2014 +0000 Merge remote-tracking branch 'upstream/master' into travis-checker commit 10fae74 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:37:44 2014 +0000 Logging done in before-script commit 3309be2 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:26:07 2014 +0000 sudo for logs commit 9df189b Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:25:59 2014 +0000 Experiment: Broken .htaccess commit 7981ce8 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:24:57 2014 +0000 sudo for tail commit c94f9ad Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:17:02 2014 +0000 or perhaps just a sudo.. commit 434a02e Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:16:30 2014 +0000 port 80 bad, perhaps 8080 OK? commit 7b801d6 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:11:43 2014 +0000 include access logs commit 5b779c6 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:05:07 2014 +0000 find -name commit 7d0facf Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:04:10 2014 +0000 use http://localhost instead of https://w3id.org commit 9866612 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:02:27 2014 +0000 mkdir.. commit cd5e66f Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:01:45 2014 +0000 and sudo for cp.. commit ac8d032 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 15:01:01 2014 +0000 /var/www - not /var/www/html - precise again not being precicse commit 731595c Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:58:27 2014 +0000 sites-enabled/ paths in precise.. commit 1966b37 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:52:00 2014 +0000 We'll use just grep/sed and linkchecker instead commit a2aa183 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:21:26 2014 +0000 Also need libicu-dev ! Ruby.........!!!!!! commit 81ab8f2 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:20:26 2014 +0000 Avoid hardcoding ~/.gems etc commit 348a375 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:14:15 2014 +0000 before_script etc.. commit a33c5ef Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:12:27 2014 +0000 Travis: assume /etc/apache2/sites-enabled/* commit 36764c2 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:09:08 2014 +0000 some sudo for travis.. commit 1904cd1 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 14:07:52 2014 +0000 Also install apache2 ,test through http://localhost commit d3a7cd2 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 13:25:52 2014 +0000 .travis.yml for checking links in README.md commit 392be35 Author: Stian Soiland-Reyes <[email protected]> Date: Tue Nov 18 13:31:40 2014 +0000 travis link
1 parent ca25dfa commit 4fbb7c8

File tree

3 files changed

+62
-5
lines changed

3 files changed

+62
-5
lines changed
 

‎.travis.yml

+31
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
language: bash
2+
3+
before_install:
4+
- sudo apt-get -qq update
5+
6+
install:
7+
- sudo apt-get -qq install linkchecker apache2
8+
9+
before_script:
10+
- sudo sed -i '/<\/VirtualHost/ i\ <Directory /var/www/>\n AllowOverride All\n </Directory>' /etc/apache2/sites-enabled/*
11+
- sudo cp -r * /var/www/
12+
- sudo a2enmod rewrite
13+
- sudo service apache2 restart
14+
- mkdir -p ~/.linkchecker
15+
- echo -e "[filtering]\nignorewarnings=http-moved-permanent,http-empty-content" > ~/.linkchecker/linkcheckerrc
16+
- sudo tail -f /var/log/apache2/error.log >&2 &
17+
18+
script:
19+
- cat $(find . -name 'README.md') |
20+
grep https://w3id.org |
21+
sed 's,.*https://w3id.org/,http://localhost/,' |
22+
sed 's,[ )].*,,' > checking-uris.txt ;
23+
echo "About to test locally:" ; cat checking-uris.txt | sed s,http://localhost,https://w3id.org,
24+
- cat checking-uris.txt | linkchecker --stdin -r 0
25+
26+
after_script:
27+
- sudo cat /var/log/apache2/access.log
28+
29+
after_failure:
30+
- sudo cat /var/log/apache2/error.log > &2
31+

‎README.md

+30-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
Permanent Identifiers for the Web
22
=================================
33

4+
[![Build Status](https://travis-ci.org/perma-id/w3id.org.svg)](https://travis-ci.org/perma-id/w3id.org)
5+
46
This repository holds the website source code for https://w3id.org/
57

68
The purpose of w3id.org is to provide a secure, permanent URL re-direction
@@ -44,11 +46,16 @@ Adding a Permanent Identifier to w3id.org
4446
For the technically savvy, the preferred way to create the redirect yourself is
4547
by following these steps:
4648

47-
1. Fork this source code repository.
48-
2. Add a new re-direct entry. Look in the '/security/.htaccess' file for a
49-
simple example.
50-
3. Commit your changes and submit a pull request.
51-
4. w3id.org administrators will review your pull request and merge it if
49+
1. Fork the [perma-id/w3id.org](https://github.com/perma-id/w3id.org)
50+
source code repository.
51+
2. Add a new re-direct entry. For a simple example, see
52+
[security/.htaccess](security/.htaccess)
53+
3. (Optional) Add a `README.md` detailing contact persons and
54+
(a subset of) your permanent identifiers. For an example,
55+
see [rdw/README.md](rdw/README.md)
56+
4. Commit your changes and submit a
57+
[pull request](https://github.com/perma-id/w3id.org/pulls).
58+
5. w3id.org administrators will review your pull request and merge it if
5259
everything looks correct. Once the pull request is merged, the changes go
5360
live immediately.
5461

@@ -57,3 +64,21 @@ You can also send a request to add a redirect to the
5764
mailing list. Make sure to include the URL that you want on w3id.org, the
5865
URL that you want to redirect to, and the HTTP code that you want to use
5966
when redirecting. An administrator will then create the redirect for you.
67+
68+
Link checking
69+
-------------
70+
A simple [Travis-CI](https://travis-ci.org/perma-id/w3id.org) job
71+
(see [.travis.yml](.travis.yml)) will extract all https://w3id.org/
72+
URIs from `*/README.md` and check them with
73+
[linkchecker](https://wummel.github.io/linkchecker/) -
74+
in theory this will catch two kinds of errors:
75+
76+
1. Following a redirection gives a `404 Not Found`
77+
2. An error in `.htaccess` causes a `500 Server Error`.
78+
79+
Note that this only checks URIs that are listed in the `README.md` files.
80+
81+
Travis might comment on your Pull Request if this test reveals an error -
82+
check its output logs to ensure the errors are not caused by
83+
your modification.
84+

‎bundle/.htaccess

+1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
RewriteEngine on
2+
23
RewriteRule ^$ https://researchobject.github.io/specifications/bundle/ [R=302,L]
34
RewriteRule ^draft(.*) https://researchobject.github.io/specifications/bundle/draft$1 [R=302,L]
45
RewriteRule ^(20\d\d)(.*) https://researchobject.github.io/specifications/bundle/$1$2 [R=302,L]

0 commit comments

Comments
 (0)
Please sign in to comment.