You need to sign in or sign up before continuing.

Search

Advanced search is enabled.
Showing 1 - 20 of 1759 code results for rails -filename:Gemfile.lock  in
of GitLab.org / GitLab
---

# The Rails Console

The [Rails console](https://guides.rubyonrails.org/command_line.html#rails-console).
#######################
# rspec job base specs
.rails-job-base:
  extends:
    - .default-retry
import Rails from '@rails/ujs';

export const initRails = () => {
---

# Navigating GitLab via Rails console

At the heart of GitLab is a web application [built using the Ruby on Rails
require 'rubocop'
require 'rubocop/rspec/support'
require_relative '../../../../rubocop/cop/gitlab/rails_logger'

RSpec.describe RuboCop::Cop::Gitlab::RailsLogger, type: :rubocop do

# This Rack middleware is intended to measure the latency between
# gitlab-workhorse forwarding a request to the Rails application and the
# time this middleware is reached.
  module Cop
    module Gitlab
      class RailsLogger < ::RuboCop::Cop::Cop
        include CodeReuseHelpers
# frozen_string_literal: true

# For specs which don't load Rails, provide a path to Rails root
module FastRailsRoot
  RAILS_ROOT = File.absolute_path("#{__dir__}/../../..")
require 'gettext_i18n_rails/haml_parser'
require 'gettext_i18n_rails_js/parser/javascript'
require 'json'
# This file requires config/initializers/1_settings.rb

if Rails.env.development?
  Rails.application.config.hosts += [Gitlab.config.gitlab.host, 'unix', 'host.docker.internal']
)

// SkipRailsAuthorizer implements a fake PreAuthorizer that do not calls rails API and
// authorize each call as a local only upload to TempPath
type SkipRailsAuthorizer struct {
require 'spec_helper'

RSpec.describe Gitlab::Middleware::RailsQueueDuration do
  let(:app) { double(:app) }
  let(:middleware) { described_class.new(app) }
---

# Rails initializers

By default, Rails loads Zeitwerk after the initializers in `config/initializers` are loaded.
---

# GitLab Rails Console Cheat Sheet **(CORE ONLY)**

This is the GitLab Support Team's collection of information regarding the GitLab Rails
# frozen_string_literal: true

module RailsHelpers
  def stub_rails_env(env_name)
    allow(Rails).to receive(:env).and_return(ActiveSupport::StringInquirer.new(env_name))
# frozen_string_literal: true

if Rails.env.development? && ENV['GITPOD_WORKSPACE_ID'].present?
  gitpod_host = URI(`gp url 3000`.strip).host
  Rails.application.config.hosts += [gitpod_host]
  module Metrics
    module Subscribers
      # Class for tracking the total time spent in Rails cache calls
      # http://guides.rubyonrails.org/active_support_instrumentation.html
      class RailsCache < ActiveSupport::Subscriber
config/master.key

# Only include if you have production secrets in this file, which is no longer a Rails default
# config/secrets.yml
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
require 'spec_helper'

RSpec.describe Gitlab::Metrics::Subscribers::RailsCache do
  let(:env) { {} }
  let(:transaction) { Gitlab::Metrics::WebTransaction.new(env) }