diff --git a/app/models/repository.rb b/app/models/repository.rb index 2b11ed6128e..1d6acbda235 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -19,7 +19,7 @@ class Repository # # For example, for entry `:readme` there's a method called `readme` which # stores its data in the `readme` cache key. - CACHED_METHODS = %i(size commit_count readme version contribution_guide + CACHED_METHODS = %i(size commit_count readme contribution_guide changelog license_blob license_key gitignore koding_yml gitlab_ci_yml branch_names tag_names branch_count tag_count avatar exists? empty? root_ref).freeze @@ -32,7 +32,6 @@ class Repository changelog: :changelog, license: %i(license_blob license_key), contributing: :contribution_guide, - version: :version, gitignore: :gitignore, koding: :koding_yml, gitlab_ci: :gitlab_ci_yml, @@ -530,11 +529,6 @@ class Repository end cache_method :readme - def version - file_on_head(:version) - end - cache_method :version - def contribution_guide file_on_head(:contributing) end diff --git a/changelogs/unreleased/dz-remove-repo-version.yml b/changelogs/unreleased/dz-remove-repo-version.yml new file mode 100644 index 00000000000..f9e51a920f9 --- /dev/null +++ b/changelogs/unreleased/dz-remove-repo-version.yml @@ -0,0 +1,4 @@ +--- +title: Remove Repository#version method and tests +merge_request: 10734 +author: diff --git a/features/steps/project/project.rb b/features/steps/project/project.rb index 975c879149e..280d70925f7 100644 --- a/features/steps/project/project.rb +++ b/features/steps/project/project.rb @@ -66,12 +66,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps expect(page).not_to have_link('Remove avatar') end - step 'I should see project "Shop" version' do - page.within '.project-side' do - expect(page).to have_content '6.7.0.pre' - end - end - step 'change project default branch' do select 'fix', from: 'project_default_branch' click_button 'Save changes' diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 5e5c2b016b6..5f8337220df 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -1259,7 +1259,6 @@ describe Repository, models: true do :changelog, :license, :contributing, - :version, :gitignore, :koding, :gitlab_ci,