Skip to content
This repository has been archived by the owner on Nov 1, 2017. It is now read-only.

Commit

Permalink
Rename the USERS to the right user
Browse files Browse the repository at this point in the history
This introduces new constants, so that they can be used in other
places as well.
This makes the data a little more realistic.
  • Loading branch information
Shredder121 committed Jun 16, 2016
1 parent 1ee6be9 commit aae43ca
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/responses/issues_and_prs.rb
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ module Responses
ISSUE_WITH_ASSIGNEES ||= ISSUE.merge({
"assignees" => [
USER,
USER.merge("login" => "hubot"),
USER.merge("login" => "other_user")
HUBOT,
OTHER_USER
]
})

Expand Down
40 changes: 40 additions & 0 deletions lib/responses/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,46 @@ module Responses
"site_admin" => false
}

HUBOT ||= {
"login" => "hubot",
"id" => 1,
"avatar_url" => "https://github.com/images/error/hubot_happy.gif",
"gravatar_id" => "",
"url" => "https://api.github.com/users/hubot",
"html_url" => "https://github.com/hubot",
"followers_url" => "https://api.github.com/users/hubot/followers",
"following_url" => "https://api.github.com/users/hubot/following{/other_user}",
"gists_url" => "https://api.github.com/users/hubot/gists{/gist_id}",
"starred_url" => "https://api.github.com/users/hubot/starred{/owner}{/repo}",
"subscriptions_url" => "https://api.github.com/users/hubot/subscriptions",
"organizations_url" => "https://api.github.com/users/hubot/orgs",
"repos_url" => "https://api.github.com/users/hubot/repos",
"events_url" => "https://api.github.com/users/hubot/events{/privacy}",
"received_events_url" => "https://api.github.com/users/hubot/received_events",
"type" => "User",
"site_admin" => true
}

OTHER_USER ||= {
"login" => "other_user",
"id" => 1,
"avatar_url" => "https://github.com/images/error/other_user_happy.gif",
"gravatar_id" => "",
"url" => "https://api.github.com/users/other_user",
"html_url" => "https://github.com/other_user",
"followers_url" => "https://api.github.com/users/other_user/followers",
"following_url" => "https://api.github.com/users/other_user/following{/other_user}",
"gists_url" => "https://api.github.com/users/other_user/gists{/gist_id}",
"starred_url" => "https://api.github.com/users/other_user/starred{/owner}{/repo}",
"subscriptions_url" => "https://api.github.com/users/other_user/subscriptions",
"organizations_url" => "https://api.github.com/users/other_user/orgs",
"repos_url" => "https://api.github.com/users/other_user/repos",
"events_url" => "https://api.github.com/users/other_user/events{/privacy}",
"received_events_url" => "https://api.github.com/users/other_user/received_events",
"type" => "User",
"site_admin" => false
}

CONTRIBUTOR ||= USER.merge({
"contributions" => 32
})
Expand Down

0 comments on commit aae43ca

Please sign in to comment.