yt 0.25.13 → 0.25.14

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: f5d61a13c2ac1e501b0b8bf83b439f47afef4aee
4
- data.tar.gz: 2bab9c7300548cfaea22154ba364eae4714eaf7c
3
+ metadata.gz: 66746428c5b4ed1341662d4266f61e4c4bccab20
4
+ data.tar.gz: 4632fc9ca52c942064c011087ce25ddb0d7c2f79
5
5
  SHA512:
6
- metadata.gz: f24db663d4ddd8a36c054e4b7696fe656dd2ae555d72b5d856b9c0d520a00bf300dd43f54995d0f0ea7397004e352f2d64e52f13d3c12938d6eb06654da3d3eb
7
- data.tar.gz: c515f09879b3761e9adc1aeb88a6c99c9a2754cb346fecb200efbff9b6ecd2eea41fb4642e26abb73e509c095e544e919a1c137384219102264d8b1511f3e6e2
6
+ metadata.gz: 5f1af5640f45285d6c85f62af0831fc56216d21e5ef9fbe9a972434730bc27c2a121dd470ebdb0b44305ba91e0869b352b36fc19a43ac2fadd5cd0148cd97483
7
+ data.tar.gz: 23ee7315bea131dc9bf7ef5aaf851c080babfedc98e16e67bf04453b45545c4b0fc21d63039f488cde28af63e89c4d6038a63ca3b4f751b8c570ba30396b50cb
@@ -6,6 +6,11 @@ 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.14 - 2015-12-16
10
+
11
+ * [ENHANCEMENT] Add `:display_name` to each content owner returned by account.content_owners
12
+ * [BUGFIX] Don’t raise error when raising MissingAuth without any scope
13
+
9
14
  ## 0.25.13 - 2015-12-04
10
15
 
11
16
  * [BUGFIX] Fix previous fix to Video#update with publishAt (typo)
@@ -103,6 +103,7 @@ module Yt
103
103
  error_message = case
104
104
  when @redirect_uri && @scopes then missing_authorization_code_message
105
105
  when @scopes then pending_device_code_message
106
+ else {}
106
107
  end
107
108
  raise Errors::MissingAuth, error_message
108
109
  end
@@ -11,7 +11,7 @@ module Yt
11
11
  private
12
12
 
13
13
  def attributes_for_new_item(data)
14
- {owner_name: data['id'], authentication: @auth.authentication}
14
+ {owner_name: data['id'], display_name: data['displayName'], authentication: @auth.authentication}
15
15
  end
16
16
 
17
17
  # @return [Hash] the parameters to submit to YouTube to list content
@@ -27,9 +27,13 @@ module Yt
27
27
  # @return [Yt::Collections::Policies] the policies saved by the content owner.
28
28
  has_many :policies
29
29
 
30
+ # @return [String] The display name of the content owner.
31
+ attr_reader :display_name
32
+
30
33
  def initialize(options = {})
31
34
  super options
32
35
  @owner_name = options[:owner_name]
36
+ @display_name = options[:display_name]
33
37
  end
34
38
 
35
39
  def create_reference(params = {})
@@ -1,3 +1,3 @@
1
1
  module Yt
2
- VERSION = '0.25.13'
2
+ VERSION = '0.25.14'
3
3
  end
@@ -16,6 +16,10 @@ describe Yt::Account, :partner do
16
16
  expect(content_owners.first).to be_a Yt::ContentOwner
17
17
  end
18
18
 
19
+ specify 'includes the display name for each content owner' do
20
+ expect(content_owners.first.display_name).to be_a String
21
+ end
22
+
19
23
  specify 'ensures the content owners have the same credentials as the account' do
20
24
  expect(content_owners.first.access_token).to eq account.access_token
21
25
  expect(content_owners.first.refresh_token).to eq account.refresh_token
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.13
4
+ version: 0.25.14
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-05 00:00:00.000000000 Z
11
+ date: 2015-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport