html-pipeline-youtube 0.1.1 → 0.1.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 748fb098cd127c07772d305ec6bba9adb4a2aa1b
4
- data.tar.gz: 324632e540e71ae90d8de82950588018570a0d1a
3
+ metadata.gz: cf95b59cad749b3c40a105c6d125099f7f9fab43
4
+ data.tar.gz: 92ab4fedd9b6fadb9019633d6f7a1f9d002997ad
5
5
  SHA512:
6
- metadata.gz: fd6c082ccc1ae7d3013985afef5a3b8820779dc5114fda16533bc6ace963a254e32fb9521ef943573d4b0e3cc90d495f9de7badf775499d0b5081557fe3124d6
7
- data.tar.gz: 272cc6d9b1800fc1d6fe528ffbba2a9601634b5b334ed0d7a08c258127d4230f82a06b3021773f7b8b835fb9afff95a7e1274cd01a29162d6dc67c7e5b620fb0
6
+ metadata.gz: 6969d7e7294e3c30a7aee7c1d190f5e4799832ef05ef85d6522427fe694082fbe819b9421cebcaf27e2bb5404458acc198375766f0b8afe417dbd824fac71b38
7
+ data.tar.gz: de710642756bb1894e1557196eab71313857fa4cf37c281cfbdbb7423b5517ea4db7f5c02a8ee3701a37ec63df1964e5e1f1360c0fcbcdcae1e42d71a5ce646d
@@ -1,6 +1,6 @@
1
1
  language: ruby
2
-
3
- script: "bundle exec rspec"
2
+ sudo: false
3
+ cache: bundler
4
4
  rvm:
5
5
  - 2.0
6
6
  - 2.1
data/Rakefile CHANGED
@@ -1,2 +1,6 @@
1
1
  require "bundler/gem_tasks"
2
+ require 'rspec/core/rake_task'
2
3
 
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
@@ -1,7 +1,7 @@
1
1
  module HTML
2
2
  class Pipeline
3
3
  module Youtube
4
- VERSION = '0.1.1'
4
+ VERSION = '0.1.2'
5
5
  end
6
6
  end
7
7
  end
@@ -11,9 +11,9 @@ module HTML
11
11
  # :video_wmode - string, sets iframe's wmode option
12
12
  # :video_autoplay - boolean, whether video should autoplay
13
13
  # :video_hide_related - boolean, whether shows related videos
14
- regex = /(https?:\/\/)?(www.)?(youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/watch\?feature=player_embedded&v=)([A-Za-z0-9_-]*)(\&\S+)?(\?\S+)?/
14
+ regex = /(\s(https?:\/\/)|^(https?:\/\/))(www.)?(youtube\.com\/watch\?v=|youtu\.be\/|youtube\.com\/watch\?feature=player_embedded&v=)([A-Za-z0-9_-]*)(\&\S+)?(\?\S+)?/
15
15
  @text.gsub(regex) do
16
- youtube_id = $4
16
+ youtube_id = $6
17
17
  width = context[:video_width] || 420
18
18
  height = context[:video_height] || 315
19
19
  frameborder = context[:video_frameborder] || 0
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: html-pipeline-youtube
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stan Luo
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-07-28 00:00:00.000000000 Z
11
+ date: 2015-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: html-pipeline
@@ -78,7 +78,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
78
78
  version: '0'
79
79
  requirements: []
80
80
  rubyforge_project:
81
- rubygems_version: 2.4.5
81
+ rubygems_version: 2.4.5.1
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Youtube filter for html-pipeline