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

sleede / fab-manager / #106

pending completion
#106

push

coveralls-ruby

sylvainbx
Merge branch 'dev' for release 6.0.0

704 of 704 new or added lines in 168 files covered. (100.0%)

7919 of 13474 relevant lines covered (58.77%)

15.29 hits per line

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

0.0
/app/controllers/api/files_controller.rb
1
# frozen_string_literal: true
2

3
# API Controller for handling special actions on files
4
class API::FilesController < API::APIController
×
5
  before_action :authenticate_user!
×
6

7
  # test the mime type of the uploaded file
8
  def mime
×
9
    authorize :file
×
10

11
    content_type = Marcel::MimeType.for Pathname.new(file_params.path)
×
12
    render json: { type: content_type }
×
13
  end
×
14

15
  private
×
16

17
  def file_params
×
18
    params.require(:attachment)
×
19
  end
×
20
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

© 2025 Coveralls, Inc