Skip to content
Snippets Groups Projects
Commit a387ecca authored by Sincheol (David) Kim's avatar Sincheol (David) Kim
Browse files

Merge branch 'pl-feature-module' into 'master'

Make Feature a module to indicate it's a namespace

See merge request !91312
parents 8f70e317 1a555d33
No related branches found
No related tags found
1 merge request!91312Make Feature a module to indicate it's a namespace
Pipeline #576570346 passed with warnings
Pipeline: GitLab

#576577463

    ......@@ -1105,11 +1105,6 @@ Gitlab/NamespacedClass:
    - 'lib/carrier_wave_string_file.rb'
    - 'lib/csv_builder.rb'
    - 'lib/event_filter.rb'
    - 'lib/feature.rb'
    - 'lib/feature/definition.rb'
    - 'lib/feature/gitaly.rb'
    - 'lib/feature/logger.rb'
    - 'lib/feature/shared.rb'
    - 'lib/file_size_validator.rb'
    - 'lib/forever.rb'
    - 'lib/generators/gitlab/snowplow_event_definition_generator.rb'
    ......
    ......@@ -3,7 +3,7 @@
    require 'flipper/adapters/active_record'
    require 'flipper/adapters/active_support_cache_store'
    class Feature
    module Feature
    # Classes to override flipper table names
    class FlipperFeature < Flipper::Adapters::ActiveRecord::Feature
    include DatabaseReflection
    ......
    # frozen_string_literal: true
    class Feature
    module Feature
    class Definition
    include ::Feature::Shared
    ......
    # frozen_string_literal: true
    class Feature
    module Feature
    class Gitaly
    PREFIX = "gitaly_"
    ......
    # frozen_string_literal: true
    class Feature
    module Feature
    class Logger < ::Gitlab::JsonLogger
    def self.file_name_noext
    'features_json'
    ......
    ......@@ -4,7 +4,7 @@
    # 1. `Pure Ruby`: `bin/feature-flag`
    # 2. `GitLab Rails`: `lib/feature/definition.rb`
    class Feature
    module Feature
    module Shared
    # optional: defines if a on-disk definition is required for this feature flag type
    # rollout_issue: defines if `bin/feature-flag` asks for rollout issue
    ......
    ......@@ -15,10 +15,8 @@ namespace :gitlab do
    # Also avoids pipeline failures in case developer
    # dumps schema with flags disabled locally before pushing
    task enable_feature_flags: :environment do
    class Feature
    def self.enabled?(*args)
    true
    end
    def Feature.enabled?(*args)
    true
    end
    end
    ......
    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