omniauth-surveymonkey 1.0.0 → 2.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3e0429659fff91c97567414014c2ce50de993080
4
+ data.tar.gz: 4e274dd1478e0e2c122870adbb38d24ba681462e
5
+ SHA512:
6
+ metadata.gz: 9618956d081f2bd90d2f6944dc22cf75da39b1f3fccd7bc443a6f459bc9dc2ab8379e709e5c93e86bd5a150934cb9f6dd037bf6363930d39223516b9b0f3b705
7
+ data.tar.gz: 63130a67d60ea4e7d56e33cbd78d498b2d49531f2ecf21140e18fa4669a1badaad0722c2e778a1220a7da38803c6d837b9ff84c21ab8d3314e92d654c9e78a23
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.rubocop.yml ADDED
@@ -0,0 +1,225 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.2
3
+ Include:
4
+ - 'app/**/*.rb'
5
+ - 'lib/**/*.rb'
6
+ - 'specs/**/*.rb'
7
+ Exclude:
8
+ - 'bin/**/*'
9
+ - 'config/**/*.rb'
10
+ - 'cookbooks/**/*.rb'
11
+ - 'db/**/*.rb'
12
+ - 'lib/geolocal.rb'
13
+
14
+ Rails:
15
+ Enabled: true
16
+
17
+ Lint/AmbiguousOperator:
18
+ Enabled: false
19
+
20
+ Lint/AssignmentInCondition:
21
+ Enabled: false
22
+
23
+ Lint/Eval:
24
+ Enabled: false
25
+
26
+ Lint/HandleExceptions:
27
+ Enabled: false
28
+
29
+ Lint/RescueException:
30
+ Enabled: false
31
+
32
+ Metrics/AbcSize:
33
+ Enabled: false
34
+
35
+ Metrics/BlockNesting:
36
+ Max: 5
37
+
38
+ Metrics/ClassLength:
39
+ Max: 2000
40
+
41
+ Metrics/CyclomaticComplexity:
42
+ Max: 50
43
+
44
+ Metrics/LineLength:
45
+ Max: 1000
46
+
47
+ Metrics/MethodLength:
48
+ Max: 500
49
+
50
+ Metrics/ModuleLength:
51
+ Enabled: false
52
+
53
+ Metrics/ParameterLists:
54
+ Max: 10
55
+
56
+ Metrics/PerceivedComplexity:
57
+ Enabled: false
58
+
59
+ Performance/Count:
60
+ Enabled: false
61
+
62
+ Performance/Detect:
63
+ Enabled: false
64
+
65
+ Rails/HasAndBelongsToMany:
66
+ Enabled: false
67
+
68
+ Rails/FindEach:
69
+ Enabled: false
70
+
71
+ Rails/Validation:
72
+ Enabled: false
73
+
74
+ Style/AccessorMethodName:
75
+ Enabled: false
76
+
77
+ Style/AlignArray:
78
+ Enabled: false
79
+
80
+ Style/AlignHash:
81
+ Enabled: false
82
+
83
+ Style/AlignParameters:
84
+ Enabled: false
85
+
86
+ Style/AndOr:
87
+ Enabled: false
88
+
89
+ Style/BlockDelimiters:
90
+ Enabled: false
91
+
92
+ Style/BracesAroundHashParameters:
93
+ Enabled: false
94
+
95
+ Style/ClassAndModuleChildren:
96
+ Enabled: false
97
+
98
+ Style/ClassVars:
99
+ Enabled: false
100
+
101
+ Style/CollectionMethods:
102
+ Enabled: false
103
+
104
+ Style/ColonMethodCall:
105
+ Enabled: false
106
+
107
+ Style/CommentAnnotation:
108
+ Enabled: false
109
+
110
+ Style/ConditionalAssignment:
111
+ Enabled: false
112
+
113
+ Style/Documentation:
114
+ Enabled: false
115
+
116
+ Style/EmptyElse:
117
+ Enabled: false
118
+
119
+ Style/EmptyLineBetweenDefs:
120
+ Enabled: false
121
+
122
+ Style/EmptyLinesAroundAccessModifier:
123
+ Enabled: false
124
+
125
+ Style/EmptyLinesAroundBlockBody:
126
+ Enabled: false
127
+
128
+ Style/EmptyLinesAroundClassBody:
129
+ Enabled: false
130
+
131
+ Style/EmptyLinesAroundModuleBody:
132
+ Enabled: false
133
+
134
+ Style/ExtraSpacing:
135
+ Enabled: false
136
+
137
+ Style/FileName:
138
+ Enabled: false
139
+
140
+ Style/GuardClause:
141
+ Enabled: false
142
+
143
+ Style/IfUnlessModifier:
144
+ Enabled: false
145
+
146
+ Style/IndentHash:
147
+ Enabled: false
148
+
149
+ Style/Lambda:
150
+ Enabled: false
151
+
152
+ Style/MultilineBlockChain:
153
+ Enabled: false
154
+
155
+ Style/MultilineOperationIndentation:
156
+ Enabled: false
157
+
158
+ Style/MutableConstant:
159
+ Enabled: false
160
+
161
+ Style/Next:
162
+ Enabled: false
163
+
164
+ Style/NumericLiterals:
165
+ MinDigits: 10
166
+
167
+ Style/OneLineConditional:
168
+ Enabled: false
169
+
170
+ Style/ParallelAssignment:
171
+ Enabled: false
172
+
173
+ Style/PredicateName:
174
+ Enabled: false
175
+
176
+ Style/RedundantReturn:
177
+ Enabled: false
178
+
179
+ Style/RedundantSelf:
180
+ Enabled: false
181
+
182
+ Style/RegexpLiteral:
183
+ Enabled: false
184
+
185
+ Style/SelfAssignment:
186
+ Enabled: false
187
+
188
+ Style/Semicolon:
189
+ Enabled: false
190
+
191
+ Style/SignalException:
192
+ Enabled: false
193
+
194
+ Style/SingleLineMethods:
195
+ Enabled: false
196
+
197
+ Style/SpaceAroundOperators:
198
+ Enabled: false
199
+
200
+ Style/SpaceAfterColon:
201
+ Enabled: false
202
+
203
+ Style/SpaceAfterComma:
204
+ Enabled: false
205
+
206
+ Style/SpaceBeforeBlockBraces:
207
+ Enabled: false
208
+
209
+ Style/SpaceInsideBlockBraces:
210
+ Enabled: false
211
+
212
+ Style/SpaceInsideBrackets:
213
+ Enabled: false
214
+
215
+ Style/SpaceInsideHashLiteralBraces:
216
+ Enabled: false
217
+
218
+ Style/StringLiterals:
219
+ Enabled: false
220
+
221
+ Style/TrivialAccessors:
222
+ Enabled: false
223
+
224
+ Style/TrailingBlankLines:
225
+ Enabled: false
data/Gemfile CHANGED
@@ -1 +1,4 @@
1
- gem "omniauth-oauth2"
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omniauth-surveymonkey.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Jordan McKible
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md CHANGED
@@ -1,13 +1,14 @@
1
- #Surveymonkey Strategy
1
+ # OmniAuth SurveyMonkey
2
2
 
