omniauth-drip 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c72f2505e632568cacc76da387a4b20407342eb7
4
- data.tar.gz: 54ca9b6b01b1afb4ac6bfe04dbb32f3946f8804d
3
+ metadata.gz: c39f3dd88308f79f2bedf4377eef569318892528
4
+ data.tar.gz: 65c4cdfb3c9ef9b7dca18a3d40dd0628789c31ab
5
5
  SHA512:
6
- metadata.gz: 7694f6b355a486fe5a28be09bc78977271a495467cf1c9b7baa5e14c5709c09f265476a4df125d6c39b0cbed1608d1b726616c3039ed4ebabc4c7e27094a9d48
7
- data.tar.gz: dc10d3d36d06e5af9127ce855c9449176c9816cae34c83e6d4b19fef1466c6b048595b76eb38fe5702046e9308cf3cf70030c89f8bb02bb2f45251256fbc213b
6
+ metadata.gz: cdd54f2499d2fa37acfe2fbdb49b8349f3ebe7d6d34be12ea6cff0402a35bfdbcbecdd825fcf453d18ac7425a80fe06cef54275c75c0d5d92dd281a439b1c49a
7
+ data.tar.gz: 0bb3ee996bfc4db7dcc3b655ac0d451c04c6319bb2bc55e70aa0666ea1188b073b1928aa18eebdf58294b53e81d1fc231956c386126c1eca907a67daab7b7300
data/NEWS.md ADDED
@@ -0,0 +1,10 @@
1
+ # News
2
+
3
+ ## 0.0.2
4
+
5
+ * Merged Justin McNally's version in
6
+ * Updated contact info to getdrip.com
7
+
8
+ ## 0.0.1
9
+
10
+ * Adam Podolnick's initial version
data/README.md CHANGED
@@ -47,3 +47,8 @@ end
47
47
  3. Commit your changes (`git commit -am 'Added some feature'`)
48
48
  4. Push to the branch (`git push origin my-new-feature`)
49
49
  5. Create new Pull Request
50
+
51
+ ## Thanks
52
+
53
+ Thanks to Adam Podolnick at Sprout Video and Justin McNally at Waitlisted.io
54
+ for contributing the original versions of this gem.
@@ -6,11 +6,38 @@ module OmniAuth
6
6
 
7
7
  option :name, 'drip'
8
8
 
9
+ option :access_token_options, {
10
+ :header_format => 'Bearer %s',
11
+ :param_name => 'token'
12
+ }
13
+
9
14
  option :client_options, {
10
- :site => 'https://api.getdrip.com/v2',
15
+ :site => 'https://api.getdrip.com',
11
16
  :authorize_url => 'https://www.getdrip.com/oauth/authorize',
12
17
  :token_url => 'https://www.getdrip.com/oauth/token'
13
18
  }
19
+
20
+ uid { access_token.client.id }
21
+
22
+ info do
23
+ {
24
+ email: user_info["users"][0]["email"]
25
+ }
26
+ end
27
+
28
+ extra do
29
+ {
30
+ accounts: raw_info["accounts"]
31
+ }
32
+ end
33
+
34
+ def user_info
35
+ @user_info ||= JSON.parse(access_token.get("/v2/user").body)
36
+ end
37
+
38
+ def raw_info
39
+ @raw_info ||= JSON.parse(access_token.get("/v2/accounts").body)
40
+ end
14
41
  end
15
42
  end
16
43
  end
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Drip
3
- VERSION = "0.0.1"
3
+ VERSION = "0.0.2"
4
4
  end
5
5
  end
