Skip to content

Commit

Permalink
Merge pull request #17 from jdennes/add-scripts
Browse files Browse the repository at this point in the history
Add scripts directory
  • Loading branch information
jdennes committed Jul 11, 2015
2 parents a8bb505 + ce0c308 commit cb1858c
Show file tree
Hide file tree
Showing 5 changed files with 62 additions and 1 deletion.
8 changes: 8 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
language: ruby
rvm:
- 2.0.0
- 2.1.6
- 2.2.2
script: "script/cibuild"
sudo: false
cache: bundler
18 changes: 17 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)

Expand Down
12 changes: 12 additions & 0 deletions script/bootstrap
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/bin/sh

# script/bootstrap: Resolve all dependencies required by the project.

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
}
7 changes: 7 additions & 0 deletions script/cibuild
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh

# script/cibuild: Run the CI build for the project.

set -e

script/test
18 changes: 18 additions & 0 deletions script/test
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#!/bin/sh

# script/test: Run the tests for the project.

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

0 comments on commit cb1858c

Please sign in to comment.