omniauth-createsend 1.0.0 → 1.0.1
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.
- data/Gemfile.lock +4 -4
- data/README.md +19 -4
- data/example/config.ru +2 -2
- data/lib/omniauth/createsend/version.rb +1 -1
- data/omniauth-createsend.gemspec +1 -1
- metadata +5 -5
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-createsend (1.0.
|
4
|
+
omniauth-createsend (1.0.1)
|
5
5
|
omniauth-oauth2 (~> 1.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -14,7 +14,7 @@ GEM
|
|
14
14
|
httpauth (0.2.0)
|
15
15
|
jwt (0.1.5)
|
16
16
|
multi_json (>= 1.0)
|
17
|
-
multi_json (1.
|
17
|
+
multi_json (1.6.0)
|
18
18
|
multipart-post (1.1.5)
|
19
19
|
oauth2 (0.8.0)
|
20
20
|
faraday (~> 0.8)
|
@@ -22,13 +22,13 @@ GEM
|
|
22
22
|
jwt (~> 0.1.4)
|
23
23
|
multi_json (~> 1.0)
|
24
24
|
rack (~> 1.2)
|
25
|
-
omniauth (1.1.
|
25
|
+
omniauth (1.1.2)
|
26
26
|
hashie (~> 1.2)
|
27
27
|
rack
|
28
28
|
omniauth-oauth2 (1.1.1)
|
29
29
|
oauth2 (~> 0.8.0)
|
30
30
|
omniauth (~> 1.0)
|
31
|
-
rack (1.5.
|
31
|
+
rack (1.5.2)
|
32
32
|
rake (10.0.3)
|
33
33
|
rspec (2.12.0)
|
34
34
|
rspec-core (~> 2.12.0)
|
data/README.md
CHANGED
@@ -1,26 +1,41 @@
|
|
1
1
|
# OmniAuth CreateSend
|
2
|
+
[][travis] [][gemnasium] [][gembadge]
|
2
3
|
|
3
4
|
This is the official [OmniAuth](http://www.omniauth.org/) 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
5
|
|
6
|
+
[travis]: http://travis-ci.org/jdennes/omniauth-createsend
|
7
|
+
[gemnasium]: https://gemnasium.com/jdennes/omniauth-createsend
|
8
|
+
[gembadge]: http://badge.fury.io/rb/omniauth-createsend
|
9
|
+
|
5
10
|
## Installing
|
6
11
|
|
7
|
-
Add a dependency
|
12
|
+
Add a dependency to your `Gemfile` then `bundle install`.
|
8
13
|
|
9
14
|
```ruby
|
10
15
|
gem 'omniauth-createsend'
|
11
16
|
```
|
12
17
|
|
13
|
-
Then `bundle install`.
|
14
|
-
|
15
18
|
## Basic Usage
|
16
19
|
|
20
|
+
In Rack applications:
|
21
|
+
|
17
22
|
```ruby
|
18
23
|
use OmniAuth::Builder do
|
19
24
|
provider "createsend", ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET'], :scope => 'ViewReports,CreateCampaigns,SendCampaigns'
|
20
25
|
end
|
21
26
|
```
|
22
27
|
|
23
|
-
|
28
|
+
In Rails applications:
|
29
|
+
|
30
|
+
```ruby
|
31
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
32
|
+
provider "createsend", ENV['CREATESEND_CLIENT_ID'], ENV['CREATESEND_CLIENT_SECRET'], :scope => 'ViewReports,CreateCampaigns,SendCampaigns'
|
33
|
+
end
|
34
|
+
```
|
35
|
+
|
36
|
+
This gem also includes an [example](https://github.com/jdennes/omniauth-createsend/blob/master/example/config.ru) Rack application which demonstrates how to authenticate with the Campaign Monitor API using this OmniAuth strategy.
|
37
|
+
|
38
|
+
Once you've authenticated, you should use the [createsend](http://campaignmonitor.github.com/createsend-ruby/) gem to access Campaign Monitor resources.
|
24
39
|
|
25
40
|
## Contributing
|
26
41
|
1. Fork the repository
|
data/example/config.ru
CHANGED
@@ -8,8 +8,8 @@ class App < Sinatra::Base
|
|
8
8
|
end
|
9
9
|
|
10
10
|
get '/auth/createsend/callback' do
|
11
|
-
response = "Your user is successfully authenticated. Here are
|
12
|
-
response << "token: #{request.env['omniauth.auth']['credentials']['token']}<br/>"
|
11
|
+
response = "Your user is successfully authenticated. Here are the details you need:<br/><br/>"
|
12
|
+
response << "access token: #{request.env['omniauth.auth']['credentials']['token']}<br/>"
|
13
13
|
response << "refresh token: #{request.env['omniauth.auth']['credentials']['refresh_token']}<br/>"
|
14
14
|
response << "expires at: #{request.env['omniauth.auth']['credentials']['expires_at']}<br/>"
|
15
15
|
response
|
data/omniauth-createsend.gemspec
CHANGED
@@ -10,6 +10,7 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.email = ['jdennes@gmail.com']
|
11
11
|
s.summary = 'Official OmniAuth strategy for the Campaign Monitor API.'
|
12
12
|
s.description = 'The official OmniAuth strategy for authenticating with the Campaign Monitor API.'
|
13
|
+
s.homepage = 'https://github.com/jdennes/omniauth-createsend/'
|
13
14
|
|
14
15
|
s.files = `git ls-files`.split("\n")
|
15
16
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
@@ -17,7 +18,6 @@ Gem::Specification.new do |s|
|
|
17
18
|
s.require_paths = ['lib']
|
18
19
|
|
19
20
|
s.add_runtime_dependency 'omniauth-oauth2', '~> 1.1'
|
20
|
-
|
21
21
|
s.add_development_dependency 'rspec', '~> 2.12'
|
22
22
|
s.add_development_dependency 'rake'
|
23
23
|
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: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-24 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth-oauth2
|
@@ -83,7 +83,7 @@ files:
|
|
83
83
|
- omniauth-createsend.gemspec
|
84
84
|
- spec/omniauth/strategies/createsend_spec.rb
|
85
85
|
- spec/spec_helper.rb
|
86
|
-
homepage:
|
86
|
+
homepage: https://github.com/jdennes/omniauth-createsend/
|
87
87
|
licenses: []
|
88
88
|
post_install_message:
|
89
89
|
rdoc_options: []
|
@@ -97,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
97
97
|
version: '0'
|
98
98
|
segments:
|
99
99
|
- 0
|
100
|
-
hash:
|
100
|
+
hash: 1289819948662204167
|
101
101
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
102
102
|
none: false
|
103
103
|
requirements:
|
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
106
|
version: '0'
|
107
107
|
segments:
|
108
108
|
- 0
|
109
|
-
hash:
|
109
|
+
hash: 1289819948662204167
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
112
|
rubygems_version: 1.8.24
|