language: ruby
rvm:
- 2.0.0
- 2.1.0
notifications:
  irc:
    channels:
    - irc.freenode.net#theodi
    template:
    - '%{repository} %{branch} - %{message} %{build_url}'
    on_success: change
    on_failure: always
deploy:
  provider: rubygems
  api_key:
    secure: Td9csYhn39HdYzcn8l13+wkhnwJPMwU6qQ9enLz6V1CU5G8cxh5Qb7vIQIXRddRMx1ijlpFenPES5tqoPe10SrwAw7pK50f12+tfKbmIdik1EpOiQmEVbVWn7zAUYBJrS83K4KpefhGCWNxhiZ2Sdwr+cXQ3HZyCAe3VPcv+g9E=
  gem: odlifier
  on:
    tags: true
    repo: theodi/odlifier
    all_branches: true

language: ruby
rvm:
- 2.0.0
- 2.1.0
notifications:
  irc:
    channels:
    - irc.freenode.net#theodi
    template:
    - '%{repository} %{branch} - %{message} %{build_url}'
    on_success: change
    on_failure: always
deploy:
  provider: rubygems
  api_key:
    secure: Td9csYhn39HdYzcn8l13+wkhnwJPMwU6qQ9enLz6V1CU5G8cxh5Qb7vIQIXRddRMx1ijlpFenPES5tqoPe10SrwAw7pK50f12+tfKbmIdik1EpOiQmEVbVWn7zAUYBJrS83K4KpefhGCWNxhiZ2Sdwr+cXQ3HZyCAe3VPcv+g9E=
  gem: odlifier
  on:
    tags: true
    repo: theodi/odlifier
    all_branches: true
after_success:
  - export GEM_VERSION=`ruby -r./lib/odlifier/version -e "puts Odlifier::VERSION"`
  - ! '[ "$TRAVIS_BRANCH" == "master" ] && [ "$TRAVIS_PULL_REQUEST" == "false" ] &&
  curl -v -X POST -d ''{"ref":"refs/tags/$GEM_VERSION","sha":"''$TRAVIS_COMMIT''"}''  --header
  "Content-Type:application/json" -u $GITHUB_USER:$GITHUB_PASSWORD "https://api.github.com/repos/$TRAVIS_REPO_SLUG/git/refs"'

Apply tag on successful master build
Apply tag on successful master build
