playlyfe 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/lib/client.rb +3 -1
  2. data/lib/playlyfe.rb +2 -2
  3. data/test/test.rb +1 -1
  4. metadata +1 -1
data/lib/client.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'faraday'
2
2
  require 'logger'
3
+ require 'access_token'
3
4
 
4
5
  module OAuth2
5
6
  # The OAuth2::Client class
@@ -138,7 +139,8 @@ module OAuth2
138
139
  response = request(options[:token_method], token_url, opts)
139
140
  error = Error.new(response)
140
141
  fail(error) if options[:raise_errors] && !(response.parsed.is_a?(Hash) && response.parsed['access_token'])
141
- access_token_class.from_hash(self, response.parsed.merge(access_token_opts))
142
+ AccessToken.from_hash(self, response.parsed.merge(access_token_opts))
143
+ #access_token_class.from_hash(self, response.parsed.merge(access_token_opts))
142
144
  end
143
145
 
144
146
  # The Client Credentials strategy
data/lib/playlyfe.rb CHANGED
@@ -20,8 +20,8 @@ class Playlyfe
20
20
 
21
21
  # You can initiate a client by giving the client_id and client_secret params
22
22
  # This will authorize a client and get the token
23
- def self.start(options = {})
24
- puts 'Getting Token'
23
+ def self.init(options = {})
24
+ puts 'Playlyfe Initializing...............................................'
25
25
  begin
26
26
  @@client = OAuth2::Client.new(
27
27
  options[:client_id],
data/test/test.rb CHANGED
@@ -4,7 +4,7 @@ require 'playlyfe'
4
4
  class PlaylyfeTest < Test::Unit::TestCase
5
5
 
6
6
  def test_start
7
- Playlyfe.start(
7
+ Playlyfe.init(
8
8
  client_id: "NjZlZWFiMWEtN2ZiOC00YmVmLTk2YWMtNDEyYTNmMjQ5NDBl",
9
9
  client_secret: "NGRhMWJlYzUtODJiNS00ZTdkLTgzNTctMTQyMGEzNTljN2MwMTU2MGM3NTAtZjZiZS0xMWUzLTgxZjYtNmZhMGYyMzRkZGU3"
10
10
  )
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: playlyfe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: