From 4f43c67308627a095966882b3d51a44db74d62b0 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 17:48:06 +0200 Subject: [PATCH 1/7] Add script/bootstrap --- script/bootstrap | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100755 script/bootstrap diff --git a/script/bootstrap b/script/bootstrap new file mode 100755 index 0000000..4db8f34 --- /dev/null +++ b/script/bootstrap @@ -0,0 +1,13 @@ +#!/bin/sh + +# script/bootstrap: Resolve all dependencies that the application requires to +# run. + +set -e + +cd "$(dirname "$0")/.." + +echo "==> Installing gem dependencies…" +bundle check --path vendor/gems 2>&1 > /dev/null || { + bundle install --path vendor/gems --quiet --without production +} From b9c4d6050b7299aecc91287c46d64a65d7633ffb Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 17:54:57 +0200 Subject: [PATCH 2/7] Add script/test --- script/bootstrap | 5 ++--- script/test | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) create mode 100755 script/test diff --git a/script/bootstrap b/script/bootstrap index 4db8f34..b4f9b1e 100755 --- a/script/bootstrap +++ b/script/bootstrap @@ -1,13 +1,12 @@ #!/bin/sh -# script/bootstrap: Resolve all dependencies that the application requires to -# run. +# script/bootstrap: Resolve all dependencies required by the project. set -e cd "$(dirname "$0")/.." -echo "==> Installing gem dependencies…" +echo "==> Installing gem dependencies..." bundle check --path vendor/gems 2>&1 > /dev/null || { bundle install --path vendor/gems --quiet --without production } diff --git a/script/test b/script/test new file mode 100755 index 0000000..edc0383 --- /dev/null +++ b/script/test @@ -0,0 +1,18 @@ +#!/bin/sh + +# script/test: Run tests. + +set -e + +cd "$(dirname "$0")/.." + +script/bootstrap + +echo "==> Running tests..." + +if [ -n "$1" ]; then + # pass arguments to test call. This is useful for calling a single test. + bundle exec rake test "$1" +else + bundle exec rake test +fi From 3cc25a11620f37367620ead32f45df8d19b1ce94 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 17:58:55 +0200 Subject: [PATCH 3/7] Include instructions for developing --- README.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index bd08937..df0e39f 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,20 @@ People :heart: GitHub Contributions. However, it's not always simple to tell why a commit isn't [counted as a contribution][contributions]. This library lets you check whether a specific commit qualifies as a contribution. +## Developing + +To start working on the project: + +```sh +script/bootstrap +``` + +To run the specs: + +```sh +script/test +``` + ## Usage ```ruby @@ -33,7 +47,9 @@ checker.check } ``` -You might also like to try out the [Contribution Checker][app] app built on top of this library: +## App + +You might like to try out the [Contribution Checker][app] app built on top of this library: ![checker](https://cloud.githubusercontent.com/assets/65057/6320756/b32c9328-bae6-11e4-9ba1-48ced9a5fb6e.png) From 3c92ba8fc5c5e1bafd3634dc4219b1b3991a7fd9 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 18:05:05 +0200 Subject: [PATCH 4/7] Add script/cibuild --- script/cibuild | 7 +++++++ script/test | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) create mode 100755 script/cibuild diff --git a/script/cibuild b/script/cibuild new file mode 100755 index 0000000..043e136 --- /dev/null +++ b/script/cibuild @@ -0,0 +1,7 @@ +#!/bin/sh + +# script/cibuild: Run the CI build for the project. + +set -e + +script/test diff --git a/script/test b/script/test index edc0383..2b84ae9 100755 --- a/script/test +++ b/script/test @@ -1,6 +1,6 @@ #!/bin/sh -# script/test: Run tests. +# script/test: Run the tests for the project. set -e From 0f04083b344458531545b68c8b89309d99845c57 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 18:06:31 +0200 Subject: [PATCH 5/7] Add a .travis file --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml new file mode 100644 index 0000000..a45bbcd --- /dev/null +++ b/.travis.yml @@ -0,0 +1,4 @@ +langauage: ruby +script: "script/cibuild" +sudo: false +cache: bundler From 4cb1c85c9a14d6491aaceea2777a93aed985c5ad Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 18:20:15 +0200 Subject: [PATCH 6/7] Specify Ruby versions --- .travis.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.travis.yml b/.travis.yml index a45bbcd..82f7a9e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,8 @@ langauage: ruby +rvm: + - 2.0.0 + - 2.1.6 + - 2.2.2 script: "script/cibuild" sudo: false cache: bundler From ce0c308a04012664a20af99efdcbb80df4211ca1 Mon Sep 17 00:00:00 2001 From: James Dennes Date: Sat, 11 Jul 2015 18:24:27 +0200 Subject: [PATCH 7/7] Fix typo --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 82f7a9e..1eaf29a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -langauage: ruby +language: ruby rvm: - 2.0.0 - 2.1.6