omniauth-dash 0.0.1 → 0.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 10d4bc1afe7edcc0e43ef6ff32dc50b47355adb9
4
- data.tar.gz: db1a8b36004c96697f74f73067bea8d19de020ea
3
+ metadata.gz: c662a53eab30988e57ece3d228a5669d6aa96564
4
+ data.tar.gz: e001cd92080ee195422c152f98a51c922537f3cf
5
5
  SHA512:
6
- metadata.gz: 7a6186fccebfe0c223fc3006dbf53f654027472079f49d56cbb70ea1d20b315cbeadf8e89074a202b743a66605e8a677da8a2ba87203b3a04a0eb7c0fa01017d
7
- data.tar.gz: f1f4f921b3aecb6dbe90e07106cabefd8a610a21e4915cd755d03b891e7a2ba2028c384d51f9d3fc8635dc5f34ab1c742ccbbdd9f8ecb0f7955cf6bfec2b96cc
6
+ metadata.gz: 456ec533cb56e6398571ac7688c0bf230902a5785c691cce7ba1b83bbd943ba0a9788ef5a303e6725dc3924705930c3efcd6a30b3c0cca0ae331f0f76df3bc7f
7
+ data.tar.gz: a4f08349fbacbb0904ab8d8d89059a19a20228c063bca33f680f44b7cae3925b39d28d433c4ffee98e926a8a8d7d511598c22641586e57a8aebf5217f5be5885
data/.gitignore CHANGED
@@ -14,4 +14,7 @@ rdoc
14
14
  spec/reports
15
15
  test/tmp
16
16
  test/version_tmp
17
- tmp
17
+ tmp
18
+
19
+ # Ignore RubyMine
20
+ .idea/
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OmniAuth Dash Strategy
2
2
 
3
- Strategy to authenticate with Nest via OAuth2 in OmniAuth
3
+ Strategy to authenticate with Dash via OAuth2 in OmniAuth
4
4
 
5
5
  Get your API key at: https://dash.by/signup-form.html
6
6
 
@@ -22,8 +22,8 @@ then `bundle install`.
22
22
  1. Clone this repo and `cd` into it
23
23
  2. `bundle install` (Required [bundler gem](http://bundler.io/))
24
24
  3. `cd examples`
25
- 4. Set ENV variables for NEST_ID and NEST_SECRET
26
- 5. Set redirect URI to http://localhost:9292/auth/nest/callback
25
+ 4. Set ENV variables for DASH_ID and DASH_SECRET
26
+ 5. Set redirect URI to http://localhost:9292/auth/dash/callback
27
27
  6. `bundle exec rackup`
28
28
  7. Open http://localhost:9292 in your browser and follow links
29
29
 
@@ -33,7 +33,7 @@ In Rails add the following to `config/initializers/omniauth.rb`
33
33
 
34
34
  ````ruby
35
35
  use OmniAuth::Builder do
36
- provider :nest, ENV['DASH_ID'], ENV['DASH_SECRET']
36
+ provider :dash, ENV['DASH_ID'], ENV['DASH_SECRET']
37
37
  end
38
38
  ````
39
39
 
data/examples/config.ru CHANGED
@@ -16,6 +16,7 @@ class DashApp < Sinatra::Base
16
16
 
17
17
  get '/auth/:provider/callback' do |provider|
18
18
  content_type 'text/plain'
19
+ puts request.env['omniauth.auth'].to_json
19
20
  %{ #{provider} token: #{request.env['omniauth.auth'].to_hash['credentials'].inspect}
20
21
  } rescue 'No data returned'
21
22
  end
@@ -30,7 +31,7 @@ end
30
31
  use Rack::Session::Cookie, :secret => 'abc'
31
32
 
32
33
  use OmniAuth::Builder do
33
- provider :dash, 'MWM3ZTg1N2EtZDA4Yy00N2E4LWEzODgtZmI4ZjI3YWFlOGUw', 'MmJiMGQ5YTEtYWY5NS00NjFkLWEwOTctOWFjNTM4ZGE3ZDU2t'
34
+ provider :dash, 'MWNjMmU2ZTYtNThlOS00YTRiLTkzMGQtYWZhZWRhNjVmYzcx', 'MWViYTIyY2UtMzVkMy00ZDg3LWFkNWQtNGI4NmZhMmM4ZDU2', :scope => 'user,trips', :callback_url => 'http://127.0.0.1:9292/auth/dash/callback'
34
35
  end
35
36
 
36
37
  run DashApp.new
@@ -12,6 +12,10 @@ module OmniAuth
12
12
  :token_url => 'https://dash.by/api/auth/token'
13
13
  }
14
14
 
15
+ def callback_url
16
+ options[:callback_url] || super
17
+ end
18
+
15
19
  end
16
20
  end
17
21
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Dash
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-dash
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aren Patel
@@ -14,84 +14,84 @@ dependencies:
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.0'
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.0'
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
33
  version: '1.0'
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
40
  version: '1.0'
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
47
  version: '2.7'
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
54
  version: '2.7'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rack-test
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: simplecov
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - '>='
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - '>='
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: webmock
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ">="
87
+ - - '>='
88
88
  - !ruby/object:Gem::Version
89
89
  version: '0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ">="
94
+ - - '>='
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  description: OmniAuth strategy for Dash.
@@ -101,8 +101,8 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - ".gitignore"
105
- - ".rspec"
104
+ - .gitignore
105
+ - .rspec
106
106
  - Gemfile
107
107
  - README.md
108
108
  - Rakefile
@@ -120,17 +120,17 @@ require_paths:
120
120
  - lib
121
121
  required_ruby_version: !ruby/object:Gem::Requirement
122
122
  requirements:
123
- - - ">="
123
+ - - '>='
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
126
  required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
- - - ">="
128
+ - - '>='
129
129
  - !ruby/object:Gem::Version
130
130
  version: '0'
131
131
  requirements: []
132
132
  rubyforge_project:
133
- rubygems_version: 2.2.2
133
+ rubygems_version: 2.0.14
134
134
  signing_key:
135
135
  specification_version: 4
136
136
  summary: OmniAuth strategy for Dash.