<NME> omniauth.rb
<BEF> raise "Provide ENV['GITHUB_KEY'] and ENV['GITHUB_SECRET']" unless Rails.env.test? || (ENV['GITHUB_KEY'] && ENV['GITHUB_SECRET'])

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :developer unless Rails.env.production?
    end
  end
end

if Rails.env.development?
  missing = %w(GITHUB_KEY GITHUB_SECRET GITHUB_LIMITED_KEY GITHUB_LIMITED_SECRET).select do |key|
    ENV[key].blank?
  end
  raise "Provide #{missing.to_sentence}" if missing.any?
end

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :developer unless Rails.env.production?
  provider :github, ENV['GITHUB_KEY'], ENV['GITHUB_SECRET'], scope: "user:email,repo:status,admin:repo_hook,admin:org_hook,read:org"
  provider :github_limited, ENV['GITHUB_LIMITED_KEY'], ENV['GITHUB_LIMITED_SECRET'], scope: "(no scope)"
end

<MSG> Go easy on the envs, heroku prep steps lack ENV vars

<DFF> @@ -1,4 +1,8 @@
-raise "Provide ENV['GITHUB_KEY'] and ENV['GITHUB_SECRET']" unless Rails.env.test? || (ENV['GITHUB_KEY'] && ENV['GITHUB_SECRET'])
+if Rails.env.development?
+  if ENV['GITHUB_KEY'].blank? || ENV['GITHUB_SECRET'].blank?
+    raise "Provide ENV['GITHUB_KEY'] and ENV['GITHUB_SECRET']"
+  end
+end
 
 Rails.application.config.middleware.use OmniAuth::Builder do
   provider :developer unless Rails.env.production?

Go easy on the envs, heroku prep steps lack ENV vars