omniauth-twitchtv 0.2.1 → 0.2.2

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.
@@ -1,6 +1,6 @@
1
1
  module Omniauth
2
2
  module Twitchtv
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
6
6
 
@@ -38,18 +38,12 @@ module OmniAuth
38
38
  end
39
39
 
40
40
  def info_url
41
- url = if self.options.scopes && (self.options.scopes.index("user_read") || self.options.scopes.index(:user_read)) then
42
- "https://api.twitch.tv/kraken/user"
43
- elsif self.options.scopes && (self.options.scopes.index("channel_read") || self.options.scopes.index(:channel_read)) then
44
- "https://api.twitch.tv/kraken/channel"
45
- elsif self.options.scope.to_sym == :user_read then
46
- "https://api.twitch.tv/kraken/user"
47
- elsif self.options.scope.to_sym == :channel_read then
48
- "https://api.twitch.tv/kraken/channel"
49
- else
41
+ unless self.options.scopes && (self.options.scopes.index("user_read") || self.options.scopes.index(:user_read)) ||
42
+ self.options.scopes && (self.options.scopes.index("user_read") || self.options.scopes.index(:user_read)) ||
43
+ self.options.scope.to_sym == :user_read || self.options.scope.to_sym == :channel_read
50
44
  raise Omniauth::Twitchtv::TwitchtvError.new("Must include at least either the channel or user read scope in omniauth-twitchtv initializer")
51
45
  end
52
- url
46
+ "https://api.twitch.tv/kraken/user"
53
47
  end
54
48
  end
55
49
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-twitchtv
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-23 00:00:00.000000000 Z
12
+ date: 2013-01-28 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: omniauth-oauth2