diff options
author | Stan Hu <stanhu@gmail.com> | 2018-12-06 09:02:11 +0300 |
---|---|---|
committer | Stan Hu <stanhu@gmail.com> | 2018-12-06 10:19:27 +0300 |
commit | e96fd232a628e9f5f008936b5db645412e33cfef (patch) | |
tree | f3694019bc8487f6e212ce16d42a6066fab03977 | |
parent | fa3528ee5a0cedf10a05035ce5c713c3fea0ec6f (diff) |
Remove unnecessary includes of ShellAdapter
Determined by running the script:
```
included = `git grep --name-only ShellAdapter`.chomp.split("\n")
used = `git grep --name-only gitlab_shell`.chomp.split("\n")
included - used
```
-rw-r--r-- | app/models/concerns/storage/legacy_namespace.rb | 2 | ||||
-rw-r--r-- | app/models/members/project_member.rb | 2 | ||||
-rw-r--r-- | app/models/namespace.rb | 1 | ||||
-rw-r--r-- | app/models/protected_branch.rb | 1 | ||||
-rw-r--r-- | app/models/protected_tag.rb | 1 | ||||
-rw-r--r-- | app/models/repository.rb | 1 | ||||
-rw-r--r-- | app/workers/repository_update_remote_mirror_worker.rb | 1 | ||||
-rw-r--r-- | db/post_migrate/20161221153951_rename_reserved_project_names.rb | 1 | ||||
-rw-r--r-- | db/post_migrate/20170313133418_rename_more_reserved_project_names.rb | 1 | ||||
-rw-r--r-- | lib/gitlab/bitbucket_server_import/importer.rb | 2 | ||||
-rw-r--r-- | lib/gitlab/import_export/repo_restorer.rb | 1 | ||||
-rw-r--r-- | spec/models/members/project_member_spec.rb | 4 |
12 files changed, 2 insertions, 16 deletions
diff --git a/app/models/concerns/storage/legacy_namespace.rb b/app/models/concerns/storage/legacy_namespace.rb index af699eeebce..498996f4f80 100644 --- a/app/models/concerns/storage/legacy_namespace.rb +++ b/app/models/concerns/storage/legacy_namespace.rb @@ -4,6 +4,8 @@ module Storage module LegacyNamespace extend ActiveSupport::Concern + include Gitlab::ShellAdapter + def move_dir proj_with_tags = first_project_with_container_registry_tags diff --git a/app/models/members/project_member.rb b/app/models/members/project_member.rb index 537f2a3a231..016c18ce6c8 100644 --- a/app/models/members/project_member.rb +++ b/app/models/members/project_member.rb @@ -3,8 +3,6 @@ class ProjectMember < Member SOURCE_TYPE = 'Project'.freeze - include Gitlab::ShellAdapter - belongs_to :project, foreign_key: 'source_id' # Make sure project member points only to project as it source diff --git a/app/models/namespace.rb b/app/models/namespace.rb index 8865c164b11..3c9b1d32a53 100644 --- a/app/models/namespace.rb +++ b/app/models/namespace.rb @@ -3,7 +3,6 @@ class Namespace < ActiveRecord::Base include CacheMarkdownField include Sortable - include Gitlab::ShellAdapter include Gitlab::VisibilityLevel include Routable include AfterCommitQueue diff --git a/app/models/protected_branch.rb b/app/models/protected_branch.rb index 6c1073265a1..d075440b147 100644 --- a/app/models/protected_branch.rb +++ b/app/models/protected_branch.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class ProtectedBranch < ActiveRecord::Base - include Gitlab::ShellAdapter include ProtectedRef protected_ref_access_levels :merge, :push diff --git a/app/models/protected_tag.rb b/app/models/protected_tag.rb index 94746141945..d28ebabfe49 100644 --- a/app/models/protected_tag.rb +++ b/app/models/protected_tag.rb @@ -1,7 +1,6 @@ # frozen_string_literal: true class ProtectedTag < ActiveRecord::Base - include Gitlab::ShellAdapter include ProtectedRef validates :name, uniqueness: { scope: :project_id } diff --git a/app/models/repository.rb b/app/models/repository.rb index 35dd120856d..015a179f374 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -17,7 +17,6 @@ class Repository #{REF_ENVIRONMENTS} ].freeze - include Gitlab::ShellAdapter include Gitlab::RepositoryCacheAdapter attr_accessor :full_path, :disk_path, :project, :is_wiki diff --git a/app/workers/repository_update_remote_mirror_worker.rb b/app/workers/repository_update_remote_mirror_worker.rb index 9d4e67deb9c..bd429d526bf 100644 --- a/app/workers/repository_update_remote_mirror_worker.rb +++ b/app/workers/repository_update_remote_mirror_worker.rb @@ -5,7 +5,6 @@ class RepositoryUpdateRemoteMirrorWorker UpdateError = Class.new(StandardError) include ApplicationWorker - include Gitlab::ShellAdapter sidekiq_options retry: 3, dead: false diff --git a/db/post_migrate/20161221153951_rename_reserved_project_names.rb b/db/post_migrate/20161221153951_rename_reserved_project_names.rb index b7665e98490..50e1c8449ba 100644 --- a/db/post_migrate/20161221153951_rename_reserved_project_names.rb +++ b/db/post_migrate/20161221153951_rename_reserved_project_names.rb @@ -1,6 +1,5 @@ class RenameReservedProjectNames < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers - include Gitlab::ShellAdapter DOWNTIME = false diff --git a/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb b/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb index cac3fd713eb..bef669b459d 100644 --- a/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb +++ b/db/post_migrate/20170313133418_rename_more_reserved_project_names.rb @@ -1,6 +1,5 @@ class RenameMoreReservedProjectNames < ActiveRecord::Migration[4.2] include Gitlab::Database::MigrationHelpers - include Gitlab::ShellAdapter DOWNTIME = false diff --git a/lib/gitlab/bitbucket_server_import/importer.rb b/lib/gitlab/bitbucket_server_import/importer.rb index d4080536d81..28cfb46e2d4 100644 --- a/lib/gitlab/bitbucket_server_import/importer.rb +++ b/lib/gitlab/bitbucket_server_import/importer.rb @@ -3,8 +3,6 @@ module Gitlab module BitbucketServerImport class Importer - include Gitlab::ShellAdapter - attr_reader :recover_missing_commits attr_reader :project, :project_key, :repository_slug, :client, :errors, :users attr_accessor :logger diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb index 921a06b4023..91167a9c4fb 100644 --- a/lib/gitlab/import_export/repo_restorer.rb +++ b/lib/gitlab/import_export/repo_restorer.rb @@ -4,7 +4,6 @@ module Gitlab module ImportExport class RepoRestorer include Gitlab::ImportExport::CommandLineUtil - include Gitlab::ShellAdapter def initialize(project:, shared:, path_to_bundle:) @project = project diff --git a/spec/models/members/project_member_spec.rb b/spec/models/members/project_member_spec.rb index 334d4f95f53..fb4fdb49683 100644 --- a/spec/models/members/project_member_spec.rb +++ b/spec/models/members/project_member_spec.rb @@ -11,10 +11,6 @@ describe ProjectMember do it { is_expected.to validate_inclusion_of(:access_level).in_array(Gitlab::Access.values) } end - describe 'modules' do - it { is_expected.to include_module(Gitlab::ShellAdapter) } - end - describe '.access_level_roles' do it 'returns Gitlab::Access.options' do expect(described_class.access_level_roles).to eq(Gitlab::Access.options) |