3
- SurveyMonkey OAuth2 strategy for OmniAuth 1.0.
3
+ This is the official OmniAuth strategy for authenticating to SurveyMonkey's v3 API. To use it, you'll need to sign up and create an app at the [SurveyMonkey Developer homepage](https://developer.surveymonkey.com/).
4
4
 
5
- #License
5
+ ## Basic Usage
6
+ ```
7
+ Rails.application.config.middleware.use OmniAuth::Builder do
8
+ provider :surveymonkey, ENV['SURVEYMONKEY_CLIENT_ID'], ENV['SURVEYMONKEY_API_KEY'], ENV['SURVEYMONKEY_SECRET']
9
+ end
10
+ ```
6
11
 
7
- Copyright (c) 2013 Kaushik SV
12
+ ## History
8
13
 
9
- 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:
10
-
11
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
12
-
13
- 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.
14
+ Version 1.0 of the gem was written and and maintained by Kaushik SV and is available at (https://github.com/kaushiksv/omniauth-surveymonkey)
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env rake
2
+ require 'bundler/gem_tasks'
3
+ require 'rspec/core/rake_task'
4
+
5
+ RSpec::Core::RakeTask.new
6
+
7
+ desc 'Run specs'
8
+ task default: :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'bundler/setup'
4
+ require 'test/gem'
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require 'pry'
11
+ # Pry.start
12
+
13
+ require 'irb'
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,4 @@
1
+ require 'faraday'
2
+ require 'multi_json'
3
+ require 'omniauth-surveymonkey/omniauth-surveymonkey/version'
4
+ require 'omniauth-surveymonkey/omniauth/strategies/surveymonkey'
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module SurveyMonkey
3
+ VERSION = '2.0.0'
4
+ end
5
+ end
@@ -0,0 +1,73 @@
1
+ module OmniAuth
2
+ module Strategies
3
+
4
+ class SurveyMonkey
5
+ include OmniAuth::Strategy
6
+
7
+ configure url: 'https://www.surveymonkey.com/oauth/authorize'
8
+
9
+ args [:client_id, :api_key, :client_secret]
10
+
11
+ def request_phase
12
+ hash = { client_id: options.client_id, api_key: options.api_key, redirect_uri: callback_url, response_type: 'code' }
13
+ redirect "#{options.url}?#{hash.to_query}"
14
+ end
15
+
16
+ def callback_phase
17
+ connection = ::Faraday.new url: 'https://api.surveymonkey.net' do |faraday|
18
+ faraday.request :url_encoded
19
+ faraday.response :logger
20
+ faraday.adapter ::Faraday.default_adapter
21
+ end
22
+
23
+ form_fields = {
24
+ client_id: options.client_id,
25
+ client_secret: options.client_secret,
26
+ code: request.params['code'],
27
+ redirect_uri: (full_host + callback_path),
28
+ grant_type: 'authorization_code'
29
+ }
30
+
31
+ response = connection.post "/oauth/token?api_key=#{options.api_key}", form_fields
32
+ json = ::MultiJson.load response.body
33
+ options.access_token = json['access_token']
34
+
35
+ connection.authorization :Bearer, options.access_token
36
+ info = connection.get "/v3/users/me?api_key=#{options.api_key}"
37
+ json = ::MultiJson.load info.body
38
+
39
+ options.username = json['username']
40
+ options.first_name = json['first_name']
41
+ options.last_name = json['last_name']
42
+ options.account_type = json['account_type']
43
+ options.language = json['language']
44
+ options.email = json['email']
45
+ options.surveymonkey_id = json['id'].to_i
46
+
47
+ super
48
+ end
49
+
50
+ uid do
51
+ options.surveymonkey_id
52
+ end
53
+
54
+ info do
55
+ {
56
+ account_type: options.account_type,
57
+ first_name: options.first_name,
58
+ last_name: options.last_name,
59
+ username: options.username,
60
+ language: options.language,
61
+ email: options.email
62
+ }
63
+ end
64
+
65
+ credentials do
66
+ { token: options.access_token }
67
+ end
68
+
69
+ end
70
+ end
71
+ end
72
+
73
+ OmniAuth.config.add_camelization 'surveymonkey', 'SurveyMonkey'
@@ -1,23 +1,28 @@
1
- require File.expand_path('../lib/omniauth/surveymonkey/version', __FILE__)
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'omniauth-surveymonkey/omniauth-surveymonkey/version'
2
5
 
3
- Gem::Specification.new do |gem|
4
- gem.add_dependency 'omniauth', '~> 1.0'
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'omniauth-surveymonkey'
8
+ spec.version = OmniAuth::SurveyMonkey::VERSION
9
+ spec.authors = ['Jordan McKible']
10
+ spec.email = ['jordanm@surveymonkey.com']
5
11
 
6
- gem.authors = ["Kaushik SV"]
7
- gem.email = ["speak2kaushik@gmail.com"]
8
- gem.description = %q{Survemonkey OAuth2 strategy for OmniAuth 1.0}
9
- gem.summary = %q{Survemonkey OAuth2 strategy for OmniAuth 1.0.}
12
+ spec.summary = 'OmniAuth strategy for the SurveyMonkey developer API'
13
+ spec.homepage = 'https://github.com/techvalidate/omniauth-surveymonkey'
14
+ spec.license = 'MIT'
10
15
 
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = 'exe'
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ['lib']
11
20
 
12
- gem.files = `git ls-files`.split("\n")
13
- gem.test_files = `git ls-files spec/*`.split("\n")
14
- gem.name = "omniauth-surveymonkey"
15
- gem.require_paths = ["lib"]
16
- gem.version = OmniAuth::Surveymonkey::VERSION
17
- gem.homepage = "https://github.com/kaushiksv/omniauth-surveymonkey"
21
+ spec.add_dependency 'omniauth', '~> 1.0'
22
+ spec.add_dependency 'faraday', '~> 0.9'
23
+ spec.add_dependency 'multi_json', '~> 1.12'
18
24
 
19
- gem.add_runtime_dependency 'omniauth-oauth2'
20
-
21
- gem.add_development_dependency 'rspec', '~> 1.3.1'
22
- gem.add_development_dependency 'rake'
23
- end
25
+ spec.add_development_dependency 'bundler', '~> 1.11'
26
+ spec.add_development_dependency 'rake', '~> 10.0'
27
+ spec.add_development_dependency 'rspec', '~> 3.0'
28
+ end
metadata CHANGED
@@ -1,124 +1,141 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: omniauth-surveymonkey
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 1
7
- - 0
8
- - 0
9
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 2.0.0
10
5
  platform: ruby
11
- authors:
12
- - Kaushik SV
6
+ authors:
7
+ - Jordan McKible
13
8
  autorequire:
14
- bindir: bin
9
+ bindir: exe
15
10
  cert_chain: []
16
-
17
- date: 2013-11-18 00:00:00 +05:30
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2016-07-05 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: omniauth
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.0'
20
+ type: :runtime
22
21
  prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- requirements:
25
- - - ~>
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 1
29
- - 0
30
- version: "1.0"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: faraday
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '0.9'
31
34
  type: :runtime
32
- version_requirements: *id001
33
- - !ruby/object:Gem::Dependency
34
- name: omniauth-oauth2
35
35
  prerelease: false
36
- requirement: &id002 !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- segments:
41
- - 0
42
- version: "0"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '0.9'
41
+ - !ruby/object:Gem::Dependency
42
+ name: multi_json
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '1.12'
43
48
  type: :runtime
44
- version_requirements: *id002
45
- - !ruby/object:Gem::Dependency
46
- name: rspec
47
49
  prerelease: false
48
- requirement: &id003 !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ~>
51
- - !ruby/object:Gem::Version
52
- segments:
53
- - 1
54
- - 3
55
- - 1
56
- version: 1.3.1
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '1.12'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.11'
57
62
  type: :development
58
- version_requirements: *id003
59
- - !ruby/object:Gem::Dependency
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.11'
69
+ - !ruby/object:Gem::Dependency
60
70
  name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
61
77
  prerelease: false
62
- requirement: &id004 !ruby/object:Gem::Requirement
63
- requirements:
64
- - - ">="
65
- - !ruby/object:Gem::Version
66
- segments:
67
- - 0
68
- version: "0"
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
69
90
  type: :development
70
- version_requirements: *id004
71
- description: Survemonkey OAuth2 strategy for OmniAuth 1.0
72
- email:
73
- - speak2kaushik@gmail.com
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ description:
98
+ email:
99
+ - jordanm@surveymonkey.com
74
100
  executables: []
75
-
76
101
  extensions: []
77
-
78
102
  extra_rdoc_files: []
79
-
80
- files:
103
+ files:
104
+ - ".gitignore"
105
+ - ".rspec"
106
+ - ".rubocop.yml"
81
107
  - Gemfile
82
- - Gemfile.lock
83
- - LICENSE
108
+ - LICENSE.txt
84
109
  - README.md
85
- - init.rb
86
- - lib/omniauth-surveymonkey.rb
87
- - lib/omniauth/strategies/surveymonkey.rb
88
- - lib/omniauth/surveymonkey.rb
89
- - lib/omniauth/surveymonkey/version.rb
110
+ - Rakefile
111
+ - bin/console
112
+ - bin/setup
113
+ - lib/omniauth-surveymonkey/omniauth-surveymonkey.rb
114
+ - lib/omniauth-surveymonkey/omniauth-surveymonkey/version.rb
115
+ - lib/omniauth-surveymonkey/omniauth/strategies/surveymonkey.rb
90
116
  - omniauth-surveymonkey.gemspec
91
- - omniauth-surveymonkey.rb
92
- - spec/omniauth/strategies/surveymonkey_spec.rb
93
- has_rdoc: true
94
- homepage: https://github.com/kaushiksv/omniauth-surveymonkey
95
- licenses: []
96
-
117
+ homepage: https://github.com/techvalidate/omniauth-surveymonkey
118
+ licenses:
119
+ - MIT
120
+ metadata: {}
97
121
  post_install_message:
98
122
  rdoc_options: []
99
-
100
- require_paths:
123
+ require_paths:
101
124
  - lib
102
- required_ruby_version: !ruby/object:Gem::Requirement
103
- requirements:
125
+ required_ruby_version: !ruby/object:Gem::Requirement
126
+ requirements:
104
127
  - - ">="
105
- - !ruby/object:Gem::Version
106
- segments:
107
- - 0
108
- version: "0"
109
- required_rubygems_version: !ruby/object:Gem::Requirement
110
- requirements:
128
+ - !ruby/object:Gem::Version
129
+ version: '0'
130
+ required_rubygems_version: !ruby/object:Gem::Requirement
131
+ requirements:
111
132
  - - ">="
112
- - !ruby/object:Gem::Version
113
- segments:
114
- - 0
115
- version: "0"
133
+ - !ruby/object:Gem::Version
134
+ version: '0'
116
135
  requirements: []
117
-
118
136
  rubyforge_project:
119
- rubygems_version: 1.3.6
137
+ rubygems_version: 2.6.6
120
138
  signing_key:
121
- specification_version: 3
122
- summary: Survemonkey OAuth2 strategy for OmniAuth 1.0.
123
- test_files:
124
- - spec/omniauth/strategies/surveymonkey_spec.rb
139
+ specification_version: 4
140
+ summary: OmniAuth strategy for the SurveyMonkey developer API
141
+ test_files: []
data/Gemfile.lock DELETED
@@ -1,23 +0,0 @@
1
- GEM
2
- specs:
3
- faraday (0.8.0)
4
- multipart-post (~> 1.1)
5
- hashie (1.2.0)
6
- multi_json (1.3.6)
7
- multipart-post (1.2.0)
8
- oauth2 (0.5.2)
9
- faraday (~> 0.7)
10
- multi_json (~> 1.0)
11
- omniauth (1.0.0)
12
- hashie (~> 1.2)
13
- rack
14
- omniauth-oauth2 (1.0.0)
15
- oauth2 (~> 0.5.0)
16
- omniauth (~> 1.0)
17
- rack (1.1.6)
18
-
19
- PLATFORMS
20
- ruby
21
-
22
- DEPENDENCIES
23
- omniauth-oauth2
data/LICENSE DELETED
@@ -1,7 +0,0 @@
1
- Copyright (c) 2013 Kaushik SV
2
-
3
- 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:
4
-
5
- The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
6
-
7
- 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.
data/init.rb DELETED
@@ -1 +0,0 @@
1
- require 'omniauth-surveymonkey'
@@ -1 +0,0 @@
1
- require "omniauth/surveymonkey"
@@ -1,24 +0,0 @@
1
- require 'omniauth/strategies/oauth2'
2
-
3
- module OmniAuth
4
- module Strategies
5
- class Surveymonkey < OmniAuth::Strategies::OAuth2
6
-
7
- option :name, "surveymonkey"
8
-
9
- option :client_options, {
10
- :site => "https://api.surveymonkey.com",
11
- :authorize_url => '/oauth/authorize',
12
- :token_url => '/oauth/token'
13
- }
14
-
15
- option :authorize_options, [:api_key]
16
-
17
- def callback_phase
18
- options[:client_options][:token_url] = "/oauth/token?api_key=#{options[:api_key]}"
19
- super
20
- end
21
-
22
- end
23
- end
24
- end
@@ -1 +0,0 @@
1
- require 'omniauth/strategies/surveymonkey'
@@ -1,5 +0,0 @@
1
- module OmniAuth
2
- module Surveymonkey
3
- VERSION = "1.0.0"
4
- end
5
- end
@@ -1 +0,0 @@
1
- require 'omniauth-surveymonkey'
@@ -1,29 +0,0 @@
1
- require 'omniauth-surveymonkey'
2
-
3
- describe OmniAuth::Strategies::Surveymonkey do
4
-
5
- subject do
6
- OmniAuth::Strategies::Surveymonkey.new(nil, {})
7
- end
8
-
9
- describe '#client' do
10
-
11
- it 'has correct surveymonkey api site' do
12
- subject.options.client_options.site.should == ('https://api.surveymonkey.com')
13
- end
14
-
15
- it 'has correct access token path' do
16
- subject.options.client_options.token_url.should == ('/oauth/token')
17
- end
18
-
19
- it 'has correct authorize url' do
20
- subject.options.client_options.authorize_url.should == ('/oauth/authorize')
21
- end
22
- end
23
-
24
- describe '#callback_path' do
25
- it 'should have the correct callback path' do
26
- subject.callback_path.should == ('/auth/surveymonkey/callback')
27
- end
28
- end
29
- end