diff --git a/oa-core/lib/omniauth/version.rb b/oa-core/lib/omniauth/version.rb index bc446ae..9f200ad 100644 --- a/oa-core/lib/omniauth/version.rb +++ b/oa-core/lib/omniauth/version.rb @@ -10,7 +10,7 @@ module OmniAuth PATCH = 6 end unless defined?(::OmniAuth::Version::PRE) - PRE = "2.copious" + PRE = "3.copious" end unless defined?(::OmniAuth::Version::STRING) STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.') diff --git a/oa-oauth/lib/omniauth/strategies/etsy.rb b/oa-oauth/lib/omniauth/strategies/etsy.rb index e29fc63..cf29c19 100644 --- a/oa-oauth/lib/omniauth/strategies/etsy.rb +++ b/oa-oauth/lib/omniauth/strategies/etsy.rb @@ -11,7 +11,6 @@ module OmniAuth # Set the environment, accepts either :sandbox or :production. Defaults to :production # and will raise an exception when set to an unrecognized environment. - # def self.environment=(environment) unless [:sandbox, :production].include?(environment) raise(ArgumentError, "environment must be set to either :sandbox or :production") @@ -22,7 +21,7 @@ module OmniAuth # The currently configured environment. def self.environment - @environment || :sandbox + @environment || :production end def self.host # :nodoc: @@ -34,8 +33,10 @@ module OmniAuth end def initialize(app, consumer_key=nil, consumer_secret=nil, options={}, &block) + # Set environment first; this can update our host + OmniAuth::Strategies::Etsy.environment=options[:environment] if options[:environment] client_options = { - :site => "http://#{Etsy.host}", + :site => "http://#{OmniAuth::Strategies::Etsy.host}", :request_token_path => request_token_path(options), :access_token_path => access_token_path, :http_method => :get, diff --git a/oa-oauth/lib/omniauth/version.rb b/oa-oauth/lib/omniauth/version.rb index bc446ae..9f200ad 100644 --- a/oa-oauth/lib/omniauth/version.rb +++ b/oa-oauth/lib/omniauth/version.rb @@ -10,7 +10,7 @@ module OmniAuth PATCH = 6 end unless defined?(::OmniAuth::Version::PRE) - PRE = "2.copious" + PRE = "3.copious" end unless defined?(::OmniAuth::Version::STRING) STRING = [MAJOR, MINOR, PATCH, PRE].compact.join('.') diff --git a/oa-oauth/oa-oauth.gemspec b/oa-oauth/oa-oauth.gemspec index 13065fa..728ee01 100644 --- a/oa-oauth/oa-oauth.gemspec +++ b/oa-oauth/oa-oauth.gemspec @@ -5,7 +5,7 @@ Gem::Specification.new do |gem| gem.add_runtime_dependency 'faraday', '~> 0.6.1' gem.add_runtime_dependency 'multi_json', '~> 1.0.0' gem.add_runtime_dependency 'multi_xml', '~> 0.2.2' - gem.add_runtime_dependency 'oa-core', OmniAuth::Version::STRING + gem.add_runtime_dependency 'oa-core', ">= #{OmniAuth::Version::STRING}" gem.add_runtime_dependency 'oauth', '~> 0.4.0' gem.add_runtime_dependency 'oauth2', '~> 0.5.0' gem.add_development_dependency 'evernote', '~> 0.9'