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

sleede / fab-manager / #98

pending completion
#98

push

coveralls-ruby

sylvainbx
Merge branch 'dev' for release 5.7.0

1368 of 1368 new or added lines in 161 files covered. (100.0%)

7383 of 12030 relevant lines covered (61.37%)

14.06 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

92.0
/app/controllers/api/statuses_controller.rb
1
# frozen_string_literal: true
2

3
# API Controller for resources of type Status
4
# Status are used to check Projects state
5
class API::StatusesController < ApplicationController
1✔
6
  before_action :set_status, only: %i[update destroy]
1✔
7
  before_action :authenticate_user!, only: %i[create update destroy]
1✔
8
  def index
1✔
9
    @statuses = Status.all
1✔
10
  end
11

12
  def create
1✔
13
    authorize Status
1✔
14
    @status = Status.new(status_params)
1✔
15
    if @status.save
1✔
16
      render json: @status, status: :created
1✔
17
    else
18
      render json: @status.errors, status: :unprocessable_entity
×
19
    end
20
  end
21

22
  def update
1✔
23
    authorize Status
1✔
24
    if @status.update(status_params)
1✔
25
      render json: @status, status: :ok
1✔
26
    else
27
      render json: @status.errors, status: :unprocessable_entity
×
28
    end
29
  end
30

31
  def destroy
1✔
32
    authorize Status
1✔
33
    @status.destroy
1✔
34
    head :no_content
1✔
35
  end
36

37
  private
1✔
38

39
  def set_status
1✔
40
    @status = Status.find(params[:id])
2✔
41
  end
42

43
  def status_params
1✔
44
    params.require(:status).permit(:name)
2✔
45
  end
46
end
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