omniauth-createsend 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,5 +1,3 @@
1
1
  source :rubygems
2
2
 
3
3
  gemspec
4
-
5
- gem 'omniauth-oauth2', :git => 'git://github.com/intridea/omniauth-oauth2.git'
data/Gemfile.lock CHANGED
@@ -1,15 +1,7 @@
1
- GIT
2
- remote: git://github.com/intridea/omniauth-oauth2.git
3
- revision: 032c21f2585047b8a7bb335f4f64697f0e6247ab
4
- specs:
5
- omniauth-oauth2 (1.1.1)
6
- oauth2 (~> 0.8.0)
7
- omniauth (~> 1.0)
8
-
9
1
  PATH
10
2
  remote: .
11
3
  specs:
12
- omniauth-createsend (0.0.1)
4
+ omniauth-createsend (0.0.2)
13
5
  omniauth-oauth2 (~> 1.1)
14
6
 
15
7
  GEM
@@ -33,6 +25,9 @@ GEM
33
25
  omniauth (1.1.1)
34
26
  hashie (~> 1.2)
35
27
  rack
28
+ omniauth-oauth2 (1.1.1)
29
+ oauth2 (~> 0.8.0)
30
+ omniauth (~> 1.0)
36
31
  rack (1.5.1)
37
32
  rake (10.0.3)
38
33
  rspec (2.12.0)
@@ -49,6 +44,5 @@ PLATFORMS
49
44
 
50
45
  DEPENDENCIES
51
46
  omniauth-createsend!
52
- omniauth-oauth2!
53
47
  rake
54
48
  rspec (~> 2.12)
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # OmniAuth CreateSend
2
2
 
3
- This is the official OmniAuth strategy for authenticating with the [Campaign Monitor API](http://www.campaignmonitor.com/api/). The first thing you need to do is register an OAuth2 Application in your Campaign Monitor account to get a Client ID and Client Secret to use with this OmniAuth strategy.
3
+ This is the official OmniAuth strategy for authenticating with the [Campaign Monitor API](http://www.campaignmonitor.com/api/). You'll need to register an OAuth Application in your Campaign Monitor account to get a Client ID and Client Secret to use with this OmniAuth strategy.
4
4
 
5
5
  ## Installing
6
6
 
@@ -16,6 +16,6 @@ Then `bundle install`.
16
16
 
17
17
  ```ruby
18
18
  use OmniAuth::Builder do
19
- provider "createsend", ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET']
19
+ provider "createsend", ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET'], :scope => 'ViewReports,CreateCampaigns,SendCampaigns'
20
20
  end
21
21
  ```
data/example/config.ru CHANGED
@@ -7,9 +7,12 @@ class App < Sinatra::Base
7
7
  redirect '/auth/createsend'
8
8
  end
9
9
 
10
- get '/auth/:provider/callback' do
11
- content_type 'application/json'
12
- MultiJson.encode(request.env)
10
+ get '/auth/createsend/callback' do
11
+ response = "Your user is successfully authenticated. Here are you details you need:<br/><br/>"
12
+ response << "token: #{request.env['omniauth.auth']['credentials']['token']}<br/>"
13
+ response << "refresh token: #{request.env['omniauth.auth']['credentials']['refresh_token']}<br/>"
14
+ response << "expires at: #{request.env['omniauth.auth']['credentials']['expires_at']}<br/>"
15
+ response
13
16
  end
14
17
 
15
18
  get '/auth/failure' do
@@ -22,7 +25,7 @@ use Rack::Session::Cookie
22
25
 
23
26
  use OmniAuth::Builder do
24
27
  provider :createsend, ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET'],
25
- :scope => 'ViewReports,ManageLists,CreateCampaigns,ImportSubscribers,SendCampaigns,ViewSubscribersInReports,ManageTemplates'
28
+ :scope => 'ViewReports,CreateCampaigns,SendCampaigns'
26
29
  end
27
30
 
28
31
  run App.new
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module CreateSend
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -25,8 +25,4 @@ describe OmniAuth::Strategies::CreateSend do
25
25
  subject.callback_path.should eq('/auth/createsend/callback')
26
26
  end
27
27
  end
28
-
29
- describe '#authorize_params' do
30
- # TODO: Add tests for #authorize_params
31
- end
32
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-createsend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -98,7 +98,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  segments:
100
100
  - 0
101
- hash: 500429770990697851
101
+ hash: -4366650925290382885
102
102
  required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  none: false
104
104
  requirements:
@@ -107,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  segments:
109
109
  - 0
110
- hash: 500429770990697851
110
+ hash: -4366650925290382885
111
111
  requirements: []
112
112
  rubyforge_project:
113
113
  rubygems_version: 1.8.24