omniauth-surveymonkey2 0.0.11 → 0.0.12

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: 6e39c53c87c6e2d51994afa5aeb529d76fbc259a
4
- data.tar.gz: 2ae8071f0eaf87ad4cbab4fcf51324041553df8d
3
+ metadata.gz: 9aa7cee07f5e3c12d2ce6a65f4b481e8f6542782
4
+ data.tar.gz: 8a3af27c447d9f1f81bb7b0ab5c04d83aa0741fa
5
5
  SHA512:
6
- metadata.gz: cc5ff1defd161d2c8515e7fde66cf992bb98e434c3722ff1b34ce5625d3365585d7b7328bd77fd5476ceda27b9bab49a384750aa21d393c70e2b744121f248dc
7
- data.tar.gz: f3cb0d987a418da94ea052500adc5d433fd5ff00a32912d7f3b8806031602d1732ee3f0813c8ee76beaf5d3ad6e4b9592c3733e942acc3be13a70e2c81a7ff5d
6
+ metadata.gz: cfb428c35dd51eeb5d2bd4a6c9a4b23168c0f148d220b75330c200cb5fef502b4d12f6a7fa2053a23ebc8ebfefb96cc06faff22240165c5233664645307a01df
7
+ data.tar.gz: 476cb8a0012aac6869077da86a05ccfb913f1aafad44463a48324cbd86ce6e32b301ce44b667e839ea7a5e2fae81d966d6e628d2aeb21363fe40a3aeeefa40b6
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/Gemfile CHANGED
@@ -1 +1,4 @@
1
- gem "omniauth-oauth2"
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in omniauth-surveymonkey2.gemspec
4
+ gemspec
File without changes
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -10,7 +10,7 @@ module OmniAuth
10
10
  option :name, "surveymonkey2"
11
11
 
12
12
  option :client_options, {
13
- :site => "https://api-surveymonkey-com-fytofsd4ktc2.runscope.net",
13
+ :site => "https://api.surveymonkey.com",
14
14
  :authorize_url => '/oauth/authorize',
15
15
  :token_url => '/oauth/token'
16
16
  }
@@ -54,4 +54,4 @@ module OmniAuth
54
54
  end
55
55
  end
56
56
  end
57
- end
57
+ end
@@ -1,5 +1,5 @@
1
- module OmniAuth
1
+ module Omniauth
2
2
  module Surveymonkey2
3
- VERSION = "0.0.11"
3
+ VERSION = "0.0.12"
4
4
  end
5
- end
5
+ end
@@ -1 +1 @@
1
- require "omniauth/surveymonkey2"
1
+ require_relative "omniauth/strategies/surveymonkey2"
@@ -1,23 +1,26 @@
1
+ # coding: utf-8
1
2
  require File.expand_path('../lib/omniauth/surveymonkey2/version', __FILE__)
2
3
 
3
- Gem::Specification.new do |gem|
4
- gem.add_dependency 'omniauth', '~> 1.0'
4
+ Gem::Specification.new do |spec|
5
+ spec.name = "omniauth-surveymonkey2"
6
+ spec.version = Omniauth::Surveymonkey2::VERSION
7
+ spec.authors = ["Chris Beck"]
8
+ spec.email = ["chris.beck@me.com"]
9
+ spec.description = %q{An alternative Survey Monkey strategy for OmniAuth that retrieves a long-term access token.}
10
+ spec.summary = %q{STILL IN DEV. CHECK BACK SOON. An alternative Survey Monkey strategy for OmniAuth that retrieves a long-term access token.}
11
+ spec.homepage = "https://github.com/cbeck/omniauth-surveymonkey2"
12
+ spec.license = "MIT"
5
13
 
6
- gem.authors = ["Chris Beck"]
7
- gem.email = ["chris.beck@me.com"]
8
- gem.description = %q{Survemonkey OAuth2 strategy for OmniAuth 1.0}
9
- gem.summary = %q{Survemonkey OAuth2 strategy for OmniAuth 1.0.}
14
+ spec.files = `git ls-files`.split("\n")
15
+ spec.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
16
+ spec.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
+ spec.require_paths = ["lib"]
10
18
 
19
+ spec.add_runtime_dependency 'omniauth-oauth2'
11
20
 
12
- gem.files = `git ls-files`.split("\n")
13
- gem.test_files = `git ls-files spec/*`.split("\n")
14
- gem.name = "omniauth-surveymonkey2"
15
- gem.require_paths = ["lib"]
16
- gem.version = OmniAuth::Surveymonkey2::VERSION
17
- gem.homepage = "https://github.com/cbeck/omniauth-surveymonkey2"
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
21
+ spec.add_development_dependency "bundler", "~> 1.3"
22
+ spec.add_development_dependency "rake"
23
+ spec.add_development_dependency 'rspec', '~> 2.8'
24
+ spec.add_development_dependency 'rack-test'
25
+ spec.add_development_dependency 'simplecov'
26
+ end
@@ -1,13 +1,14 @@
1
+ require 'spec_helper'
1
2
  require 'omniauth-surveymonkey2'
2
3
 
3
4
  describe OmniAuth::Strategies::Surveymonkey2 do
4
-
5
5
  subject do
6
- OmniAuth::Strategies::Surveymonkey2.new(nil, {})
6
+ OmniAuth::Strategies::Surveymonkey2.new(nil, @options || {})
7
7
  end
8
8
 
9
- describe '#client' do
9
+ it_should_behave_like 'an oauth2 strategy'
10
10
 
11
+ describe '#client' do
11
12
  it 'has correct surveymonkey api site' do
12
13
  subject.options.client_options.site.should == ('https://api.surveymonkey.com')
13
14
  end
