Skip to content

Commit

Permalink
Merge pull request #3 from Fullscreen/new-card-types
Browse files Browse the repository at this point in the history
New card types
  • Loading branch information
claudiofullscreen committed Dec 3, 2015
2 parents 55d6ddb + 86d7e5a commit 38c99a8
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 8 deletions.
6 changes: 5 additions & 1 deletion CHANGELOG.md
Expand Up @@ -6,6 +6,10 @@ For more information about changelogs, check
[Keep a Changelog](http://keepachangelog.com) and
[Vandamme](http://tech-angels.github.io/vandamme).

## 1.2.0 - 2015.12.02

* [ENHANCEMENT] Parse new 'simple' card type (which YouTube now uses instead of 'merch', 'fundraising', 'associated').

## 1.1.0 - 2015.11.12

* [FEATURE] Fetches annotations and cards of YouTube videos
* [FEATURE] Fetches annotations and cards of YouTube videos.
4 changes: 1 addition & 3 deletions lib/yt/annotations/card.rb
Expand Up @@ -30,9 +30,7 @@ def to_link(data, json)
when 'collaborator' then :channel
when 'playlist' then :playlist
when 'video' then :video
when 'merch' then :merch
when 'fundraising' then :crowdfunding
when 'associated' then :website
when 'simple' then :website
end

{url: json['url'], new_window: true, type: link_type}
Expand Down
2 changes: 1 addition & 1 deletion lib/yt/annotations/version.rb
@@ -1,5 +1,5 @@
module Yt
module Annotations
VERSION = '1.1.0'
VERSION = '1.2.0'
end
end
4 changes: 2 additions & 2 deletions spec/yt/annotations_spec.rb
Expand Up @@ -126,7 +126,7 @@
expect(annotations[14].text).to eq 'Cards link to Merch site'
expect(annotations[14].link).to be_a Hash
expect(annotations[14].link[:url]).to include 'bandcamp.com'
expect(annotations[14].link[:type]).to be :merch
expect(annotations[14].link[:type]).to be :website
expect(annotations[14].link[:new_window]).to be true

expect(annotations[15]).to be_a Yt::Annotations::Branding
Expand All @@ -144,7 +144,7 @@
expect(annotations[16].text).to eq 'Card links to Crowdfunding'
expect(annotations[16].link).to be_a Hash
expect(annotations[16].link[:url]).to include 'causes.com'
expect(annotations[16].link[:type]).to be :crowdfunding
expect(annotations[16].link[:type]).to be :website
expect(annotations[16].link[:new_window]).to be true
end
end
Expand Down
2 changes: 1 addition & 1 deletion yt-annotations.gemspec
Expand Up @@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ['lib']

spec.add_dependency 'activesupport', '~> 4.0'
spec.add_dependency 'activesupport', '>= 4', '< 6'

spec.add_development_dependency 'bundler', '~> 1.7'
spec.add_development_dependency 'rake', '~> 10.0'
Expand Down

0 comments on commit 38c99a8

Please sign in to comment.