youtube_rails 1.2.1 → 1.2.2

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/youtube_rails.rb +5 -5
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a48f3f443d4af70275091248208561cf35f9657
4
- data.tar.gz: d0df04eedf2b1556a4e78b96256f24759dfc5365
3
+ metadata.gz: b83992d7cc2f6bf50b33cd4853a57bc247c296ad
4
+ data.tar.gz: fc0287f67856ee1812139734da4ddbe0018e2efe
5
5
  SHA512:
6
- metadata.gz: c325bfebb67f797a5059c2a55d8ef5a7793a6ea4be5562e7fcda7f810d5fcd9ae768e53cbcae089f87541043fe0bb5ab08f8aaab58d43de5cb71c2320525f0a6
7
- data.tar.gz: d9641a14325171c740bc41925bde5944ea2b5064546f16c923f5aae64aa2164889c26b95f03ed92b367cfa27c0fdabf73983c725aab8f00fc84ff0459118d717
6
+ metadata.gz: ce85fc384feb1a2042960d8ab9cba3fc257b3a49b46d5f56da3dace29186bdf1a0a5fb9a739857aeab8ab31fa898e3903a05b894b21c4cd95020ce3835ec0cfd
7
+ data.tar.gz: aa3db3b725e2ac7468626315d3ab0498bff42fa1d21705cd5ba147a75b0da16eac21e1e3cb065244ede955a8e32cbdc906eaed42516d599d96dfc50f901ca6d9
@@ -22,23 +22,23 @@ class YouTubeRails
22
22
  end
23
23
  end
24
24
 
25
- def self.youtube_embed_url(youtube_url, width = 420, height = 315, options = {})
25
+ def self.youtube_embed_url(youtube_url, width = 420, height = 315, **options)
26
26
  %(<iframe width="#{width}" height="#{height}" src="#{ youtube_embed_url_only(youtube_url, options) }" frameborder="0" allowfullscreen></iframe>)
27
27
  end
28
28
 
29
- def self.youtube_regular_url(youtube_url, options = {})
29
+ def self.youtube_regular_url(youtube_url, **options)
30
30
  vid_id = extract_video_id(youtube_url)
31
31
  "http#{'s' if options[:ssl]}://www.youtube.com/watch?v=#{ vid_id }"
32
32
  end
33
33
 
34
- def self.youtube_shortened_url(youtube_url, options = {})
34
+ def self.youtube_shortened_url(youtube_url, **options)
35
35
  vid_id = extract_video_id(youtube_url)
36
36
  "http#{'s' if options[:ssl]}://youtu.be/#{ vid_id }"
37
37
  end
38
38
 
39
- def self.youtube_embed_url_only(youtube_url, options = {})
39
+ def self.youtube_embed_url_only(youtube_url, **options)
40
40
  vid_id = extract_video_id(youtube_url)
41
- "http#{'s' if options[:ssl]}://www.youtube.com/embed/#{ vid_id }#{'?rel=0' if options[:disable_suggestion]}"
41
+ "http#{'s' if options[:ssl]}://www.youtube.com/embed/#{ vid_id }#{'?rel=0' if options[:disable_suggestion]}"
42
42
  end
43
43
 
44
44
  def self.extract_video_image(youtube_url, version = 'default')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: youtube_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Luiz Picolo
@@ -36,7 +36,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
36
36
  version: '0'
37
37
  requirements: []
38
38
  rubyforge_project:
39
- rubygems_version: 2.4.8
39
+ rubygems_version: 2.5.1
40
40
  signing_key:
41
41
  specification_version: 4
42
42
  summary: YouTube address helper