omniauth-litmus 0.1.0 → 0.2.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 877d73ade9f6ee1a13b30f6959fd1233b1119a79
4
- data.tar.gz: 33e1e5295d2b477c796fa2632442481a99be2d48
3
+ metadata.gz: 1800c88fc1fa41bd348a7a42b11221684dac16ce
4
+ data.tar.gz: 494854806b3ef1ea9a24154f48b9561638d52817
5
5
  SHA512:
6
- metadata.gz: 255914cd28d4520700c58b38f5a843156405365607e6401d5068f404bad048e4f8e38a1cfa72f7271913bf717921df01948e592dcef7e5ba6341f7b6e4dac387
7
- data.tar.gz: 5fbc0d1589656e0602c82a795598bcabb0d054c4c9999b3b9bf99d8dc91df059d0d780727fb87049794fb8bd61069545d62235f302520680e2a647366d4ced15
6
+ metadata.gz: ef4487a5e482b6d6f9648efd2f8d80a211b3c5e459e696c2627fde5163cd98d1a674d65bcafda5802ee1ed9c693f1e0acf2c2e3c42b8387840e5556f4d9bf522
7
+ data.tar.gz: cd3aff8285aa4b5e2fe0d7984fb8edb9763d48c4d98cc19772f439d3fbdc7848269d3446e2223af0d496a1ef2632dd835b15d46e24446efebbf7aea2267a96ac
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Litmus
3
- VERSION = "0.1.0"
3
+ VERSION = "0.2.0"
4
4
  end
5
5
  end
@@ -3,9 +3,12 @@ require "omniauth-oauth2"
3
3
  module OmniAuth
4
4
  module Strategies
5
5
  class Litmus < OmniAuth::Strategies::OAuth2
6
+ OAUTH_HOST = ENV["LITMUS_OAUTH_HOST"] || "https://litmus.com"
7
+ API_HOST = ENV["LITMUS_API_HOST"] || "https://api.litmus.com"
8
+
6
9
  option :name, "litmus"
7
10
  option :client_options, {
8
- site: ENV["LITMUS_OAUTH_HOST"] || "https://litmus.com"
11
+ site: OAUTH_HOST
9
12
  }
10
13
 
11
14
  uid { raw_info["id"].to_s }
@@ -20,7 +23,7 @@ module OmniAuth
20
23
  def raw_info
21
24
  access_token.options[:mode] = :query
22
25
  @raw_info ||= access_token.
23
- get("https://api.litmus.com/v2/users/current").
26
+ get("#{API_HOST}/v2/users/current").
24
27
  parsed["user"]
25
28
  end
26
29
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-litmus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rahim Packir Saibo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-06-17 00:00:00.000000000 Z
11
+ date: 2016-09-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2