{"action":"closed","number":20,"pull_request":{"url":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/20","id":45824427,"html_url":"https://github.com/twe4ked/rspec-nc/pull/20","diff_url":"https://github.com/twe4ked/rspec-nc/pull/20.diff","patch_url":"https://github.com/twe4ked/rspec-nc/pull/20.patch","issue_url":"https://api.github.com/repos/twe4ked/rspec-nc/issues/20","number":20,"state":"closed","locked":false,"title":"Prevent unnecessary require when the constant is already defined","user":{"login":"marceloboeira","id":1898225,"avatar_url":"https://avatars.githubusercontent.com/u/1898225?v=3","gravatar_id":"","url":"https://api.github.com/users/marceloboeira","html_url":"https://github.com/marceloboeira","followers_url":"https://api.github.com/users/marceloboeira/followers","following_url":"https://api.github.com/users/marceloboeira/following{/other_user}","gists_url":"https://api.github.com/users/marceloboeira/gists{/gist_id}","starred_url":"https://api.github.com/users/marceloboeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marceloboeira/subscriptions","organizations_url":"https://api.github.com/users/marceloboeira/orgs","repos_url":"https://api.github.com/users/marceloboeira/repos","events_url":"https://api.github.com/users/marceloboeira/events{/privacy}","received_events_url":"https://api.github.com/users/marceloboeira/received_events","type":"User","site_admin":false},"body":"About issue #17\r\n\r\nI was looking at the `lib/nc.rb` file, trying to find the reason for this warnings, when I faced this:\r\n```ruby\r\nelse\r\n  require 'rspec/core/formatters/helpers'\r\n  RSpec::Core::Formatters::Helpers.format_duration duration\r\nend\r\n```\r\nhttps://github.com/twe4ked/rspec-nc/blob/master/lib/nc.rb#L54\r\n\r\n@twe4ked can you explain why you need to require the `Formatters::Helpers` ?\r\n\r\nMy suggestion to avoid the warnings is to check if the constant `RSpec::Core::Formatters::Helpers` is already defined, before requiring it again. Though I believe we could just remove the `require`, because it is already being required by rspec autoload. ","created_at":"2015-09-23T20:03:21Z","updated_at":"2015-09-24T01:52:31Z","closed_at":"2015-09-24T01:52:31Z","merged_at":"2015-09-24T01:52:31Z","merge_commit_sha":"0a069b4480f98a771533291efca7d413e95ea64d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/20/commits","review_comments_url":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/20/comments","review_comment_url":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/comments{/number}","comments_url":"https://api.github.com/repos/twe4ked/rspec-nc/issues/20/comments","statuses_url":"https://api.github.com/repos/twe4ked/rspec-nc/statuses/c1b0c170ddbb6e8b58aaf874e016a91b9bcf9f54","head":{"label":"marceloboeira:master","ref":"master","sha":"c1b0c170ddbb6e8b58aaf874e016a91b9bcf9f54","user":{"login":"marceloboeira","id":1898225,"avatar_url":"https://avatars.githubusercontent.com/u/1898225?v=3","gravatar_id":"","url":"https://api.github.com/users/marceloboeira","html_url":"https://github.com/marceloboeira","followers_url":"https://api.github.com/users/marceloboeira/followers","following_url":"https://api.github.com/users/marceloboeira/following{/other_user}","gists_url":"https://api.github.com/users/marceloboeira/gists{/gist_id}","starred_url":"https://api.github.com/users/marceloboeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marceloboeira/subscriptions","organizations_url":"https://api.github.com/users/marceloboeira/orgs","repos_url":"https://api.github.com/users/marceloboeira/repos","events_url":"https://api.github.com/users/marceloboeira/events{/privacy}","received_events_url":"https://api.github.com/users/marceloboeira/received_events","type":"User","site_admin":false},"repo":{"id":43021297,"name":"rspec-nc","full_name":"marceloboeira/rspec-nc","owner":{"login":"marceloboeira","id":1898225,"avatar_url":"https://avatars.githubusercontent.com/u/1898225?v=3","gravatar_id":"","url":"https://api.github.com/users/marceloboeira","html_url":"https://github.com/marceloboeira","followers_url":"https://api.github.com/users/marceloboeira/followers","following_url":"https://api.github.com/users/marceloboeira/following{/other_user}","gists_url":"https://api.github.com/users/marceloboeira/gists{/gist_id}","starred_url":"https://api.github.com/users/marceloboeira/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marceloboeira/subscriptions","organizations_url":"https://api.github.com/users/marceloboeira/orgs","repos_url":"https://api.github.com/users/marceloboeira/repos","events_url":"https://api.github.com/users/marceloboeira/events{/privacy}","received_events_url":"https://api.github.com/users/marceloboeira/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/marceloboeira/rspec-nc","description":"RSpec formatter for Mountain Lion's Notification Center","fork":true,"url":"https://api.github.com/repos/marceloboeira/rspec-nc","forks_url":"https://api.github.com/repos/marceloboeira/rspec-nc/forks","keys_url":"https://api.github.com/repos/marceloboeira/rspec-nc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/marceloboeira/rspec-nc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/marceloboeira/rspec-nc/teams","hooks_url":"https://api.github.com/repos/marceloboeira/rspec-nc/hooks","issue_events_url":"https://api.github.com/repos/marceloboeira/rspec-nc/issues/events{/number}","events_url":"https://api.github.com/repos/marceloboeira/rspec-nc/events","assignees_url":"https://api.github.com/repos/marceloboeira/rspec-nc/assignees{/user}","branches_url":"https://api.github.com/repos/marceloboeira/rspec-nc/branches{/branch}","tags_url":"https://api.github.com/repos/marceloboeira/rspec-nc/tags","blobs_url":"https://api.github.com/repos/marceloboeira/rspec-nc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/marceloboeira/rspec-nc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/marceloboeira/rspec-nc/git/refs{/sha}","trees_url":"https://api.github.com/repos/marceloboeira/rspec-nc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/marceloboeira/rspec-nc/statuses/{sha}","languages_url":"https://api.github.com/repos/marceloboeira/rspec-nc/languages","stargazers_url":"https://api.github.com/repos/marceloboeira/rspec-nc/stargazers","contributors_url":"https://api.github.com/repos/marceloboeira/rspec-nc/contributors","subscribers_url":"https://api.github.com/repos/marceloboeira/rspec-nc/subscribers","subscription_url":"https://api.github.com/repos/marceloboeira/rspec-nc/subscription","commits_url":"https://api.github.com/repos/marceloboeira/rspec-nc/commits{/sha}","git_commits_url":"https://api.github.com/repos/marceloboeira/rspec-nc/git/commits{/sha}","comments_url":"https://api.github.com/repos/marceloboeira/rspec-nc/comments{/number}","issue_comment_url":"https://api.github.com/repos/marceloboeira/rspec-nc/issues/comments{/number}","contents_url":"https://api.github.com/repos/marceloboeira/rspec-nc/contents/{+path}","compare_url":"https://api.github.com/repos/marceloboeira/rspec-nc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/marceloboeira/rspec-nc/merges","archive_url":"https://api.github.com/repos/marceloboeira/rspec-nc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/marceloboeira/rspec-nc/downloads","issues_url":"https://api.github.com/repos/marceloboeira/rspec-nc/issues{/number}","pulls_url":"https://api.github.com/repos/marceloboeira/rspec-nc/pulls{/number}","milestones_url":"https://api.github.com/repos/marceloboeira/rspec-nc/milestones{/number}","notifications_url":"https://api.github.com/repos/marceloboeira/rspec-nc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/marceloboeira/rspec-nc/labels{/name}","releases_url":"https://api.github.com/repos/marceloboeira/rspec-nc/releases{/id}","created_at":"2015-09-23T19:10:55Z","updated_at":"2015-09-23T19:10:55Z","pushed_at":"2015-09-23T20:24:16Z","git_url":"git://github.com/marceloboeira/rspec-nc.git","ssh_url":"git@github.com:marceloboeira/rspec-nc.git","clone_url":"https://github.com/marceloboeira/rspec-nc.git","svn_url":"https://github.com/marceloboeira/rspec-nc","homepage":"https://rubygems.org/gems/rspec-nc","size":258,"stargazers_count":0,"watchers_count":0,"language":"Ruby","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"twe4ked:master","ref":"master","sha":"456ba012e9c45399b23596572386fb0a6c61bfb7","user":{"login":"twe4ked","id":71970,"avatar_url":"https://avatars.githubusercontent.com/u/71970?v=3","gravatar_id":"","url":"https://api.github.com/users/twe4ked","html_url":"https://github.com/twe4ked","followers_url":"https://api.github.com/users/twe4ked/followers","following_url":"https://api.github.com/users/twe4ked/following{/other_user}","gists_url":"https://api.github.com/users/twe4ked/gists{/gist_id}","starred_url":"https://api.github.com/users/twe4ked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twe4ked/subscriptions","organizations_url":"https://api.github.com/users/twe4ked/orgs","repos_url":"https://api.github.com/users/twe4ked/repos","events_url":"https://api.github.com/users/twe4ked/events{/privacy}","received_events_url":"https://api.github.com/users/twe4ked/received_events","type":"User","site_admin":false},"repo":{"id":5451248,"name":"rspec-nc","full_name":"twe4ked/rspec-nc","owner":{"login":"twe4ked","id":71970,"avatar_url":"https://avatars.githubusercontent.com/u/71970?v=3","gravatar_id":"","url":"https://api.github.com/users/twe4ked","html_url":"https://github.com/twe4ked","followers_url":"https://api.github.com/users/twe4ked/followers","following_url":"https://api.github.com/users/twe4ked/following{/other_user}","gists_url":"https://api.github.com/users/twe4ked/gists{/gist_id}","starred_url":"https://api.github.com/users/twe4ked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twe4ked/subscriptions","organizations_url":"https://api.github.com/users/twe4ked/orgs","repos_url":"https://api.github.com/users/twe4ked/repos","events_url":"https://api.github.com/users/twe4ked/events{/privacy}","received_events_url":"https://api.github.com/users/twe4ked/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/twe4ked/rspec-nc","description":"RSpec formatter for Mountain Lion's Notification Center","fork":false,"url":"https://api.github.com/repos/twe4ked/rspec-nc","forks_url":"https://api.github.com/repos/twe4ked/rspec-nc/forks","keys_url":"https://api.github.com/repos/twe4ked/rspec-nc/keys{/key_id}","collaborators_url":"https://api.github.com/repos/twe4ked/rspec-nc/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/twe4ked/rspec-nc/teams","hooks_url":"https://api.github.com/repos/twe4ked/rspec-nc/hooks","issue_events_url":"https://api.github.com/repos/twe4ked/rspec-nc/issues/events{/number}","events_url":"https://api.github.com/repos/twe4ked/rspec-nc/events","assignees_url":"https://api.github.com/repos/twe4ked/rspec-nc/assignees{/user}","branches_url":"https://api.github.com/repos/twe4ked/rspec-nc/branches{/branch}","tags_url":"https://api.github.com/repos/twe4ked/rspec-nc/tags","blobs_url":"https://api.github.com/repos/twe4ked/rspec-nc/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/twe4ked/rspec-nc/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/twe4ked/rspec-nc/git/refs{/sha}","trees_url":"https://api.github.com/repos/twe4ked/rspec-nc/git/trees{/sha}","statuses_url":"https://api.github.com/repos/twe4ked/rspec-nc/statuses/{sha}","languages_url":"https://api.github.com/repos/twe4ked/rspec-nc/languages","stargazers_url":"https://api.github.com/repos/twe4ked/rspec-nc/stargazers","contributors_url":"https://api.github.com/repos/twe4ked/rspec-nc/contributors","subscribers_url":"https://api.github.com/repos/twe4ked/rspec-nc/subscribers","subscription_url":"https://api.github.com/repos/twe4ked/rspec-nc/subscription","commits_url":"https://api.github.com/repos/twe4ked/rspec-nc/commits{/sha}","git_commits_url":"https://api.github.com/repos/twe4ked/rspec-nc/git/commits{/sha}","comments_url":"https://api.github.com/repos/twe4ked/rspec-nc/comments{/number}","issue_comment_url":"https://api.github.com/repos/twe4ked/rspec-nc/issues/comments{/number}","contents_url":"https://api.github.com/repos/twe4ked/rspec-nc/contents/{+path}","compare_url":"https://api.github.com/repos/twe4ked/rspec-nc/compare/{base}...{head}","merges_url":"https://api.github.com/repos/twe4ked/rspec-nc/merges","archive_url":"https://api.github.com/repos/twe4ked/rspec-nc/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/twe4ked/rspec-nc/downloads","issues_url":"https://api.github.com/repos/twe4ked/rspec-nc/issues{/number}","pulls_url":"https://api.github.com/repos/twe4ked/rspec-nc/pulls{/number}","milestones_url":"https://api.github.com/repos/twe4ked/rspec-nc/milestones{/number}","notifications_url":"https://api.github.com/repos/twe4ked/rspec-nc/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/twe4ked/rspec-nc/labels{/name}","releases_url":"https://api.github.com/repos/twe4ked/rspec-nc/releases{/id}","created_at":"2012-08-17T11:09:27Z","updated_at":"2015-09-07T10:45:57Z","pushed_at":"2015-09-24T01:52:31Z","git_url":"git://github.com/twe4ked/rspec-nc.git","ssh_url":"git@github.com:twe4ked/rspec-nc.git","clone_url":"https://github.com/twe4ked/rspec-nc.git","svn_url":"https://github.com/twe4ked/rspec-nc","homepage":"https://rubygems.org/gems/rspec-nc","size":419,"stargazers_count":198,"watchers_count":198,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":23,"mirror_url":null,"open_issues_count":3,"forks":23,"open_issues":3,"watchers":198,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/20"},"html":{"href":"https://github.com/twe4ked/rspec-nc/pull/20"},"issue":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/issues/20"},"comments":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/issues/20/comments"},"review_comments":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/20/comments"},"review_comment":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/pulls/20/commits"},"statuses":{"href":"https://api.github.com/repos/twe4ked/rspec-nc/statuses/c1b0c170ddbb6e8b58aaf874e016a91b9bcf9f54"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"twe4ked","id":71970,"avatar_url":"https://avatars.githubusercontent.com/u/71970?v=3","gravatar_id":"","url":"https://api.github.com/users/twe4ked","html_url":"https://github.com/twe4ked","followers_url":"https://api.github.com/users/twe4ked/followers","following_url":"https://api.github.com/users/twe4ked/following{/other_user}","gists_url":"https://api.github.com/users/twe4ked/gists{/gist_id}","starred_url":"https://api.github.com/users/twe4ked/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/twe4ked/subscriptions","organizations_url":"https://api.github.com/users/twe4ked/orgs","repos_url":"https://api.github.com/users/twe4ked/repos","events_url":"https://api.github.com/users/twe4ked/events{/privacy}","received_events_url":"https://api.github.com/users/twe4ked/received_events","type":"User","site_admin":false},"comments":1,"review_comments":0,"commits":1,"additions":1,"deletions":1,"changed_files":1}}