omniauth-surveymonkey 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1 @@
1
+ gem "omniauth-oauth2"
data/Gemfile.lock ADDED
@@ -0,0 +1,23 @@
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 ADDED
@@ -0,0 +1,7 @@
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/README.md ADDED
@@ -0,0 +1,13 @@
1
+ #Surveymonkey Strategy
2
+
3
+ SurveyMonkey OAuth2 strategy for OmniAuth 1.0.
4
+
5
+ #License
6
+
7
+ Copyright (c) 2013 Kaushik SV
8
+
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.
data/init.rb ADDED
@@ -0,0 +1 @@
1
+ require 'omniauth-surveymonkey'
@@ -0,0 +1,16 @@
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
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ module OmniAuth
2
+ module Surveymonkey
3
+ VERSION = "0.0.0"
4
+ end
5
+ end
@@ -0,0 +1 @@
1
+ require 'omniauth/strategies/surveymonkey'
@@ -0,0 +1 @@
1
+ require "omniauth/surveymonkey"
@@ -0,0 +1,23 @@
1
+ require File.expand_path('../lib/omniauth/surveymonkey/version', __FILE__)
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.add_dependency 'omniauth', '~> 1.0'
5
+
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.}
10
+
11
+
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"
18
+
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
@@ -0,0 +1 @@
1
+ require 'omniauth-surveymonkey'
@@ -0,0 +1,29 @@
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
metadata ADDED
@@ -0,0 +1,137 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: omniauth-surveymonkey
3
+ version: !ruby/object:Gem::Version
4
+ hash: 31
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 0
10
+ version: 0.0.0
11
+ platform: ruby
12
+ authors:
13
+ - Kaushik SV
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2013-06-21 00:00:00 +05:30
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: omniauth
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ hash: 15
30
+ segments:
31
+ - 1
32
+ - 0
33
+ version: "1.0"
34
+ type: :runtime
35
+ version_requirements: *id001
36
+ - !ruby/object:Gem::Dependency
37
+ name: omniauth-oauth2
38
+ prerelease: false
39
+ requirement: &id002 !ruby/object:Gem::Requirement
40
+ none: false
41
+ requirements:
42
+ - - ">="
43
+ - !ruby/object:Gem::Version
44
+ hash: 3
45
+ segments:
46
+ - 0
47
+ version: "0"
48
+ type: :runtime
49
+ version_requirements: *id002
50
+ - !ruby/object:Gem::Dependency
51
+ name: rspec
52
+ prerelease: false
53
+ requirement: &id003 !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ~>
57
+ - !ruby/object:Gem::Version
58
+ hash: 25
59
+ segments:
60
+ - 1
61
+ - 3
62
+ - 1
63
+ version: 1.3.1
64
+ type: :development
65
+ version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: rake
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :development
79
+ version_requirements: *id004
80
+ description: Survemonkey OAuth2 strategy for OmniAuth 1.0
81
+ email:
82
+ - speak2kaushik@gmail.com
83
+ executables: []
84
+
85
+ extensions: []
86
+
87
+ extra_rdoc_files: []
88
+
89
+ files:
90
+ - Gemfile
91
+ - Gemfile.lock
92
+ - LICENSE
93
+ - README.md
94
+ - init.rb
95
+ - lib/omniauth-surveymonkey.rb
96
+ - lib/omniauth/strategies/surveymonkey.rb
97
+ - lib/omniauth/surveymonkey.rb
98
+ - lib/omniauth/surveymonkey/version.rb
99
+ - omniauth-surveymonkey.gemspec
100
+ - omniauth-surveymonkey.rb
101
+ - spec/omniauth/strategies/surveymonkey_spec.rb
102
+ has_rdoc: true
103
+ homepage: https://github.com/kaushiksv/omniauth-surveymonkey
104
+ licenses: []
105
+
106
+ post_install_message:
107
+ rdoc_options: []
108
+
109
+ require_paths:
110
+ - lib
111
+ required_ruby_version: !ruby/object:Gem::Requirement
112
+ none: false
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ hash: 3
117
+ segments:
118
+ - 0
119
+ version: "0"
120
+ required_rubygems_version: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ hash: 3
126
+ segments:
127
+ - 0
128
+ version: "0"
129
+ requirements: []
130
+
131
+ rubyforge_project:
132
+ rubygems_version: 1.5.3
133
+ signing_key:
134
+ specification_version: 3
135
+ summary: Survemonkey OAuth2 strategy for OmniAuth 1.0.
136
+ test_files:
137
+ - spec/omniauth/strategies/surveymonkey_spec.rb