Skip to content

Commit f4f2861

Browse files
author
claudiofullscreen
authored
Merge pull request #20 from Fullscreen/bu
Bundle update dependencies
2 parents bad5ac9 + f01d3a3 commit f4f2861

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

README.md

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,14 +37,17 @@ Yt::Annotations requires **Ruby 2.2.2 or higher**.
3737

3838
To include in your project, add `gem 'yt-annotations', ~> '1.0'` to the `Gemfile` file of your Ruby project.
3939

40+
4041
How to contribute
4142
=================
4243

43-
If you’ve made it this far in the README… thanks! :v:
44-
Feel free to try it the gem, explore the code, and send issues or pull requests.
44+
Contribute to the code by forking the project, adding the missing code,
45+
writing the appropriate tests and submitting a pull request.
4546

46-
All pull requests will have to make Travis and Code Climate happy in order to be accepted. :kissing_smiling_eyes:
47+
In order for a PR to be approved, all the tests need to pass and all the public
48+
methods need to be documented and listed in the guides. Remember:
4749

48-
You can also run the tests locally with `bundle exec rspec`.
50+
- to run all tests locally: `bundle exec rspec`
51+
- to generate the docs locally: `bundle exec yard`
52+
- to list undocumented methods: `bundle exec yard stats --list-undoc`
4953

50-
Happy hacking!

lib/yt/annotations/end_screen.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module Yt
44
module Annotations
55
# An end screen annotation shows in the last 5 to seconds of the video.
66
class EndScreen < Base
7-
# @param [Hash] data the Hash representation of the XML data returned by
7+
# @param [Hash] json the Hash representation of the XML data returned by
88
# YouTube for each end screen of a video.
99
def initialize(json = {})
1010
@text = json['title']['runs'][0]['text']

lib/yt/annotations/for.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,16 @@
99
require 'yt/annotations/title'
1010
require 'yt/annotations/pause'
1111

12+
# An object-oriented Ruby client for YouTube.
13+
# @see http://www.rubydoc.info/gems/yt/
1214
module Yt
1315
module Annotations
16+
# Provides a method to fetch annotations and cards for a YouTube video.
1417
module For
18+
# @param [String] video_id the unique ID of a YouTube video.
19+
# @return [Array<Yt::Annotation>] the annotations/end cards of the video.
1520
def for(video_id)
16-
(annotations(video_id) + end_screens(video_id)).sort_by &:starts_at
21+
(annotations(video_id) + end_screens(video_id)).sort_by(&:starts_at)
1722
end
1823

1924
private

lib/yt/annotations/version.rb

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
module Yt
2+
# Provides functionality to fetch annotations and cards from YouTube videos.
23
module Annotations
4+
# @return [String] the SemVer-compatible gem version.
5+
# @see http://semver.org
36
VERSION = '1.4.1'
47
end
58
end

yt-annotations.gemspec

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ require 'yt/annotations/version'
66
Gem::Specification.new do |spec|
77
spec.name = 'yt-annotations'
88
spec.version = Yt::Annotations::VERSION
9-
spec.authors = ['claudiob']
10-
spec.email = ['[email protected]']
9+
spec.authors = ['Claudio Baccigalupo', 'Kang-Kyu Lee']
10+
1111

1212
spec.summary = %q{Fetch annotations and cards from YouTube videos.}
1313
spec.description = %q{A Ruby library to retrieve every type of annotation from
@@ -17,16 +17,19 @@ Gem::Specification.new do |spec|
1717

1818
spec.required_ruby_version = '>= 2.2.2'
1919

20-
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
20+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
21+
f.match(%r{^(test|spec|features)/})
22+
end
2123
spec.bindir = 'exe'
2224
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
2325
spec.require_paths = ['lib']
2426

2527
spec.add_dependency 'activesupport', '>= 4', '< 6'
2628

27-
spec.add_development_dependency 'bundler', '~> 1.7'
28-
spec.add_development_dependency 'rake', '~> 10.0'
29-
spec.add_development_dependency 'rspec', '~> 3.3'
30-
spec.add_development_dependency 'coveralls', '~> 0.8.10'
29+
spec.add_development_dependency 'bundler', '~> 1.14'
30+
spec.add_development_dependency 'rspec', '~> 3.5'
31+
spec.add_development_dependency 'rake', '~> 12.0'
32+
spec.add_development_dependency 'coveralls', '~> 0.8.20'
3133
spec.add_development_dependency 'pry-nav', '~> 0.2.4'
34+
spec.add_development_dependency 'yard', '~> 0.9.8'
3235
end

0 commit comments

Comments
 (0)