• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

trotzig / diffux / 142 / 2
99%
master: 99%

Build:
DEFAULT BRANCH: master
Ran 10 Feb 2014 07:01AM UTC
Files 22
Run time –
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

10 Feb 2014 06:48AM UTC coverage: 97.541% (+0.06%) from 97.486%
2.1.0

push

travis-ci

trotzig
Add API endpoint to trigger sweeps

I added a similar action to the `SweepsController#create` called
`#trigger`. This action does the same thing, but sends back responses in
JSON format. If all is good, you get the URL to the new sweep back. If
there are errors, you get the errors back.

The API endpoint is meant to be triggered something like this:

    curl --header "Accept: application/json" \
         --header "Content-Type: application/json" \
         --data '{ \
                   "title": "Deploy #1", \
                   "description": "Release Notes: Fixed layout bug" \
                 }' \
         http://localhost:3000/projects/6/sweeps/trigger

This curl example block is available as copy-paste on the sweep#new page
and the sweep#index page.

Rails does some magic to be able to treat the JSON object as belonging
to the `sweep` namespace. Don't ask me how that works, it just does...

To test this, I had to write a request spec - mainly because of the JSON
parameter. More about request specs:
https://www.relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec

357 of 366 relevant lines covered (97.54%)

23.17 hits per line

Source Files on job 142.2 (2.1.0)
  • Tree
  • List 0
  • Changed 6
  • Source Changed 1
  • Coverage Changed 6
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Build 142
  • Travis Job 142.2
  • d7cae9b9 on github
  • Prev Job for 2.1.0 on master (#141.2)
  • Next Job for 2.1.0 on master (#143.2)
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc