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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
f35573f1
Commit
f35573f1
authored
Apr 19, 2017
by
Douglas Barbosa Alexandre
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Extract common attributes to Github::Representation::Base
parent
a32adb82
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
52 deletions
+12
-52
lib/github/representation/base.rb
lib/github/representation/base.rb
+12
-0
lib/github/representation/comment.rb
lib/github/representation/comment.rb
+0
-12
lib/github/representation/issue.rb
lib/github/representation/issue.rb
+0
-12
lib/github/representation/label.rb
lib/github/representation/label.rb
+0
-4
lib/github/representation/milestone.rb
lib/github/representation/milestone.rb
+0
-12
lib/github/representation/pull_request.rb
lib/github/representation/pull_request.rb
+0
-12
No files found.
lib/github/representation/base.rb
View file @
f35573f1
...
@@ -5,6 +5,18 @@ module Github
...
@@ -5,6 +5,18 @@ module Github
@raw
=
raw
@raw
=
raw
end
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
private
private
attr_reader
:raw
attr_reader
:raw
...
...
lib/github/representation/comment.rb
View file @
f35573f1
...
@@ -24,18 +24,6 @@ module Github
...
@@ -24,18 +24,6 @@ module Github
'LegacyDiffNote'
if
on_diff?
'LegacyDiffNote'
if
on_diff?
end
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
private
private
def
generate_line_code
(
line
)
def
generate_line_code
(
line
)
...
...
lib/github/representation/issue.rb
View file @
f35573f1
...
@@ -37,18 +37,6 @@ module Github
...
@@ -37,18 +37,6 @@ module Github
raw
[
'state'
]
==
'closed'
?
'closed'
:
'opened'
raw
[
'state'
]
==
'closed'
?
'closed'
:
'opened'
end
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
def
assigned?
def
assigned?
raw
[
'assignee'
].
present?
raw
[
'assignee'
].
present?
end
end
...
...
lib/github/representation/label.rb
View file @
f35573f1
...
@@ -8,10 +8,6 @@ module Github
...
@@ -8,10 +8,6 @@ module Github
def
title
def
title
raw
[
'name'
]
raw
[
'name'
]
end
end
def
url
raw
[
'url'
]
end
end
end
end
end
end
end
lib/github/representation/milestone.rb
View file @
f35573f1
...
@@ -20,18 +20,6 @@ module Github
...
@@ -20,18 +20,6 @@ module Github
def
state
def
state
raw
[
'state'
]
==
'closed'
?
'closed'
:
'active'
raw
[
'state'
]
==
'closed'
?
'closed'
:
'active'
end
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
end
end
end
end
end
end
lib/github/representation/pull_request.rb
View file @
f35573f1
...
@@ -71,18 +71,6 @@ module Github
...
@@ -71,18 +71,6 @@ module Github
'opened'
'opened'
end
end
def
url
raw
[
'url'
]
end
def
created_at
raw
[
'created_at'
]
end
def
updated_at
raw
[
'updated_at'
]
end
def
assigned?
def
assigned?
raw
[
'assignee'
].
present?
raw
[
'assignee'
].
present?
end
end
...
...
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