@@ -2,11 +2,11 @@
2
2
  require File.expand_path('../lib/omniauth-drip/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Adam Podolnick"]
6
- gem.email = ["adam@sproutvideo.com"]
5
+ gem.authors = ["Drip Inc."]
6
+ gem.email = ["support@getdrip.com"]
7
7
  gem.description = "Provides an OmniAuth strategy for Drip to make authentication with the Drip API simple"
8
8
  gem.summary = "An OmniAuth strategy for Drip"
9
- gem.homepage = "https://sproutvideo.com"
9
+ gem.homepage = "https://www.getdrip.com"
10
10
  gem.license = 'MIT'
11
11
 
12
12
  gem.files = `git ls-files`.split($\)
@@ -16,8 +16,7 @@ Gem::Specification.new do |gem|
16
16
  gem.require_paths = ["lib"]
17
17
  gem.version = Omniauth::Drip::VERSION
18
18
 
19
- gem.add_dependency 'omniauth', '~> 1.0'
20
- gem.add_dependency 'omniauth-oauth2', '~> 1.1'
19
+ gem.add_dependency 'omniauth-oauth2', '~> 1.2'
21
20
  gem.add_development_dependency "rspec", "~> 2.7"
22
21
  gem.add_development_dependency 'rack-test'
23
22
  gem.add_development_dependency 'simplecov'
@@ -1,6 +1,6 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe OmniAuth::Strategies::Buffer do
3
+ describe OmniAuth::Strategies::Drip do
4
4
 
5
5
  subject do
6
6
  OmniAuth::Strategies::Drip.new({})
@@ -14,7 +14,7 @@ describe OmniAuth::Strategies::Buffer do
14
14
 
15
15
  context "endpoints" do
16
16
  it "has correct site" do
17
- subject.options.client_options.site.should eq("https://api.getdrip.com/v2/")
17
+ subject.options.client_options.site.should eq("https://api.getdrip.com")
18
18
  end
19
19
 
20
20
  it "has correct authorize_url" do
metadata CHANGED
@@ -1,110 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-drip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
- - Adam Podolnick
7
+ - Drip Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-17 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: omniauth
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '1.0'
20
- type: :runtime
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - ~>
25
- - !ruby/object:Gem::Version
26
- version: '1.0'
27
13
  - !ruby/object:Gem::Dependency
28
14
  name: omniauth-oauth2
29
15
  requirement: !ruby/object:Gem::Requirement
30
16
  requirements:
31
- - - ~>
17
+ - - "~>"
32
18
  - !ruby/object:Gem::Version
33
- version: '1.1'
19
+ version: '1.2'
34
20
  type: :runtime
35
21
  prerelease: false
36
22
  version_requirements: !ruby/object:Gem::Requirement
37
23
  requirements:
38
- - - ~>
24
+ - - "~>"
39
25
  - !ruby/object:Gem::Version
40
- version: '1.1'
26
+ version: '1.2'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: rspec
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - ~>
31
+ - - "~>"
46
32
  - !ruby/object:Gem::Version
47
33
  version: '2.7'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - ~>
38
+ - - "~>"
53
39
  - !ruby/object:Gem::Version
54
40
  version: '2.7'
55
41
  - !ruby/object:Gem::Dependency
56
42
  name: rack-test
57
43
  requirement: !ruby/object:Gem::Requirement
58
44
  requirements:
59
- - - '>='
45
+ - - ">="
60
46
  - !ruby/object:Gem::Version
61
47
  version: '0'
62
48
  type: :development
63
49
  prerelease: false
64
50
  version_requirements: !ruby/object:Gem::Requirement
65
51
  requirements:
66
- - - '>='
52
+ - - ">="
67
53
  - !ruby/object:Gem::Version
68
54
  version: '0'
69
55
  - !ruby/object:Gem::Dependency
70
56
  name: simplecov
71
57
  requirement: !ruby/object:Gem::Requirement
72
58
  requirements:
73
- - - '>='
59
+ - - ">="
74
60
  - !ruby/object:Gem::Version
75
61
  version: '0'
76
62
  type: :development
77
63
  prerelease: false
78
64
  version_requirements: !ruby/object:Gem::Requirement
79
65
  requirements:
80
- - - '>='
66
+ - - ">="
81
67
  - !ruby/object:Gem::Version
82
68
  version: '0'
83
69
  - !ruby/object:Gem::Dependency
84
70
  name: webmock
85
71
  requirement: !ruby/object:Gem::Requirement
86
72
  requirements:
87
- - - '>='
73
+ - - ">="
88
74
  - !ruby/object:Gem::Version
89
75
  version: '0'
90
76
  type: :development
91
77
  prerelease: false
92
78
  version_requirements: !ruby/object:Gem::Requirement
93
79
  requirements:
94
- - - '>='
80
+ - - ">="
95
81
  - !ruby/object:Gem::Version
96
82
  version: '0'
97
83
  description: Provides an OmniAuth strategy for Drip to make authentication with the
98
84
  Drip API simple
99
85
  email:
100
- - adam@sproutvideo.com
86
+ - support@getdrip.com
101
87
  executables: []
102
88
  extensions: []
103
89
  extra_rdoc_files: []
104
90
  files:
105
- - .gitignore
91
+ - ".gitignore"
106
92
  - Gemfile
107
93
  - LICENSE
94
+ - NEWS.md
108
95
  - README.md
109
96
  - Rakefile
110
97
  - lib/omniauth-drip.rb
@@ -113,7 +100,7 @@ files:
113
100
  - omniauth-drip.gemspec
114
101
  - spec/omniauth/strategies/drip_spec.rb
115
102
  - spec/spec_helper.rb
116
- homepage: https://sproutvideo.com
103
+ homepage: https://www.getdrip.com
117
104
  licenses:
118
105
  - MIT
119
106
  metadata: {}
@@ -123,17 +110,17 @@ require_paths:
123
110
  - lib
124
111
  required_ruby_version: !ruby/object:Gem::Requirement
125
112
  requirements:
126
- - - '>='
113
+ - - ">="
127
114
  - !ruby/object:Gem::Version
128
115
  version: '0'
129
116
  required_rubygems_version: !ruby/object:Gem::Requirement
130
117
  requirements:
131
- - - '>='
118
+ - - ">="
132
119
  - !ruby/object:Gem::Version
133
120
  version: '0'
134
121
  requirements: []
135
122
  rubyforge_project:
136
- rubygems_version: 2.0.14
123
+ rubygems_version: 2.4.5
137
124
  signing_key:
138
125
  specification_version: 4
139
126
  summary: An OmniAuth strategy for Drip