omniauth-parse 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +0 -1
- data/Guardfile +1 -4
- data/README.md +4 -2
- data/Rakefile +8 -0
- data/lib/omniauth-parse/version.rb +1 -1
- data/lib/omniauth/strategies/parse.rb +8 -11
- data/omniauth-parse.gemspec +1 -1
- data/spec/omniauth/strategies/parse.rb +2 -2
- data/spec/omniauth/strategies/parse_spec.rb +15 -0
- metadata +20 -29
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e607c1294e78a9ba44e231f59d156e0e13ca909e
|
4
|
+
data.tar.gz: 4ec0e0a3003b2c1e559ddcddfb19c601783c57f8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c60735f79f4e81a7b5c149b162df1d915758f626a53fc55feff7d8ff7ac8ce3b6c50322062d123a416e8f5875606ce11fbc3ae359b7a32ffdf2c62f735558544
|
7
|
+
data.tar.gz: ffea886355728d19edb90fe183ea6a2339cf1c91c9667b7c0da43c69d5cfa99e21a2d1e3498e90f5cba9b1af110a673bc61e1fa8a2abbe7752ac104b814c88a7
|
data/Gemfile
CHANGED
data/Guardfile
CHANGED
@@ -1,10 +1,7 @@
|
|
1
|
-
# A sample Guardfile
|
2
|
-
# More info at https://github.com/guard/guard#readme
|
3
1
|
|
4
2
|
guard 'bundler' do
|
5
3
|
watch('Gemfile')
|
6
|
-
|
7
|
-
# watch(/^.+\.gemspec/)
|
4
|
+
watch(/^.+\.gemspec/)
|
8
5
|
end
|
9
6
|
|
10
7
|
guard 'rspec', :version => 2 do
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
|
-
# Omniauth::Parse
|
1
|
+
# Omniauth::Parse
|
2
|
+
|
2
3
|
|
3
4
|
This gem is an OmniAuth strategy for parse.com.
|
4
5
|
## Installation
|
@@ -31,4 +32,5 @@ Or install it yourself as:
|
|
31
32
|
5. Create new Pull Request
|
32
33
|
|
33
34
|
## TODO
|
34
|
-
|
35
|
+
tests tests tests
|
36
|
+
respond to anything other than 200, exposisng parse errors
|
data/Rakefile
CHANGED
@@ -11,12 +11,6 @@ module OmniAuth
|
|
11
11
|
option :fields, [:username, :password]
|
12
12
|
option :uid_field, :username
|
13
13
|
|
14
|
-
def initialize(app, options = {})
|
15
|
-
@application_id = options[:application_id] or raise "application_id is required for initialization"
|
16
|
-
@rest_api_key = options[:rest_api_key] or raise "rest_api_key is required for initialization"
|
17
|
-
super
|
18
|
-
end
|
19
|
-
|
20
14
|
def request_phase
|
21
15
|
form = OmniAuth::Form.new(:title => "Parse.com Info", :url => callback_path)
|
22
16
|
form.text_field :username, :username
|
@@ -39,17 +33,20 @@ module OmniAuth
|
|
39
33
|
end
|
40
34
|
|
41
35
|
def get_user_data
|
36
|
+
|
37
|
+
raise "application_id is required for initialization" unless options[:application_id]
|
38
|
+
raise "rest_api_key is required for initialization" unless options[:rest_api_key]
|
39
|
+
|
42
40
|
conn = Faraday.new(:url => PARSE_LOGIN[:site]) do |req|
|
43
41
|
req.request :url_encoded
|
44
42
|
req.adapter Faraday.default_adapter
|
45
43
|
end
|
46
|
-
|
47
44
|
result = conn.get do |req|
|
48
45
|
req.url PARSE_LOGIN[:path]
|
49
|
-
req.headers['X-Parse-Application-Id'] =
|
50
|
-
req.headers['X-Parse-REST-API-Key']
|
51
|
-
req.params['username']
|
52
|
-
req.params['password']
|
46
|
+
req.headers['X-Parse-Application-Id'] = options[:application_id]
|
47
|
+
req.headers['X-Parse-REST-API-Key'] = options[:rest_api_key]
|
48
|
+
req.params['username'] = request.params["username"]
|
49
|
+
req.params['password'] = request.params["password"]
|
53
50
|
end
|
54
51
|
unless result.status == 200
|
55
52
|
#logging?
|
data/omniauth-parse.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
require "omniauth-parse/version"
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
|
-
gem.authors = ["Micah Gates"]
|
6
|
+
gem.authors = ["Micah Gates", "Chris Bielinski"]
|
7
7
|
gem.email = ["github@mgates.com"]
|
8
8
|
gem.description = %q{An Omniauth Strategy for Parse.com}
|
9
9
|
gem.summary = %q{An Omniauth Strategy for Parse.com}
|
@@ -3,10 +3,10 @@ require File.dirname(__FILE__) + '/../../spec_helper'
|
|
3
3
|
describe OmniAuth::Strategies::Parse, :type=> :strategy do
|
4
4
|
include OmniAuth::Test::StrategyTestCase
|
5
5
|
def strategy
|
6
|
-
@
|
6
|
+
@server_url ||= 'https://api.parse.com'
|
7
7
|
@application_name ||= 'bogus_app'
|
8
8
|
@application_password ||= 'bogus_app_password'
|
9
|
-
[OmniAuth::Strategies::Parse, {:
|
9
|
+
[OmniAuth::Strategies::Parse, {:server_url => @crowd_server_url, :application_name=>@application_name, :application_password=>@application_password}]
|
10
10
|
end
|
11
11
|
|
12
12
|
describe "somthing" do
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../../spec_helper'
|
2
|
+
|
3
|
+
describe OmniAuth::Strategies::Parse, :type=> :strategy do
|
4
|
+
include OmniAuth::Test::StrategyTestCase
|
5
|
+
def strategy
|
6
|
+
@server_url ||= 'https://api.parse.com'
|
7
|
+
@application_name ||= 'bogus_app'
|
8
|
+
@application_password ||= 'bogus_app_password'
|
9
|
+
[OmniAuth::Strategies::Parse, {:server_url => @crowd_server_url, :application_name=>@application_name, :application_password=>@application_password}]
|
10
|
+
end
|
11
|
+
|
12
|
+
end
|
13
|
+
|
14
|
+
|
15
|
+
|
metadata
CHANGED
@@ -1,94 +1,84 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-parse
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Micah Gates
|
8
|
+
- Chris Bielinski
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-02-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
17
|
requirements:
|
19
|
-
- -
|
18
|
+
- - '>='
|
20
19
|
- !ruby/object:Gem::Version
|
21
20
|
version: '0'
|
22
21
|
type: :runtime
|
23
22
|
prerelease: false
|
24
23
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
24
|
requirements:
|
27
|
-
- -
|
25
|
+
- - '>='
|
28
26
|
- !ruby/object:Gem::Version
|
29
27
|
version: '0'
|
30
28
|
- !ruby/object:Gem::Dependency
|
31
29
|
name: faraday
|
32
30
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
31
|
requirements:
|
35
|
-
- -
|
32
|
+
- - '>='
|
36
33
|
- !ruby/object:Gem::Version
|
37
34
|
version: '0'
|
38
35
|
type: :runtime
|
39
36
|
prerelease: false
|
40
37
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
38
|
requirements:
|
43
|
-
- -
|
39
|
+
- - '>='
|
44
40
|
- !ruby/object:Gem::Version
|
45
41
|
version: '0'
|
46
42
|
- !ruby/object:Gem::Dependency
|
47
43
|
name: rspec
|
48
44
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
45
|
requirements:
|
51
|
-
- -
|
46
|
+
- - '>='
|
52
47
|
- !ruby/object:Gem::Version
|
53
48
|
version: '0'
|
54
49
|
type: :development
|
55
50
|
prerelease: false
|
56
51
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
52
|
requirements:
|
59
|
-
- -
|
53
|
+
- - '>='
|
60
54
|
- !ruby/object:Gem::Version
|
61
55
|
version: '0'
|
62
56
|
- !ruby/object:Gem::Dependency
|
63
57
|
name: rack-test
|
64
58
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
59
|
requirements:
|
67
|
-
- -
|
60
|
+
- - '>='
|
68
61
|
- !ruby/object:Gem::Version
|
69
62
|
version: '0'
|
70
63
|
type: :development
|
71
64
|
prerelease: false
|
72
65
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
66
|
requirements:
|
75
|
-
- -
|
67
|
+
- - '>='
|
76
68
|
- !ruby/object:Gem::Version
|
77
69
|
version: '0'
|
78
70
|
- !ruby/object:Gem::Dependency
|
79
71
|
name: webmock
|
80
72
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
73
|
requirements:
|
83
|
-
- -
|
74
|
+
- - '>='
|
84
75
|
- !ruby/object:Gem::Version
|
85
76
|
version: '0'
|
86
77
|
type: :development
|
87
78
|
prerelease: false
|
88
79
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
80
|
requirements:
|
91
|
-
- -
|
81
|
+
- - '>='
|
92
82
|
- !ruby/object:Gem::Version
|
93
83
|
version: '0'
|
94
84
|
description: OmniAuth strategy for Parse
|
@@ -109,31 +99,32 @@ files:
|
|
109
99
|
- lib/omniauth/strategies/parse.rb
|
110
100
|
- omniauth-parse.gemspec
|
111
101
|
- spec/omniauth/strategies/parse.rb
|
102
|
+
- spec/omniauth/strategies/parse_spec.rb
|
112
103
|
- spec/spec_helper.rb
|
113
104
|
homepage: https://github.com/mgates/omniauth-parse
|
114
105
|
licenses: []
|
106
|
+
metadata: {}
|
115
107
|
post_install_message:
|
116
108
|
rdoc_options: []
|
117
109
|
require_paths:
|
118
110
|
- lib
|
119
111
|
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
-
none: false
|
121
112
|
requirements:
|
122
|
-
- -
|
113
|
+
- - '>='
|
123
114
|
- !ruby/object:Gem::Version
|
124
115
|
version: '0'
|
125
116
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
126
|
-
none: false
|
127
117
|
requirements:
|
128
|
-
- -
|
118
|
+
- - '>='
|
129
119
|
- !ruby/object:Gem::Version
|
130
120
|
version: '0'
|
131
121
|
requirements: []
|
132
122
|
rubyforge_project:
|
133
|
-
rubygems_version:
|
123
|
+
rubygems_version: 2.0.14
|
134
124
|
signing_key:
|
135
|
-
specification_version:
|
125
|
+
specification_version: 4
|
136
126
|
summary: OmniAuth strategy for Parse
|
137
127
|
test_files:
|
138
128
|
- spec/omniauth/strategies/parse.rb
|
129
|
+
- spec/omniauth/strategies/parse_spec.rb
|
139
130
|
- spec/spec_helper.rb
|