omniauth-bookingsync 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 06bc914a684fc353f47137ce807aebe7de0f5bda
4
- data.tar.gz: 50f2cb2dde588c89d804ec924e14bc8f9100350b
3
+ metadata.gz: 5f6d7796780a796a1c27ab6c42ed2ce960019c21
4
+ data.tar.gz: 395d0faf79b208951f18b5d6c0a3caf47abb3049
5
5
  SHA512:
6
- metadata.gz: 442fc397712efbec922b6ce1fb875955d2c2aad8a9b43324e561152d86589e9e3efd5082c95c53439e27c2bbcecd592388f5ebfa6b87564799d1f731c800084c
7
- data.tar.gz: 249406a97cda952d19e6b3f3f2b2578936d56cce8187577f14d60b0ba21f85d258325e55eb85ec65138271c8d00de933adf5ae458f3a89311f16da4b7fdb091c
6
+ metadata.gz: bf8d4a6f8782077248458f8c4359c45e20c9223f07ec35b353f5fbd3856cb9bb034f347eefd6e1349f154924ff538b55a65e13f5cc4e4fcb4cc3f7b2a83a474f
7
+ data.tar.gz: 15ab8b0e806fa68c4cc0228b467669460b7350a8c51737c59f7cdb8e8e59f2987a72ad31b4ac1604afb5822184dda50991b9af5a00541a9a85eaeeda89bd1275
data/.gitignore CHANGED
@@ -6,7 +6,6 @@
6
6
  .rbx
7
7
  .rvmrc
8
8
  .yardoc
9
- Gemfile.lock
10
9
  bin
11
10
  coverage*
12
11
  doc
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format=nested
2
1
  --colour
@@ -0,0 +1,7 @@
1
+ inherit_from: .rubocop_todo.yml
2
+
3
+ Metrics/LineLength:
4
+ Max: 100
5
+
6
+ Style/StringLiterals:
7
+ EnforcedStyle: double_quotes
@@ -0,0 +1,19 @@
1
+ # This configuration was generated by
2
+ # `rubocop --auto-gen-config`
3
+ # on 2015-10-28 12:37:10 +0100 using RuboCop version 0.34.1.
4
+ # The point is for the user to remove these configuration records
5
+ # one by one as the offenses are removed from the code base.
6
+ # Note that changes in the inspected code, or installation of new
7
+ # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Offense count: 2
10
+ Style/Documentation:
11
+ Exclude:
12
+ - 'lib/omniauth/bookingsync/version.rb'
13
+ - 'lib/omniauth/strategies/bookingsync.rb'
14
+
15
+ # Offense count: 1
16
+ # Configuration parameters: Exclude.
17
+ Style/FileName:
18
+ Exclude:
19
+ - 'lib/omniauth-bookingsync.rb'
@@ -1,10 +1,8 @@
1
+ sudo: false
1
2
  language: ruby
2
3
  rvm:
3
- - 1.8.7
4
- - 1.9.2
5
- - 1.9.3
6
- - 2.0.0
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
7
  - ruby-head
8
- - ree
9
- - jruby-18mode # JRuby in 1.8 mode
10
- - jruby-19mode # JRuby in 1.9 mode
8
+ - jruby
@@ -0,0 +1,8 @@
1
+ # 0.3.0
2
+
3
+ * Lock omniauth-oauth2 below 1.4 due to issue https://github.com/intridea/omniauth-oauth2/issues/81
4
+ * Unlock rspec version and update specs
5
+ * Add rubocop and apply its fixes
6
+ * Remove ruby 1.8, 1.9 and ree support
7
+
8
+ # 0.2.0
data/Gemfile CHANGED
@@ -1,7 +1,3 @@
1
- source 'https://rubygems.org'
1
+ source "https://rubygems.org"
2
2
 
3
3
  gemspec
