Skip to content

Commit

Permalink
rake to do everything
Browse files Browse the repository at this point in the history
  • Loading branch information
Jon Stroop committed Feb 5, 2016
1 parent 8d0e7a7 commit 0542ab5
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ install:
- bundle install
- npm install grunt grunt-html --save-dev

script: "./test.sh"
script: rake ci

# environment
language: ruby
Expand Down
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,13 @@ Markdown Source of specifications documents

1. `bundle install`

2. Run `$ ./dev.sh` to compile the site and run a dev server on [http://localhost:4000](http://localhost:4000).
2. Run `rake dev` to compile the site and run a dev server on [http://localhost:4000](http://localhost:4000).

## To Run the Tests

```
rake ci
```

## To Publish the Site to iiif.io

Expand All @@ -25,4 +31,4 @@ Will deploy to the iiif.io site if you have permission.

* Much of the site data is in the YAML files in `_data/` (e.g. member institutions, server impls, demos, etc.) make edits there.
* The latest versions of the APIs are set in `_config.yml`. Change there will get pushed to `.htaccess`, `technical-details/`, and any other links.
* Always use the \[link text\]\[ref\] method of creating links. `ref` must consist only of a-zA-Z0-9_- and the first character must be a-zA-Z
* Always use the \[link text\]\[ref\] method of creating links. `ref` must consist only of a-zA-Z0-9_- and the first character must be a-zA-Z
20 changes: 17 additions & 3 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,24 @@ require 'rspec/core/rake_task'

RSpec::Core::RakeTask.new(:spec)

task :test do
sh "bundle exec jekyll build" unless Dir.exists?('./_site')
def rebuild
sh 'rm -rf ./_site' if Dir.exists?('./_site')
sh 'bundle exec jekyll build'
end

'Run the Markdown specs and HTML Proofer'
task :ci do
rebuild
sh 'grunt test'
Rake::Task['spec'].invoke
HTML::Proofer.new('./_site', cache: { timeframe: '2w' } ).run
end

task default: :test
'Run the site locally on localhost:4000'
task :dev do
rebuild
sh 'rm -rf ./_site' if Dir.exists?('./_site')
sh 'jekyll serve --watch --drafts'
end

task default: :ci
4 changes: 0 additions & 4 deletions dev.sh

This file was deleted.

4 changes: 2 additions & 2 deletions spec/source/syntax_spec.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
require 'spec_helper'
require 'kramdown/document'

describe 'Editors' do
describe 'Editors' do

they 'tend to screw up markdown' do

report = {}
# template = 'cat %s | kramdown 2>&1 >/dev/null | grep "link ID \'[a-zA-Z][_0-9a-zA-Z-]*\'"'
glob_pattern = File.join(File.expand_path('../../../source', __FILE__), '**/*.md')
Expand Down
16 changes: 0 additions & 16 deletions test.sh

This file was deleted.

2 changes: 1 addition & 1 deletion tmp/.htmlproofer/cache.log

Large diffs are not rendered by default.

0 comments on commit 0542ab5

Please sign in to comment.