Add # frozen_string_literal: true

This commit is contained in:
Kamil Trzciński 2018-09-04 11:42:58 +02:00
parent 0a9d771bcb
commit e6d2465d97
13 changed files with 27 additions and 1 deletions

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class PrometheusMetric < ActiveRecord::Base
belongs_to :project, validate: true, inverse_of: :prometheus_metrics

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative '../importers/common_metrics_importer.rb'
::Importers::CommonMetricsImporter.new.execute

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require_relative '../importers/common_metrics_importer.rb'
::Importers::CommonMetricsImporter.new.execute

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class CreatePrometheusMetrics < ActiveRecord::Migration
DOWNTIME = false

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class AddCommonToPrometheusMetrics < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ChangeProjectIdForPrometheusMetrics < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers

View file

@ -1,4 +1,6 @@
class AddIndexOnDefaultPrometheusMetrics < ActiveRecord::Migration
# frozen_string_literal: true
class AddIndexOnCommonForPrometheusMetrics < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
class ImportCommonMetrics < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
require Rails.root.join("db", "importers", "common_metrics_importer.rb")

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
FactoryBot.define do
factory :prometheus_metric, class: PrometheusMetric do
title 'title'

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'rails_helper'
describe Gitlab::Prometheus::MetricGroup do

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
require Rails.root.join('db', 'migrate', '20180831164909_import_common_metrics.rb')

View file

@ -1,3 +1,5 @@
# frozen_string_literal: true
require 'spec_helper'
describe PrometheusMetric do