Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
27f519a2
Commit
27f519a2
authored
Apr 17, 2017
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removes `Repository#version` method and tests
Signed-off-by:
Dmitriy Zaporozhets
<
dmitriy.zaporozhets@gmail.com
>
parent
eeaeb275
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
14 deletions
+5
-14
app/models/repository.rb
app/models/repository.rb
+1
-7
changelogs/unreleased/dz-remove-repo-version.yml
changelogs/unreleased/dz-remove-repo-version.yml
+4
-0
features/steps/project/project.rb
features/steps/project/project.rb
+0
-6
spec/models/repository_spec.rb
spec/models/repository_spec.rb
+0
-1
No files found.
app/models/repository.rb
View file @
27f519a2
...
@@ -19,7 +19,7 @@ class Repository
...
@@ -19,7 +19,7 @@ class Repository
#
#
# For example, for entry `:readme` there's a method called `readme` which
# For example, for entry `:readme` there's a method called `readme` which
# stores its data in the `readme` cache key.
# 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
changelog license_blob license_key gitignore koding_yml
gitlab_ci_yml branch_names tag_names branch_count
gitlab_ci_yml branch_names tag_names branch_count
tag_count avatar exists? empty? root_ref)
.
freeze
tag_count avatar exists? empty? root_ref)
.
freeze
...
@@ -32,7 +32,6 @@ class Repository
...
@@ -32,7 +32,6 @@ class Repository
changelog: :changelog
,
changelog: :changelog
,
license:
%i(license_blob license_key)
,
license:
%i(license_blob license_key)
,
contributing: :contribution_guide
,
contributing: :contribution_guide
,
version: :version
,
gitignore: :gitignore
,
gitignore: :gitignore
,
koding: :koding_yml
,
koding: :koding_yml
,
gitlab_ci: :gitlab_ci_yml
,
gitlab_ci: :gitlab_ci_yml
,
...
@@ -530,11 +529,6 @@ class Repository
...
@@ -530,11 +529,6 @@ class Repository
end
end
cache_method
:readme
cache_method
:readme
def
version
file_on_head
(
:version
)
end
cache_method
:version
def
contribution_guide
def
contribution_guide
file_on_head
(
:contributing
)
file_on_head
(
:contributing
)
end
end
...
...
changelogs/unreleased/dz-remove-repo-version.yml
0 → 100644
View file @
27f519a2
---
title
:
Remove Repository#version method and tests
merge_request
:
10734
author
:
features/steps/project/project.rb
View file @
27f519a2
...
@@ -66,12 +66,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps
...
@@ -66,12 +66,6 @@ class Spinach::Features::Project < Spinach::FeatureSteps
expect
(
page
).
not_to
have_link
(
'Remove avatar'
)
expect
(
page
).
not_to
have_link
(
'Remove avatar'
)
end
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
step
'change project default branch'
do
select
'fix'
,
from:
'project_default_branch'
select
'fix'
,
from:
'project_default_branch'
click_button
'Save changes'
click_button
'Save changes'
...
...
spec/models/repository_spec.rb
View file @
27f519a2
...
@@ -1259,7 +1259,6 @@ describe Repository, models: true do
...
@@ -1259,7 +1259,6 @@ describe Repository, models: true do
:changelog
,
:changelog
,
:license
,
:license
,
:contributing
,
:contributing
,
:version
,
:gitignore
,
:gitignore
,
:koding
,
:koding
,
:gitlab_ci
,
:gitlab_ci
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment