omniauth-pushbullet 0.1.0 → 1.0.0
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.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/Rakefile +12 -1
- data/lib/omniauth-pushbullet/version.rb +1 -1
- data/lib/omniauth/strategies/pushbullet.rb +9 -10
- data/omniauth-pushbullet.gemspec +2 -0
- metadata +29 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0c509ce9db5321648f8118424ba9f26f0708e337
|
4
|
+
data.tar.gz: 2fd892fbd197ecd60d9997f66b3b3e737332a8c4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: be5bf41c5dd57a886900754348b9733eb115a73d740c3bbe611d882b6aee687af7dc99ef3b6857d039758b8e7f9de398b22a23581398eb3f5589075534434f61
|
7
|
+
data.tar.gz: 717fa0b1df5d8eb8006f35727eda8e04cec7bad7d68d5d7a1ccb84dd4996b3780bb645221f7ee1a204bc381181a5ef936c390eba6a32ffd61eb53f475ccc18a4
|
data/README.md
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# OmniAuth Pushbullet
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/omniauth-pushbullet)
|
4
|
+
|
3
5
|
This gem contains an OmniAuth strategy for [Pushbullet](https://www.pushbullet.com/) using their OAuth2 authentication API.
|
4
6
|
|
5
7
|
Before using this gem, you will need to register an application with Pushbullet through their website.
|
data/Rakefile
CHANGED
@@ -5,26 +5,25 @@ require 'json'
|
|
5
5
|
module OmniAuth
|
6
6
|
module Strategies
|
7
7
|
class Pushbullet < OmniAuth::Strategies::OAuth2
|
8
|
-
BASE_URL = 'https://
|
9
|
-
API_URL = 'https://api.pushbullet.com'
|
8
|
+
BASE_URL = 'https://api.pushbullet.com'
|
10
9
|
|
11
10
|
option :name, 'pushbullet'
|
12
11
|
|
13
12
|
option :client_options, {
|
14
|
-
:site
|
15
|
-
:authorize_url
|
16
|
-
:token_url
|
13
|
+
:site => BASE_URL,
|
14
|
+
:authorize_url => "https://www.pushbullet.com/authorize",
|
15
|
+
:token_url => "#{BASE_URL}/oauth2/token"
|
17
16
|
}
|
18
17
|
|
19
18
|
uid do
|
20
|
-
raw_data
|
19
|
+
raw_data['iden']
|
21
20
|
end
|
22
21
|
|
23
22
|
info do
|
24
23
|
{
|
25
|
-
:name => raw_data
|
26
|
-
:email => raw_data
|
27
|
-
:image => raw_data
|
24
|
+
:name => raw_data['name'],
|
25
|
+
:email => raw_data['email'],
|
26
|
+
:image => raw_data['image_url']
|
28
27
|
}
|
29
28
|
end
|
30
29
|
|
@@ -37,7 +36,7 @@ module OmniAuth
|
|
37
36
|
def raw_data
|
38
37
|
return @data if @data
|
39
38
|
|
40
|
-
uri = URI.parse("#{
|
39
|
+
uri = URI.parse("#{BASE_URL}/v2/users/me")
|
41
40
|
http = Net::HTTP.new(uri.host, uri.port)
|
42
41
|
request = Net::HTTP::Get.new(uri.request_uri)
|
43
42
|
|
data/omniauth-pushbullet.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-pushbullet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Rice
|
@@ -52,6 +52,34 @@ dependencies:
|
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '5.8'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '5.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: webmock
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '1.24'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '1.24'
|
55
83
|
description: Pushbullet OAuth2 strategy for OmniAuth
|
56
84
|
email:
|
57
85
|
- brandon@blrice.net
|