@@ -21,9 +22,9 @@ describe OmniAuth::Strategies::Surveymonkey2 do
21
22
  end
22
23
  end
23
24
 
24
- describe '#callback_path' do
25
+ describe '#callback_path' do
25
26
  it 'should have the correct callback path' do
26
- subject.callback_path.should == ('/auth/surveymonkey2/callback')
27
+ subject.callback_path.should == ('/auth/surveymonkey/callback')
27
28
  end
28
29
  end
29
30
  end
@@ -0,0 +1,15 @@
1
+ $:.unshift File.expand_path('..', __FILE__)
2
+ $:.unshift File.expand_path('../../lib', __FILE__)
3
+ require 'simplecov'
4
+ SimpleCov.start
5
+ require 'rspec'
6
+ require 'rack/test'
7
+ require 'omniauth'
8
+ require 'omniauth-surveymonkey2'
9
+
10
+ Dir[File.expand_path('../support/**/*', __FILE__)].each { |f| require f }
11
+
12
+ RSpec.configure do |config|
13
+ config.include Rack::Test::Methods
14
+ config.extend OmniAuth::Test::StrategyMacros, :type => :strategy
15
+ end
@@ -0,0 +1,36 @@
1
+ shared_examples 'an oauth2 strategy' do
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'
6
+ end
7
+ end
8
+
9
+ 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')
14
+ end
15
+
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')
20
+ end
21
+ end
22
+
23
+ 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')
28
+ end
29
+
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')
34
+ end
35
+ end
36
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-surveymonkey2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beck
@@ -11,27 +11,41 @@ cert_chain: []
11
11
  date: 2013-12-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: omniauth
14
+ name: omniauth-oauth2
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
- version: '1.0'
19
+ version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '1.3'
34
+ type: :development
35
+ prerelease: false
22
36
  version_requirements: !ruby/object:Gem::Requirement
23
37
  requirements:
24
38
  - - ~>
25
39
  - !ruby/object:Gem::Version
26
- version: '1.0'
40
+ version: '1.3'
27
41
  - !ruby/object:Gem::Dependency
28
- name: omniauth-oauth2
42
+ name: rake
29
43
  requirement: !ruby/object:Gem::Requirement
30
44
  requirements:
31
45
  - - '>='
32
46
  - !ruby/object:Gem::Version
33
47
  version: '0'
34
- type: :runtime
48
+ type: :development
35
49
  prerelease: false
36
50
  version_requirements: !ruby/object:Gem::Requirement
37
51
  requirements:
@@ -44,16 +58,30 @@ dependencies:
44
58
  requirements:
45
59
  - - ~>
46
60
  - !ruby/object:Gem::Version
47
- version: 1.3.1
61
+ version: '2.8'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - ~>
53
67
  - !ruby/object:Gem::Version
54
- version: 1.3.1
68
+ version: '2.8'
55
69
  - !ruby/object:Gem::Dependency
56
- name: rake
70
+ name: rack-test
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - '>='
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - '>='
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: simplecov
57
85
  requirement: !ruby/object:Gem::Requirement
58
86
  requirements:
59
87
  - - '>='
@@ -66,29 +94,29 @@ dependencies:
66
94
  - - '>='
67
95
  - !ruby/object:Gem::Version
68
96
  version: '0'
69
- description: Survemonkey OAuth2 strategy for OmniAuth 1.0
97
+ description: An alternative Survey Monkey strategy for OmniAuth that retrieves a long-term
98
+ access token.
70
99
  email:
71
100
  - chris.beck@me.com
72
101
  executables: []
73
102
  extensions: []
74
103
  extra_rdoc_files: []
75
104
  files:
105
+ - .gitignore
76
106
  - Gemfile
77
- - Gemfile.lock
78
- - LICENSE
107
+ - LICENSE.txt
79
108
  - README.md
80
- - init.rb
109
+ - Rakefile
81
110
  - lib/omniauth-surveymonkey2.rb
82
- - lib/omniauth/strategies/surveymonkey2.rb
83
- - lib/omniauth/surveymonkey2.rb
111
+ - lib/omniauth/strategies/surverymonkey2.rb
84
112
  - lib/omniauth/surveymonkey2/version.rb
85
- - omniauth-surveymonkey2-0.0.10.gem
86
- - omniauth-surveymonkey2-0.0.9.gem
87
113
  - omniauth-surveymonkey2.gemspec
88
- - omniauth-surveymonkey2.rb
89
114
  - spec/omniauth/strategies/surveymonkey2_spec.rb
115
+ - spec/spec_helper.rb
116
+ - spec/support/shared_examples.rb
90
117
  homepage: https://github.com/cbeck/omniauth-surveymonkey2
91
- licenses: []
118
+ licenses:
119
+ - MIT
92
120
  metadata: {}
93
121
  post_install_message:
94
122
  rdoc_options: []
@@ -109,6 +137,9 @@ rubyforge_project:
109
137
  rubygems_version: 2.1.5
110
138
  signing_key:
111
139
  specification_version: 4
112
- summary: Survemonkey OAuth2 strategy for OmniAuth 1.0.
140
+ summary: STILL IN DEV. CHECK BACK SOON. An alternative Survey Monkey strategy for
141
+ OmniAuth that retrieves a long-term access token.
113
142
  test_files:
114
143
  - spec/omniauth/strategies/surveymonkey2_spec.rb
144
+ - spec/spec_helper.rb
145
+ - spec/support/shared_examples.rb
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/init.rb DELETED
@@ -1 +0,0 @@
1
- require 'omniauth-surveymonkey2'
@@ -1 +0,0 @@
1
- require 'omniauth/strategies/surveymonkey2'
Binary file
Binary file
@@ -1 +0,0 @@
1
- require 'omniauth-surveymonkey2'