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

trotzig / diffux / 142
99%

Build:
DEFAULT BRANCH: master
Ran 10 Feb 2014 07:01AM UTC
Jobs 2
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

pending completion
142

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%)

46.34 hits per line

Jobs
ID Job ID Ran Files Coverage
1 142.1 (2.0.0) 10 Feb 2014 07:02AM UTC 0
97.54
Travis Job 142.1
2 142.2 (2.1.0) 10 Feb 2014 07:01AM UTC 0
97.54
Travis Job 142.2
Source Files on build 142
Detailed source file information is not available for this build.
  • Back to Repo
  • Travis Build #142
  • d7cae9b9 on github
  • Prev Build on master (#141)
  • Next Build on master (#143)
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