Skip to content
Snippets Groups Projects
Commit 32af384a authored by gfyoung's avatar gfyoung
Browse files

Enable frozen string in rest of app/models/**/*.rb

Partially addresses #47424.
parent ce2f1ec8
No related branches found
No related tags found
1 merge request!10495Merge Requests - Assignee
Showing
with 42 additions and 2 deletions
# frozen_string_literal: true
class ProgrammingLanguage < ActiveRecord::Base
validates :name, presence: true
validates :color, allow_blank: false, color: true
Loading
Loading
# frozen_string_literal: true
require 'asana'
 
class AsanaService < Service
Loading
Loading
# frozen_string_literal: true
class AssemblaService < Service
prop_accessor :token, :subdomain
validates :token, presence: true, if: :activated?
Loading
Loading
# frozen_string_literal: true
class BambooService < CiService
include ReactiveService
 
Loading
Loading
# frozen_string_literal: true
class BugzillaService < IssueTrackerService
validates :project_url, :issues_url, :new_issue_url, presence: true, public_url: true, if: :activated?
 
Loading
Loading
# frozen_string_literal: true
require "addressable/uri"
 
class BuildkiteService < CiService
Loading
Loading
# frozen_string_literal: true
# This class is to be removed with 9.1
# We should also by then remove BuildsEmailService from database
class BuildsEmailService < Service
Loading
Loading
# frozen_string_literal: true
class CampfireService < Service
prop_accessor :token, :subdomain, :room
validates :token, presence: true, if: :activated?
Loading
Loading
@@ -82,7 +84,7 @@ class CampfireService < Service
before = push[:before]
after = push[:after]
 
message = ""
message = []
message << "[#{project.full_name}] "
message << "#{push[:user_name]} "
 
Loading
Loading
@@ -95,6 +97,6 @@ class CampfireService < Service
message << "#{project.web_url}/compare/#{before}...#{after}"
end
 
message
message.join
end
end
# frozen_string_literal: true
require 'slack-notifier'
 
module ChatMessage
Loading
Loading
# frozen_string_literal: true
module ChatMessage
class IssueMessage < BaseMessage
attr_reader :title
Loading
Loading
# frozen_string_literal: true
module ChatMessage
class MergeMessage < BaseMessage
attr_reader :merge_request_iid
Loading
Loading
# frozen_string_literal: true
module ChatMessage
class NoteMessage < BaseMessage
attr_reader :note
Loading
Loading
# frozen_string_literal: true
module ChatMessage
class PipelineMessage < BaseMessage
attr_reader :ref_type
Loading
Loading
# frozen_string_literal: true
module ChatMessage
class PushMessage < BaseMessage
attr_reader :after
Loading
Loading
# frozen_string_literal: true
module ChatMessage
class WikiPageMessage < BaseMessage
attr_reader :title
Loading
Loading
# frozen_string_literal: true
# Base class for Chat notifications services
# This class is not meant to be used directly, but only to inherit from.
class ChatNotificationService < Service
Loading
Loading
# frozen_string_literal: true
# Base class for CI services
# List methods you need to implement to get your CI service
# working with GitLab Merge Requests
Loading
Loading
# frozen_string_literal: true
class CustomIssueTrackerService < IssueTrackerService
validates :project_url, :issues_url, :new_issue_url, presence: true, public_url: true, if: :activated?
 
Loading
Loading
# frozen_string_literal: true
# Base class for deployment services
#
# These services integrate with a deployment solution like Kubernetes/OpenShift,
Loading
Loading
# frozen_string_literal: true
class DroneCiService < CiService
include ReactiveService
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment