lib/omniauth/strategies/osm.rb in omniauth-osm-0.3.0 vs lib/omniauth/strategies/osm.rb in omniauth-osm-0.3.1

- old
+ new

@@ -4,10 +4,18 @@ module OmniAuth module Strategies class Osm < OmniAuth::Strategies::OAuth option :name, "osm" - option :client_options, :site => 'http://www.openstreetmap.org' + def self.site + if ENV['OSM_AUTH_SITE'] + ENV['OSM_AUTH_SITE'] + else + "http://www.openstreetmap.org" + end + end + + option :client_options, :site => site option :fetch_permissions, false uid { raw_info['id'] } info do