omniauth-cloud66 0.1.0 → 0.1.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/README.md +20 -11
- data/example/Gemfile +6 -0
- data/example/config.ru +24 -0
- data/lib/omniauth-cloud66/version.rb +1 -1
- data/omniauth-cloud66.gemspec +1 -1
- metadata +6 -4
data/README.md
CHANGED
@@ -11,27 +11,36 @@ Now you can register your API client. Click on New Application button and enter
|
|
11
11
|
|
12
12
|
For more info visit [Cloud 66 official docs](https://www.cloud66.com/help).
|
13
13
|
|
14
|
-
##
|
14
|
+
## Usage
|
15
|
+
|
16
|
+
Add the strategy to your `Gemfile`:
|
15
17
|
|
16
18
|
```ruby
|
17
|
-
|
18
|
-
provider :cloud66, ENV['CLIENT_ID'], ENV['CLIENT_SECRET']
|
19
|
-
end
|
19
|
+
gem 'omniauth-cloud66'
|
20
20
|
```
|
21
21
|
|
22
|
-
|
22
|
+
Then integrate the strategy into your middleware:
|
23
|
+
|
24
|
+
```ruby
|
25
|
+
use OmniAuth::Builder do
|
26
|
+
provider :cloud66, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'], scope: "public,redeploy"
|
27
|
+
end
|
28
|
+
```
|
23
29
|
|
24
|
-
|
30
|
+
In Rails, you'll want to add to the middleware stack:
|
25
31
|
|
26
32
|
```ruby
|
27
|
-
|
28
|
-
|
29
|
-
|
33
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
34
|
+
provider :cloud66, ENV['CLIENT_ID'], ENV['CLIENT_SECRET'], scope: "public,redeploy"
|
35
|
+
end
|
30
36
|
```
|
31
37
|
|
32
|
-
|
38
|
+
|
39
|
+
For additional information, refer to the [OmniAuth wiki](https://github.com/intridea/omniauth/wiki).
|
40
|
+
|
41
|
+
See the [example](https://github.com/rastasheep/omniauth-cloud66/blob/master/example/config.ru) Sinatra app for full examples
|
33
42
|
|
34
43
|
## License
|
35
44
|
|
36
45
|
omniauth-cloud66 is released under the MIT License.
|
37
|
-
Developed by [
|
46
|
+
Developed by [Aleksandar Diklic](https://github.com/rastasheep).
|
data/example/Gemfile
ADDED
data/example/config.ru
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'sinatra'
|
4
|
+
require 'omniauth-cloud66'
|
5
|
+
|
6
|
+
get '/' do
|
7
|
+
redirect '/auth/cloud66'
|
8
|
+
end
|
9
|
+
|
10
|
+
get '/auth/:provider/callback' do
|
11
|
+
content_type 'text/plain'
|
12
|
+
request.env['omniauth.auth'].to_hash.inspect rescue "No Data"
|
13
|
+
end
|
14
|
+
|
15
|
+
get '/auth/failure' do
|
16
|
+
content_type 'text/plain'
|
17
|
+
request.env['omniauth.auth'].to_hash.inspect rescue "No Data"
|
18
|
+
end
|
19
|
+
|
20
|
+
use Rack::Session::Cookie
|
21
|
+
|
22
|
+
use OmniAuth::Builder do
|
23
|
+
provider :cloud66, ENV['CONSUMER_KEY'], ENV['CONSUMER_SECRET'], scope: "public,redeploy"
|
24
|
+
end
|
data/omniauth-cloud66.gemspec
CHANGED
@@ -16,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.version = OmniAuth::Cloud66::VERSION
|
17
17
|
|
18
18
|
gem.add_dependency 'omniauth', '~> 1.0'
|
19
|
-
gem.add_dependency 'omniauth-oauth2', '~> 1.
|
19
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.0'
|
20
20
|
gem.add_development_dependency 'rspec', '~> 2.7'
|
21
21
|
gem.add_development_dependency 'rack-test'
|
22
22
|
gem.add_development_dependency 'simplecov'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-cloud66
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.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-09-
|
12
|
+
date: 2013-09-09 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: omniauth
|
@@ -34,7 +34,7 @@ dependencies:
|
|
34
34
|
requirements:
|
35
35
|
- - ~>
|
36
36
|
- !ruby/object:Gem::Version
|
37
|
-
version: '1.
|
37
|
+
version: '1.0'
|
38
38
|
type: :runtime
|
39
39
|
prerelease: false
|
40
40
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -42,7 +42,7 @@ dependencies:
|
|
42
42
|
requirements:
|
43
43
|
- - ~>
|
44
44
|
- !ruby/object:Gem::Version
|
45
|
-
version: '1.
|
45
|
+
version: '1.0'
|
46
46
|
- !ruby/object:Gem::Dependency
|
47
47
|
name: rspec
|
48
48
|
requirement: !ruby/object:Gem::Requirement
|
@@ -118,6 +118,8 @@ files:
|
|
118
118
|
- Gemfile
|
119
119
|
- README.md
|
120
120
|
- Rakefile
|
121
|
+
- example/Gemfile
|
122
|
+
- example/config.ru
|
121
123
|
- lib/omniauth-cloud66.rb
|
122
124
|
- lib/omniauth-cloud66/version.rb
|
123
125
|
- lib/omniauth/strategies/cloud66.rb
|