1
0
Fork 0
mirror of https://github.com/omniauth/omniauth.git synced 2022-11-09 12:31:49 -05:00

set etsy environment to correctly set host; use correct host; bump versions

This commit is contained in:
David LaMacchia 2011-08-24 13:35:57 -07:00
parent dd98c294a8
commit e1f54458c0
4 changed files with 7 additions and 6 deletions

View file

@ -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('.')

View file

@ -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,

View file

@ -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('.')

View file

@ -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'