yt 0.25.15 → 0.25.16

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: 9911269f376cd2e904f6ac1137b709a0d0de982f
4
- data.tar.gz: 2aeff7eae2cf2506a89f98f6b034f05155f5802b
3
+ metadata.gz: 57f9c2d75847b4137201f2c9355c185ec00c69af
4
+ data.tar.gz: 5cc9fc386bbaaaa90732f8e76a4de3648280b4b7
5
5
  SHA512:
6
- metadata.gz: 014afb4485d06e6b967c56c623cea923bfcb3cc7981a3084863226f82d8868a3b3fca455a7c3308148111cac0f55bdde51865f234b37bd7df7eb3c8a4eaac66b
7
- data.tar.gz: 770116f76d5b33c0e1e610118074f3e840a6060aee5ec5ca7b332012f08d61d7e738c99f33ad8888d3d73c780efc7ba4d093672d342c628809f3e95c971beb63
6
+ metadata.gz: 2f003be68c2877096fec9d440d184ff263f89dd7043da1d974d51d079f9997846c9a2eb90a5490f46a914f843a54957633546ec96b36388a4f940f979325793b
7
+ data.tar.gz: c8a10b2f29d6a065007fa925fe0a96ade022f1f236c0bfb35b530ea7dcf8778d64e3b8aa6b899be7dc867183f199710c6c54aa0e66048fd6641fee8b4fa09880
@@ -6,6 +6,10 @@ For more information about changelogs, check
6
6
  [Keep a Changelog](http://keepachangelog.com) and
7
7
  [Vandamme](http://tech-angels.github.io/vandamme).
8
8
 
9
+ ## 0.25.16 - 2015-12-19
10
+
11
+ * [FEATURE] Add `access_token_was_refreshed` to Yt::Account
12
+
9
13
  ## 0.25.15 - 2015-12-17
10
14
 
11
15
  * [FEATURE] Add `revoke_access` to Yt::Account
@@ -58,7 +58,13 @@ module Yt
58
58
  def refreshed_access_token?
59
59
  old_access_token = authentication.access_token
60
60
  @authentication = @access_token = @refreshed_authentications = nil
61
- old_access_token != authentication.access_token
61
+
62
+ if old_access_token != authentication.access_token
63
+ access_token_was_refreshed
64
+ true
65
+ else
66
+ false
67
+ end
62
68
  end
63
69
 
64
70
  # Revoke access given to the application.
@@ -73,6 +79,12 @@ module Yt
73
79
  false
74
80
  end
75
81
 
82
+ # Invoked when the access token is refreshed.
83
+ def access_token_was_refreshed
84
+ # Apps using Yt can override this method to handle this event, for
85
+ # instance to store the newly generated access token in the database.
86
+ end
87
+
76
88
  private
77
89
 
78
90
  def current_authentication
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.25.15'
2
+ VERSION = '0.25.16'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yt
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.25.15
4
+ version: 0.25.16
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claudio Baccigalupo
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-17 00:00:00.000000000 Z
11
+ date: 2015-12-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -314,7 +314,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
314
314
  version: '0'
315
315
  requirements: []
316
316
  rubyforge_project:
317
- rubygems_version: 2.5.0
317
+ rubygems_version: 2.5.1
318
318
  signing_key:
319
319
  specification_version: 4
320
320
  summary: Yt makes it easy to interact with Youtube V3 API by providing a modular,