omniauth-bigcartel 0.0.3 → 0.0.4

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: 987e2a23c6e5ebac9db5ff5fc35cfb177d482b0e
4
- data.tar.gz: 2e6d28c2d7e706dc19ade12d59c6477668926838
3
+ metadata.gz: d73f28583984c1137f72726b2b45a5f147374db5
4
+ data.tar.gz: 48dfbb2c33ba749d570b704a35a4f743d7a0dc4d
5
5
  SHA512:
6
- metadata.gz: 550cf63a8897676a46bf8fe6d9c5da24e67cfcc1d76993bdcfbb871b1ecc6a4a770286c7a88b15e24fb7e6876eee93e9f030c489244564107a8b0f4f5f7cfd8b
7
- data.tar.gz: 2804d251e2f45503e7c42b42c56990be02eef25e310358b659ccdf7d4a50e5709d142f3bda1ee629905b4086d45b0ccd029f34eb77e48006a8741aea57a60c85
6
+ metadata.gz: 39a1db86bd65a7e4b0ce55d19b912be476c10273eb57889e1941e5283fee349b21ea9b7507abb88b23c443df8e2b7fc04bc23ed6d30f7564558f51f9c6b8a866
7
+ data.tar.gz: bd618d052d268ff892f45ae3f7269d564229eae1b0d4826850f9f332b7dcc037bb292735fb3d411c5cf629fa627bdcfb40345ad158324c67b726d1318517c5a2
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Bigcartel
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
@@ -6,13 +6,31 @@ module OmniAuth
6
6
  option :name, :bigcartel
7
7
 
8
8
  option :client_options, {
9
- site: 'https://my.bigcartel.com',
10
- authorize_path: '/oauth/authorize',
11
- request_token_path: '/oauth/token',
12
- access_token_path: '/oauth/request_token',
9
+ site: 'https://api.bigcartel.com',
10
+ authorize_url: 'https://my.bigcartel.com/oauth/authorize',
11
+ request_token_url: 'https://api.bigcartel.com/oauth/request_token',
12
+ access_token_url: 'https://api.bigcartel.com/oauth/token',
13
13
  }
14
14
 
15
- uid { request.params['account_id'] }
15
+ uid { raw_info['id'] }
16
+
17
+ info do
18
+ {
19
+ id: raw_info['id'],
20
+ subdomain: raw_info['subdomain'],
21
+ store_name: raw_info['store_name'],
22
+ description: raw_info['description'],
23
+ contact_email: raw_info['contact_email']
24
+ }
25
+ end
26
+
27
+ extra do
28
+ { user_info: raw_info }
29
+ end
30
+
31
+ def raw_info
32
+ @raw_info ||= MultiJson.decode(access_token.get("/account").body)
33
+ end
16
34
  end
17
35
  end
18
36
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-bigcartel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dylan Montgomery
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-19 00:00:00.000000000 Z
11
+ date: 2015-06-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2