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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20e0094789e6e9755b39a95cb4b409613d993e6f
4
- data.tar.gz: b47ca793c41e42cebe20ce8c2f492727b189e95c
3
+ metadata.gz: 55243238dd17b0b1c1da7163bafe73e9426a404f
4
+ data.tar.gz: 4da7b23420cf05d9e4eace96a4e5f022ecd6a488
5
5
  SHA512:
6
- metadata.gz: 5b62309b5334d28e776feeeaf3ac53c2eea6457099b94cd7e0c93222283e4a9b50ed1fb903d1038a1691cc3389c609c28099612b434e4a0d3ecf0849af3c8a60
7
- data.tar.gz: b2c522250731adac443b62e363f94f90407a44d38269a15c9483b64ee132c368a0641c8aa52cdbf39924db0ecaa048a76a89a5a9f6289dbb751499aefbcc05f1
6
+ metadata.gz: 60209cd93eebafec531b3c14eaffc973e5c1fa8e969ef39c1da4fec03f073928cdc061d9793526c352f4aee0de303facc53a18b0f410fc1967828a6e9bbaeeb8
7
+ data.tar.gz: 471415ac45adc838870af5d1f5070b457505bd34fed12848a57cf09107f58555970beb610e92da4f8cabeceab6ce29fb4bd2eaece884f339944c9a69cadc5108
data/.gitignore CHANGED
@@ -16,3 +16,4 @@ test/tmp
16
16
  test/version_tmp
17
17
  tmp
18
18
  vendor
19
+ .idea
@@ -1,9 +1,7 @@
1
- # 0.0.2 (2012-06-21)
1
+ # 0.0.3 (2014-11-11)
2
2
 
3
- ## Bugs
3
+ - Updated to OAuth 2.0
4
4
 
5
- * MySpace needs query string rather than headr strategy (@johnf)
5
+ # 0.0.2
6
6
 
7
- # 0.0.1
8
-
9
- - Initial Release
7
+ - Initial Release for PrayerLetters OAuth 1.0
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Omniauth::PrayerLetters
2
2
 
3
- prayerletters.com strategy for OmniAuth 1.0
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['PRAYER_LETTERS_KEY'], ENV['PRAYER_LETTERS_SECRET']
25
+ provider :prayer-letters, ENV['PRAYER_LETTERS_CLIENT_ID'], ENV['PRAYER_LETTERS_CLIENT_SECRET']
26
26
  end
27
27
  ```
28
28
 
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module PrayerLetters
3
- VERSION = '0.0.2'
3
+ VERSION = '0.0.3'
4
4
  end
5
5
  end
@@ -1,22 +1,17 @@
1
- require 'omniauth-oauth'
1
+ require 'omniauth-oauth2'
2
2
  require 'multi_json'
3
3
 
4
4
  module OmniAuth
5
5
  module Strategies
6
- class PrayerLetters < OmniAuth::Strategies::OAuth
6
+ class PrayerLetters < OmniAuth::Strategies::OAuth2
7
7
  option :name, 'prayer_letters'
8
8
 
9
9
  option :client_options, {
10
- :site => 'https://www.prayerletters.com',
11
- :authorize_path => '/my/oauth1/authorize',
12
- :access_token_path => '/api/oauth1/token',
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-oauth'
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-prayer_letters'
2
+ require 'omniauth-prayer-letters'
3
3
 
4
4
  describe OmniAuth::Strategies::PrayerLetters do
5
- it_should_behave_like 'an oauth1.0a strategy'
6
- end
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
@@ -1,5 +1,6 @@
1
1
  require 'bundler/setup'
2
2
  require 'rspec'
3
+ require 'shared_examples'
3
4
  Dir[File.expand_path('../support/**/*', __FILE__)].each { |f| require f }
4
5
 
5
6
  RSpec.configure do |config|
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.2
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: 2013-08-13 00:00:00.000000000 Z
11
+ date: 2014-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: omniauth-oauth
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.0.3
110
+ rubygems_version: 2.2.1
110
111
  signing_key:
111
112
  specification_version: 4
112
113
  summary: Prayer Letters strategy for omniauth