• 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/version_controller.rb
1
# frozen_string_literal: true
2

3
require 'version'
×
4

5
# API Controller to get the Fab-manager version
6
class API::VersionController < API::APIController
×
7
  before_action :authenticate_user!
×
8

9
  def show
×
10
    authorize :version
×
11
    # save the origin
12
    origin = Setting.find_or_create_by(name: 'origin')
×
13
    if origin.value != params[:origin]
×
14
      origin.value = params[:origin]
×
15
      origin.save!
×
16
    end
×
17
    # get the last version
18
    update_status = Setting.get('hub_last_version') || '{}'
×
19

20
    json = JSON.parse(update_status)
×
21
    json['current'] = Version.current
×
22
    render json: json, status: :ok
×
23
  end
×
24
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