Skip to content

Commit

Permalink
Rename strategy to ebay_oauth to allow use with old strategies
Browse files Browse the repository at this point in the history
  • Loading branch information
Envek committed Mar 16, 2018
1 parent 3da6305 commit b3d3f0f
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.3.5
2.4.3
7 changes: 4 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
sudo: false
language: ruby
rvm:
- 2.3.5
- 2.4.2
before_install: gem install bundler -v 1.15.4
- 2.3.6
- 2.4.3
- 2.5.0
before_install: gem install bundler -v 1.16.1
31 changes: 31 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Changelog
All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html).

## [0.2.0] - 2018-03-16

### Changed

- Renamed strategy from `ebay` to `ebay_oauth`. @Envek

This allow to use this strategy simultaneously with old strategies (like [omniauth-ebay](https://github.com/TheGiftsProject/omniauth-ebay) and [ebay_request](https://github.com/gzigzigzeo/ebay_request#omniauth-strategy))

As eBay allows to have only one OAuth RUName per application keyset while allowing to have many Auth'n'auth RUNames, it may be desirable to use Auth'n'auth for auxilary signins, where obtaining of OAuth tokens is not required.

## [0.1.1] - 2018-01-09

### Fixed

- Add missing require to fix gem load errors when this gem is being required from another gem. @Envek


## [0.1.0] - 2017-11-27

- Initial release: fully working strategy. @ignat-z


[0.2.0]: https://github.com/evilmartians/omniauth-ebay-oauth/compare/v0.1.1...v0.2.0
[0.1.1]: https://github.com/evilmartians/omniauth-ebay-oauth/compare/v0.1.0...v0.1.1
[0.1.0]: https://github.com/evilmartians/omniauth-ebay-oauth/compare/5213dada5fec8df5da551daf763b6acc84ec7330...v0.1.0
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ bundle install

```ruby
use OmniAuth::Builder do
provider :ebay, CLIENT_ID, CLIENT_SECRET, callback_url: RU_NAME,
provider :ebay_oauth, CLIENT_ID, CLIENT_SECRET, callback_url: RU_NAME,
sandbox: false, scope: 'https://api.ebay.com/oauth/api_scope' # redefining additional default options
end
```
Expand All @@ -78,8 +78,8 @@ require 'omniauth-ebay-oauth'

use Rack::Session::Cookie
use OmniAuth::Builder do
provider :ebay, ENV['EBAY_CLIENT_ID'], ENV['EBAY_CLIENT_SECRET'],
callback_url: ENV['EBAY_RU_NAME']
provider :ebay_oauth, ENV['EBAY_CLIENT_ID'], ENV['EBAY_CLIENT_SECRET'],
callback_url: ENV['EBAY_RU_NAME'], name: 'ebay'
end

get '/' do
Expand Down
2 changes: 1 addition & 1 deletion lib/omniauth-ebay-oauth.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@
require 'omniauth/ebay-oauth/errors'
require 'omniauth/ebay-oauth/user_info'
require 'omniauth/ebay-oauth/user_info_request'
require 'omniauth/strategies/ebay'
require 'omniauth/strategies/ebay_oauth'
2 changes: 1 addition & 1 deletion lib/omniauth/ebay-oauth/version.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@

module OmniAuth
module EbayOauth
VERSION = '0.1.1'
VERSION = '0.2.0'
end
end
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
module OmniAuth
module Strategies
# OmniAuth strategy for eBay
class Ebay < OmniAuth::Strategies::OAuth2
class EbayOauth < OmniAuth::Strategies::OAuth2
option :production_client_options,
user_info_endpoint: 'https://api.ebay.com/ws/api.dll',
token_url: 'https://api.ebay.com/identity/v1/oauth2/token',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

require 'spec_helper'

RSpec.describe OmniAuth::Strategies::Ebay do
RSpec.describe OmniAuth::Strategies::EbayOauth do
subject { described_class.new(nil, options) }

describe '#callback_url' do
Expand Down

0 comments on commit b3d3f0f

Please sign in to comment.