{"action":"created","issue":{"url":"https://api.github.com/repos/jneen/rouge/issues/296","labels_url":"https://api.github.com/repos/jneen/rouge/issues/296/labels{/name}","comments_url":"https://api.github.com/repos/jneen/rouge/issues/296/comments","events_url":"https://api.github.com/repos/jneen/rouge/issues/296/events","html_url":"https://github.com/jneen/rouge/issues/296","id":98109775,"number":296,"title":"Already initialized constant Rouge::Lexers:Shell::KEYWORDS","user":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-30T08:17:04Z","updated_at":"2015-07-31T07:26:09Z","closed_at":null,"body":"Now that GitLab is using Rouge, it appears that Rouge is loading files automatically, causing Rails to warn with errors:\r\n\r\n```\r\n/Users/stanhu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:20: warning: already initialized constant Rouge::Lexers::Shell::KEYWORDS\r\n/Users/stanhu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:20: warning: previous definition of KEYWORDS was here\r\n/Users/stanhu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:25: warning: already initialized constant Rouge::Lexers::Shell::BUILTINS\r\n/Users/stanhu/.rbenv/versions/2.1.6/lib/ruby/gems/2.1.0/gems/rouge-1.9.1/lib/rouge/lexers/shell.rb:25: warning: previous definition of BUILTINS was here\r\n```\r\n\r\nThese loads happen twice:\r\n\r\n1. https://github.com/jneen/rouge/blob/master/lib/rouge/lexers/powershell.rb#L5 \r\n1. https://github.com/jneen/rouge/blob/master/lib/rouge.rb#L43\r\n\r\nRemoving these lines seems to make the warnings go away. Is it possible to remove these automatic loads?\r\n"},"comment":{"url":"https://api.github.com/repos/jneen/rouge/issues/comments/126591866","html_url":"https://github.com/jneen/rouge/issues/296#issuecomment-126591866","issue_url":"https://api.github.com/repos/jneen/rouge/issues/296","id":126591866,"user":{"login":"stanhu","id":963826,"avatar_url":"https://avatars.githubusercontent.com/u/963826?v=3","gravatar_id":"","url":"https://api.github.com/users/stanhu","html_url":"https://github.com/stanhu","followers_url":"https://api.github.com/users/stanhu/followers","following_url":"https://api.github.com/users/stanhu/following{/other_user}","gists_url":"https://api.github.com/users/stanhu/gists{/gist_id}","starred_url":"https://api.github.com/users/stanhu/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stanhu/subscriptions","organizations_url":"https://api.github.com/users/stanhu/orgs","repos_url":"https://api.github.com/users/stanhu/repos","events_url":"https://api.github.com/users/stanhu/events{/privacy}","received_events_url":"https://api.github.com/users/stanhu/received_events","type":"User","site_admin":false},"created_at":"2015-07-31T07:26:09Z","updated_at":"2015-07-31T07:26:09Z","body":"@rumpelsepp Thanks. Took your work and made it work for the specs and `rackup` application in #298.\r\n"}}