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
Léo-Paul Géneau
gitlab-ce
Commits
32a70410
Commit
32a70410
authored
Feb 22, 2017
by
Douwe Maan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ActiveSupport delegation is preferred over Forwardable
parent
56c5b211
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
app/models/concerns/cache_markdown_field.rb
app/models/concerns/cache_markdown_field.rb
+5
-4
lib/gitlab/git/repository.rb
lib/gitlab/git/repository.rb
+0
-2
No files found.
app/models/concerns/cache_markdown_field.rb
View file @
32a70410
...
...
@@ -11,14 +11,15 @@ module CacheMarkdownField
# Knows about the relationship between markdown and html field names, and
# stores the rendering contexts for the latter
class
FieldData
extend
Forwardable
def
initialize
@data
=
{}
end
def_delegators
:@data
,
:[]
,
:[]=
def_delegator
:@data
,
:keys
,
:markdown_fields
delegate
:[]
,
:[]=
,
to: :@data
def
markdown_fields
@data
.
keys
end
def
html_field
(
markdown_field
)
"
#{
markdown_field
}
_html"
...
...
lib/gitlab/git/repository.rb
View file @
32a70410
# Gitlab::Git::Repository is a wrapper around native Rugged::Repository object
require
'forwardable'
require
'tempfile'
require
'forwardable'
require
"rubygems/package"
...
...
@@ -7,7 +6,6 @@ require "rubygems/package"
module
Gitlab
module
Git
class
Repository
extend
Forwardable
include
Gitlab
::
Git
::
Popen
SEARCH_CONTEXT_LINES
=
3
...
...
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