omniauth-prayer-letters 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/CHANGELOG.md +4 -6
- data/README.md +2 -2
- data/lib/omniauth/prayer_letters/version.rb +1 -1
- data/lib/omniauth/strategies/prayer_letters.rb +5 -11
- data/omniauth-prayer-letters.gemspec +2 -1
- data/spec/omniauth/strategies/prayer_letters_spec.rb +13 -3
- data/spec/spec_helper.rb +1 -0
- metadata +6 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 55243238dd17b0b1c1da7163bafe73e9426a404f
|
4
|
+
data.tar.gz: 4da7b23420cf05d9e4eace96a4e5f022ecd6a488
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 60209cd93eebafec531b3c14eaffc973e5c1fa8e969ef39c1da4fec03f073928cdc061d9793526c352f4aee0de303facc53a18b0f410fc1967828a6e9bbaeeb8
|
7
|
+
data.tar.gz: 471415ac45adc838870af5d1f5070b457505bd34fed12848a57cf09107f58555970beb610e92da4f8cabeceab6ce29fb4bd2eaece884f339944c9a69cadc5108
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Omniauth::PrayerLetters
|
2
2
|
|
3
|
-
prayerletters.com strategy for OmniAuth
|
3
|
+
prayerletters.com strategy for OmniAuth 2.0
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
@@ -22,7 +22,7 @@ Here's a quick example, adding the middleware to a Rails app in `config/initiali
|
|
22
22
|
|
23
23
|
```ruby
|
24
24
|
Rails.application.config.middleware.use OmniAuth::Builder do
|
25
|
-
provider :prayer-letters, ENV['
|
25
|
+
provider :prayer-letters, ENV['PRAYER_LETTERS_CLIENT_ID'], ENV['PRAYER_LETTERS_CLIENT_SECRET']
|
26
26
|
end
|
27
27
|
```
|
28
28
|
|
@@ -1,22 +1,17 @@
|
|
1
|
-
require 'omniauth-
|
1
|
+
require 'omniauth-oauth2'
|
2
2
|
require 'multi_json'
|
3
3
|
|
4
4
|
module OmniAuth
|
5
5
|
module Strategies
|
6
|
-
class PrayerLetters < OmniAuth::Strategies::
|
6
|
+
class PrayerLetters < OmniAuth::Strategies::OAuth2
|
7
7
|
option :name, 'prayer_letters'
|
8
8
|
|
9
9
|
option :client_options, {
|
10
|
-
:
|
11
|
-
:
|
12
|
-
:
|
13
|
-
:request_token_path => '/api/oauth1/initiate',
|
14
|
-
:http_method => 'post',
|
15
|
-
:scheme => :query_string
|
10
|
+
site: 'https://www.prayerletters.com',
|
11
|
+
authorize_url: '/my/oauth/authorize',
|
12
|
+
token_url: '/oauth/token'
|
16
13
|
}
|
17
14
|
|
18
|
-
option :permissions, 'contacts.read,contacts.write'
|
19
|
-
|
20
15
|
uid { raw_info['id'] }
|
21
16
|
|
22
17
|
info do
|
@@ -36,7 +31,6 @@ module OmniAuth
|
|
36
31
|
|
37
32
|
def request_phase
|
38
33
|
options.request_params ||= {}
|
39
|
-
options.request_params[:permissions] = options.permissions
|
40
34
|
super
|
41
35
|
end
|
42
36
|
|
@@ -7,6 +7,7 @@ Gem::Specification.new do |gem|
|
|
7
7
|
gem.description = %q{Prayer Letters strategy for omniauth}
|
8
8
|
gem.summary = %q{Prayer Letters strategy for omniauth}
|
9
9
|
gem.homepage = 'https://github.com/CruGlobal/omniauth-prayer-letters'
|
10
|
+
gem.license = 'MIT'
|
10
11
|
|
11
12
|
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
12
13
|
gem.files = `git ls-files`.split("\n")
|
@@ -15,7 +16,7 @@ Gem::Specification.new do |gem|
|
|
15
16
|
gem.require_paths = ["lib"]
|
16
17
|
gem.version = OmniAuth::PrayerLetters::VERSION
|
17
18
|
|
18
|
-
gem.add_runtime_dependency 'omniauth-
|
19
|
+
gem.add_runtime_dependency 'omniauth-oauth2'
|
19
20
|
gem.add_runtime_dependency 'multi_json'
|
20
21
|
|
21
22
|
gem.add_development_dependency 'rspec'
|
@@ -1,7 +1,17 @@
|
|
1
1
|
require 'spec_helper'
|
2
|
-
require 'omniauth-
|
2
|
+
require 'omniauth-prayer-letters'
|
3
3
|
|
4
4
|
describe OmniAuth::Strategies::PrayerLetters do
|
5
|
-
|
6
|
-
|
5
|
+
let(:app) { lambda { [200, {}, ["Hello."]] } }
|
6
|
+
let(:subject) { OmniAuth::Strategies::PrayerLetters.new(app, 'test_client_id', 'test_client_secret', @options) }
|
7
|
+
|
8
|
+
before do
|
9
|
+
OmniAuth.config.test_mode = true
|
10
|
+
end
|
7
11
|
|
12
|
+
after do
|
13
|
+
OmniAuth.config.test_mode = false
|
14
|
+
end
|
15
|
+
|
16
|
+
it_should_behave_like 'an oauth2 strategy'
|
17
|
+
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,17 +1,17 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-prayer-letters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Josh Starcher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-11-14 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
|
- - '>='
|
@@ -88,7 +88,8 @@ files:
|
|
88
88
|
- spec/shared_examples.rb
|
89
89
|
- spec/spec_helper.rb
|
90
90
|
homepage: https://github.com/CruGlobal/omniauth-prayer-letters
|
91
|
-
licenses:
|
91
|
+
licenses:
|
92
|
+
- MIT
|
92
93
|
metadata: {}
|
93
94
|
post_install_message:
|
94
95
|
rdoc_options: []
|
@@ -106,7 +107,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
106
107
|
version: '0'
|
107
108
|
requirements: []
|
108
109
|
rubyforge_project:
|
109
|
-
rubygems_version: 2.
|
110
|
+
rubygems_version: 2.2.1
|
110
111
|
signing_key:
|
111
112
|
specification_version: 4
|
112
113
|
summary: Prayer Letters strategy for omniauth
|