4
-
5
- group :example do
6
- gem 'sinatra'
7
- end
@@ -0,0 +1,71 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth-bookingsync (0.3.0)
5
+ omniauth (~> 1.1)
6
+ omniauth-oauth2 (< 1.4)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.1.0)
12
+ astrolabe (1.3.1)
13
+ parser (~> 2.2)
14
+ diff-lcs (1.2.5)
15
+ faraday (0.9.2)
16
+ multipart-post (>= 1.2, < 3)
17
+ hashie (3.4.3)
18
+ jwt (1.5.2)
19
+ multi_json (1.11.2)
20
+ multi_xml (0.5.5)
21
+ multipart-post (2.0.0)
22
+ oauth2 (1.0.0)
23
+ faraday (>= 0.8, < 0.10)
24
+ jwt (~> 1.0)
25
+ multi_json (~> 1.3)
26
+ multi_xml (~> 0.5)
27
+ rack (~> 1.2)
28
+ omniauth (1.2.2)
29
+ hashie (>= 1.2, < 4)
30
+ rack (~> 1.0)
31
+ omniauth-oauth2 (1.3.1)
32
+ oauth2 (~> 1.0)
33
+ omniauth (~> 1.2)
34
+ parser (2.2.2.6)
35
+ ast (>= 1.1, < 3.0)
36
+ powerpack (0.1.1)
37
+ rack (1.6.4)
38
+ rainbow (2.0.0)
39
+ rake (10.4.2)
40
+ rspec (3.3.0)
41
+ rspec-core (~> 3.3.0)
42
+ rspec-expectations (~> 3.3.0)
43
+ rspec-mocks (~> 3.3.0)
44
+ rspec-core (3.3.2)
45
+ rspec-support (~> 3.3.0)
46
+ rspec-expectations (3.3.1)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.3.0)
49
+ rspec-mocks (3.3.2)
50
+ diff-lcs (>= 1.2.0, < 2.0)
51
+ rspec-support (~> 3.3.0)
52
+ rspec-support (3.3.0)
53
+ rubocop (0.34.1)
54
+ astrolabe (~> 1.3)
55
+ parser (>= 2.2.2.5, < 3.0)
56
+ powerpack (~> 0.1)
57
+ rainbow (>= 1.99.1, < 3.0)
58
+ ruby-progressbar (~> 1.4)
59
+ ruby-progressbar (1.7.5)
60
+
61
+ PLATFORMS
62
+ ruby
63
+
64
+ DEPENDENCIES
65
+ omniauth-bookingsync!
66
+ rake
67
+ rspec
68
+ rubocop
69
+
70
+ BUNDLED WITH
71
+ 1.10.6
data/README.md CHANGED
@@ -1,3 +1,5 @@
1
+ [![Build Status](https://travis-ci.org/BookingSync/omniauth-bookingsync.svg?branch=master)](https://travis-ci.org/BookingSync/omniauth-bookingsync)
2
+
1
3
  # OmniAuth BookingSync
2
4
 
3
5
  This is an OmniAuth 1.1 strategy for authenticating to BookingSync. To
@@ -34,7 +36,7 @@ this will skip the account selection process and show the accept/deny page.
34
36
 
35
37
  ## Supported Rubies
36
38
 
37
- OmniAuth BookingSync is tested under 1.8.7, 1.9.2, 1.9.3, 2.0.0, Ruby-head, Ruby Enterprise Edition, JRuby (1.8 and 1.9 mode).
39
+ OmniAuth BookingSync is tested under 2.0, 2.1, 2.2, Ruby-head, JRuby.
38
40
 
39
41
  [![CI Build
40
42
  Status](https://secure.travis-ci.org/BookingSync/omniauth-bookingsync.png)](http://travis-ci.org/BookingSync/omniauth-bookingsync)
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env rake
2
2
  require "bundler/gem_tasks"
3
- require 'rspec/core/rake_task'
3
+ require "rspec/core/rake_task"
4
4
 
5
5
  RSpec::Core::RakeTask.new(:spec)
6
6
 
7
- task :default => :spec
7
+ task default: :spec
@@ -0,0 +1,3 @@
1
+ gem "sinatra"
2
+ gem "omniauth-bookingsync"
3
+ gem "json"
@@ -0,0 +1,34 @@
1
+ # BookingSync OAuth Helper
2
+
3
+ Small sinatra application to help you get your OAuth Token for your BookingSync Application.
4
+ This is specially useful to play around BookingSync API v3.
5
+
6
+ ## Usage
7
+
8
+ ```
9
+ $ bundle install
10
+ $ bundle exec ruby bookingsync_oauth_helper.rb
11
+ ```
12
+
13
+ Follow the guide until you get your OAuth Token back.
14
+
15
+ You can then use the [BookingSync API gem](https://github.com/BookingSync/bookingsync-api) to consume the API
16
+
17
+ Example in IRB console:
18
+
19
+ ```ruby
20
+ require 'bookingsync-api'
21
+ require 'json'
22
+ api = BookingSync::API.new(YOUR_OAUTH_TOKEN)
23
+ api.rentals.first.name
24
+ ```
25
+
26
+ ## License
27
+
28
+ Copyright (c) 2014 Sébastien Grosjean and [BookingSync.com](http://www.bookingsync.com)
29
+
30
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
31
+
32
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
33
+
34
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,76 @@
1
+ require "sinatra"
2
+ require "omniauth-bookingsync"
3
+ require "json"
4
+
5
+ puts "-" * 60
6
+ puts "BookingSync OAuth helper for API v3".center(60)
7
+ puts "-" * 60
8
+ puts ""
9
+ puts "Requirements:"
10
+ puts " => Create a BookingSync Application from"
11
+ puts " https://www.bookingsync.com/en/partners/applications"
12
+ puts ""
13
+ puts " => Use http://localhost:4567/auth/bookingsync/callback as return URL"
14
+ puts ""
15
+ puts "Enter your Application's Client ID"
16
+ set :client_id, gets.strip
17
+ puts ""
18
+ puts "Enter your Application's Client Secret"
19
+ set :client_secret, gets.strip
20
+ puts ""
21
+ puts "Enter your desired scopes (space separated)"
22
+ set :scope, gets.strip
23
+ puts "-" * 60
24
+ puts "Visit http://localhost:4567".center(60)
25
+ puts "-" * 60
26
+ puts "Press CMD + C to stop"
27
+ puts ""
28
+
29
+ use Rack::Session::Cookie
30
+
31
+ use OmniAuth::Builder do
32
+ provider :bookingsync, settings.client_id, settings.client_secret,
33
+ scope: settings.scope
34
+ end
35
+
36
+ get "/" do
37
+ <<-HTML
38
+ <html>
39
+ <head>
40
+ <style>
41
+ body {
42
+ text-align: center;
43
+ }
44
+
45
+ a {
46
+ display: inline-block;
47
+ padding: 10px 20px;
48
+ font-size: 16px;
49
+ color: #fff;
50
+ background-color: #1B57AA;
51
+ text-decoration: none;
52
+ border-radius: 4px;
53
+ margin: 100px auto 0;
54
+ }
55
+
56
+ a:hover {
57
+ background-color: #2b88dc;
58
+ }
59
+ </style>
60
+ </head>
61
+ <body>
62
+ <p><a href="/auth/bookingsync">Sign in with BookingSync</a></p>
63
+ </body>
64
+ </html>
65
+ HTML
66
+ end
67
+
68
+ get "/auth/:provider/callback" do
69
+ content_type "application/json"
70
+ request.env["omniauth.auth"].to_hash.to_json
71
+ end
72
+
73
+ get "/auth/failure" do
74
+ content_type "text/plain"
75
+ params[:message]
76
+ end
@@ -1,2 +1,2 @@
1
- require 'omniauth/bookingsync/version'
2
- require 'omniauth/strategies/bookingsync'
1
+ require "omniauth/bookingsync/version"
2
+ require "omniauth/strategies/bookingsync"
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module BookingSync
3
- VERSION = '0.2.0'
3
+ VERSION = "0.3.0"
4
4
  end
5
- end
5
+ end
@@ -1,24 +1,22 @@
1
- require 'omniauth-oauth2'
1
+ require "omniauth-oauth2"
2
2
 
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class BookingSync < OmniAuth::Strategies::OAuth2
6
- option :name, 'bookingsync'
6
+ option :name, "bookingsync"
7
7
 
8
- option :client_options, {
9
- :site => 'https://www.bookingsync.com/'
10
- }
8
+ option :client_options, site: "https://www.bookingsync.com/"
11
9
 
12
10
  uid { raw_info["id"] }
13
11
 
14
12
  info do
15
13
  {
16
- :business_name => raw_info['business_name']
14
+ business_name: raw_info["business_name"]
17
15
  }
18
16
  end
19
17
 
20
18
  def raw_info
21
- @raw_info ||= access_token.get('/api/v3/accounts').parsed['accounts'].first
19
+ @raw_info ||= access_token.get("/api/v3/accounts").parsed["accounts"].first
22
20
  end
23
21
 
24
22
  def authorize_params
@@ -32,6 +30,6 @@ module OmniAuth
32
30
  end
33
31
  end
34
32
 
35
- OAuth2::Response::CONTENT_TYPES['application/vnd.api+json'] ||= :json
33
+ OAuth2::Response::CONTENT_TYPES["application/vnd.api+json"] ||= :json
36
34
 
37
- OmniAuth.config.add_camelization 'bookingsync', 'BookingSync'
35
+ OmniAuth.config.add_camelization "bookingsync", "BookingSync"
@@ -8,17 +8,20 @@ Gem::Specification.new do |gem|
8
8
  gem.authors = ["Sebastien Grosjean"]
9
9
  gem.email = ["dev@bookingsync.com"]
10
10
  gem.homepage = "https://github.com/BookingSync/omniauth-bookingsync"
11
- gem.summary = %q{An OmniAuth 1.0 strategy for BookingSync OAuth2 identification.}
12
- gem.description = %q{An OmniAuth 1.0 strategy for BookingSync OAuth2 identification.}
11
+ gem.summary = "An OmniAuth 1.0 strategy for BookingSync OAuth2 identification."
12
+ gem.description = "An OmniAuth 1.0 strategy for BookingSync OAuth2 identification."
13
13
 
14
- gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
14
+ gem.executables = `git ls-files -- bin/*`.split("\n").map { |f| File.basename(f) }
15
15
  gem.files = `git ls-files`.split("\n")
16
16
  gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  gem.require_paths = ["lib"]
18
18
 
19
- gem.add_dependency 'omniauth', '~> 1.1'
20
- gem.add_dependency 'omniauth-oauth2', '~> 1.1'
19
+ gem.add_dependency "omniauth", "~> 1.1"
20
+ # this constraint is to change in 1.4 breaking redirect url generation
21
+ # https://github.com/intridea/omniauth-oauth2/issues/81
22
+ gem.add_dependency "omniauth-oauth2", "< 1.4"
21
23
 
22
- gem.add_development_dependency 'rspec', '~> 2.7'
23
- gem.add_development_dependency 'rake'
24
- end
24
+ gem.add_development_dependency "rspec"
25
+ gem.add_development_dependency "rake"
26
+ gem.add_development_dependency "rubocop"
27
+ end
@@ -1,55 +1,56 @@
1
- require 'spec_helper'
2
- require 'omniauth-bookingsync'
1
+ require "spec_helper"
2
+ require "omniauth-bookingsync"
3
3
 
4
4
  describe OmniAuth::Strategies::BookingSync do
5
5
  before do
6
6
  OmniAuth.config.test_mode = true
7
7
  end
8
8
 
9
- let(:request) { double('Request', :params => {}, :cookies => {}, :env => {}) }
9
+ let(:request) { double("Request", params: {}, cookies: {}, env: {}) }
10
+ let(:options) { {} }
10
11
 
11
12
  subject do
12
- OmniAuth::Strategies::BookingSync.new(nil, @options || {}).tap do |strategy|
13
+ OmniAuth::Strategies::BookingSync.new(nil, options).tap do |strategy|
13
14
  allow(strategy).to receive(:request) { request }
14
15
  end
15
16
  end
16
17
 
17
- it_should_behave_like 'an oauth2 strategy'
18
+ it_should_behave_like "an oauth2 strategy"
18
19
 
19
20
  describe '#client' do
20
- it 'should have the correct site' do
21
- subject.client.site.should eq("https://www.bookingsync.com/")
21
+ it "has the correct site" do
22
+ expect(subject.client.site).to eq("https://www.bookingsync.com/")
22
23
  end
23
24
 
24
- it 'should have the correct authorization url' do
25
- subject.client.options[:authorize_url].should eq("/oauth/authorize")
25
+ it "has the correct authorization url" do
26
+ expect(subject.client.options[:authorize_url]).to eq("/oauth/authorize")
26
27
  end
27
28
 
28
- it 'should have the correct token url' do
29
- subject.client.options[:token_url].should eq('/oauth/token')
29
+ it "has the correct token url" do
30
+ expect(subject.client.options[:token_url]).to eq("/oauth/token")
30
31
  end
31
32
  end
32
33
 
33
34
  describe '#callback_path' do
34
- it 'should have the correct callback path' do
35
- subject.callback_path.should eq('/auth/bookingsync/callback')
35
+ it "has the correct callback path" do
36
+ expect(subject.callback_path).to eq("/auth/bookingsync/callback")
36
37
  end
37
38
  end
38
39
 
39
40
  describe '#authorize_params' do
40
- it 'should pass account_id from request params' do
41
- request.params['account_id'] = '123'
42
- expect(subject.authorize_params[:account_id]).to eq('123')
41
+ it "passes account_id from request params" do
42
+ request.params["account_id"] = "123"
43
+ expect(subject.authorize_params[:account_id]).to eq("123")
43
44
  end
44
45
  end
45
46
 
46
47
  describe '#raw_info' do
47
- it 'should fetch account info from api v3' do
48
- subject.stub(:access_token => double)
49
- response = double(:parsed => {'accounts' => [{'id' => 1}]})
50
- subject.access_token.should_receive(:get).with('/api/v3/accounts').
51
- and_return(response)
52
- subject.raw_info.should eq({'id' => 1})
48
+ it "fetches account info from api v3" do
49
+ allow(subject).to receive(:access_token).and_return(double)
50
+ response = double(parsed: { "accounts" => [{ "id" => 1 }] })
51
+ expect(subject.access_token).to receive(:get).with("/api/v3/accounts")
52
+ .and_return(response)
53
+ expect(subject.raw_info).to eq("id" => 1)
53
54
  end
54
55
  end
55
56
  end
@@ -1,6 +1,6 @@
1
- require 'bundler/setup'
2
- require 'rspec'
3
- Dir[File.expand_path('../support/**/*', __FILE__)].each { |f| require f }
1
+ require "bundler/setup"
2
+ require "rspec"
3
+ Dir[File.expand_path("../support/**/*", __FILE__)].each { |f| require f }
4
4
 
5
- RSpec.configure do |config|
6
- end
5
+ RSpec.configure do |_config|
6
+ end
@@ -1,36 +1,59 @@
1
- shared_examples 'an oauth2 strategy' do
1
+ shared_examples "an oauth2 strategy" do
2
2
  describe '#client' do
3
- it 'should be initialized with symbolized client_options' do
4
- @options = { :client_options => { 'authorize_url' => 'https://example.com' } }
5
- subject.client.options[:authorize_url].should == 'https://example.com'
3
+ let(:options) do
4
+ { client_options: { "authorize_url" => "https://example.com" } }
5
+ end
6
+
7
+ it "is initialized with symbolized client_options" do
8
+ expect(subject.client.options[:authorize_url]).to eq "https://example.com"
6
9
  end
7
10
  end
8
11
 
9
12
  describe '#authorize_params' do
10
- it 'should include any authorize params passed in the :authorize_params option' do
11
- @options = { :authorize_params => { :foo => 'bar', :baz => 'zip' } }
12
- subject.authorize_params['foo'].should eq('bar')
13
- subject.authorize_params['baz'].should eq('zip')
13
+ context "when passed as authorize_params" do
14
+ let(:options) do
15
+ { authorize_params: { foo: "bar", baz: "zip" } }
16
+ end
17
+
18
+ it "includes any authorize params passed in the :authorize_params option" do
19
+ expect(subject.authorize_params["foo"]).to eq("bar")
20
+ expect(subject.authorize_params["baz"]).to eq("zip")
21
+ end
14
22
  end
15
23
 
16
- it 'should include top-level options that are marked as :authorize_options' do
17
- @options = { :authorize_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
18
- subject.authorize_params['scope'].should eq('bar')
19
- subject.authorize_params['foo'].should eq('baz')
24
+ context "when passed as authorize_options" do
25
+ let(:options) do
26
+ { authorize_options: [:scope, :foo], scope: "bar", foo: "baz" }
27
+ end
28
+
29
+ it "includes top-level options that are marked as :authorize_options" do
30
+ expect(subject.authorize_params["scope"]).to eq("bar")
31
+ expect(subject.authorize_params["foo"]).to eq("baz")
32
+ end
20
33
  end
21
34
  end
22
35
 
23
36
  describe '#token_params' do
24
- it 'should include any token params passed in the :token_params option' do
25
- @options = { :token_params => { :foo => 'bar', :baz => 'zip' } }
26
- subject.token_params['foo'].should eq('bar')
27
- subject.token_params['baz'].should eq('zip')
37
+ context "when passed as token_params" do
38
+ let(:options) do
39
+ { token_params: { foo: "bar", baz: "zip" } }
40
+ end
41
+
42
+ it "includes any token params passed in the :token_params option" do
43
+ expect(subject.token_params["foo"]).to eq("bar")
44
+ expect(subject.token_params["baz"]).to eq("zip")
45
+ end
28
46
  end
29
47
 
30
- it 'should include top-level options that are marked as :token_options' do
31
- @options = { :token_options => [:scope, :foo], :scope => 'bar', :foo => 'baz' }
32
- subject.token_params['scope'].should eq('bar')
33
- subject.token_params['foo'].should eq('baz')
48
+ context "when passed as token_options" do
49
+ let(:options) do
50
+ { token_options: [:scope, :foo], scope: "bar", foo: "baz" }
51
+ end
52
+
53
+ it "includes top-level options that are marked as :token_options" do
54
+ expect(subject.token_params["scope"]).to eq("bar")
55
+ expect(subject.token_params["foo"]).to eq("baz")
56
+ end
34
57
  end
35
58
  end
36
- end
59
+ end
metadata CHANGED
@@ -1,69 +1,83 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bookingsync
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sebastien Grosjean
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-28 00:00:00.000000000 Z
11
+ date: 2015-10-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.1'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: omniauth-oauth2
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "<"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.1'
33
+ version: '1.4'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "<"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.1'
40
+ version: '1.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
- version: '2.7'
47
+ version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
- version: '2.7'
54
+ version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rubocop
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
60
74
  - !ruby/object:Gem::Version
61
75
  version: '0'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
- - - '>='
80
+ - - ">="
67
81
  - !ruby/object:Gem::Version
68
82
  version: '0'
69
83
  description: An OmniAuth 1.0 strategy for BookingSync OAuth2 identification.
@@ -73,13 +87,19 @@ executables: []
73
87
  extensions: []
74
88
  extra_rdoc_files: []
75
89
  files:
76
- - .gitignore
77
- - .rspec
78
- - .travis.yml
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".rubocop.yml"
93
+ - ".rubocop_todo.yml"
94
+ - ".travis.yml"
95
+ - CHANGELOG.md
79
96
  - Gemfile
97
+ - Gemfile.lock
80
98
  - README.md
81
99
  - Rakefile
82
- - example/sinatra.rb
100
+ - example/Gemfile
101
+ - example/ReadMe.md
102
+ - example/bookingsync_oauth_helper.rb
83
103
  - lib/omniauth-bookingsync.rb
84
104
  - lib/omniauth/bookingsync/version.rb
85
105
  - lib/omniauth/strategies/bookingsync.rb
@@ -96,17 +116,17 @@ require_paths:
96
116
  - lib
97
117
  required_ruby_version: !ruby/object:Gem::Requirement
98
118
  requirements:
99
- - - '>='
119
+ - - ">="
100
120
  - !ruby/object:Gem::Version
101
121
  version: '0'
102
122
  required_rubygems_version: !ruby/object:Gem::Requirement
103
123
  requirements:
104
- - - '>='
124
+ - - ">="
105
125
  - !ruby/object:Gem::Version
106
126
  version: '0'
107
127
  requirements: []
108
128
  rubyforge_project:
109
- rubygems_version: 2.0.14
129
+ rubygems_version: 2.4.3
110
130
  signing_key:
111
131
  specification_version: 4
112
132
  summary: An OmniAuth 1.0 strategy for BookingSync OAuth2 identification.
@@ -114,4 +134,3 @@ test_files:
114
134
  - spec/omniauth/strategies/bookingsync_spec.rb
115
135
  - spec/spec_helper.rb
116
136
  - spec/support/shared_examples.rb
117
- has_rdoc:
@@ -1,36 +0,0 @@
1
- begin
2
- require 'bundler'
3
- Bundler.setup :default, :development, :example
4
- require 'sinatra'
5
- require 'omniauth-bookingsync'
6
- rescue LoadError
7
- require 'rubygems'
8
- require 'bundler'
9
- Bundler.setup :default, :development, :example
10
- require 'sinatra'
11
- require 'omniauth-bookingsync'
12
- end
13
-
14
- use Rack::Session::Cookie
15
-
16
- use OmniAuth::Builder do
17
- provider :bookingsync, APPLICATION_ID, SECRET
18
- end
19
-
20
- get '/' do
21
- <<-HTML
22
- <ul>
23
- <li><a href='/auth/bookingsync'>Sign in with BookingSync</a></li>
24
- </ul>
25
- HTML
26
- end
27
-
28
- get '/auth/:provider/callback' do
29
- content_type 'text/plain'
30
- request.env['omniauth.auth'].to_hash.inspect
31
- end
32
-
33
- get '/auth/failure' do
34
- content_type 'text/plain'
35
- params[:message]
36
- end