html-pipeline-vimeo 0.1.0 → 0.1.1
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 +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.md +5 -0
- data/README.md +1 -1
- data/lib/html/pipeline/vimeo/version.rb +1 -1
- data/lib/html/pipeline/vimeo/vimeo_filter.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6b3fe931751fa55e846be71a3852bbff173b0c48
|
|
4
|
+
data.tar.gz: 6c463efa06301b8c49b19c7523dd0151061e2dd2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7b76cff6a21cc1083e198740fb62ab01a0d65e09f1330487fab0f2d6cc1b9ba2eca722668c373229b9fbd578afdb0dda66047e033074a227204492c10e058e9f
|
|
7
|
+
data.tar.gz: c5eb2a0796630a8da6901978482492f93088131395f376619d1c09103d7f44fc10c65d7b427a936961213190ce1922076012acb31b4d0152eb2e13d54fb8b668
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -17,7 +17,7 @@ You can add `HTML::Pipeline::VimeoFilter` into your pipeline like this:
|
|
|
17
17
|
```ruby
|
|
18
18
|
pipeline = HTML::Pipeline.new [
|
|
19
19
|
HTML::Pipeline::VimeoFilter,
|
|
20
|
-
HTML::Pipeline::MarkdownFilter
|
|
20
|
+
HTML::Pipeline::MarkdownFilter # or any other filters
|
|
21
21
|
]
|
|
22
22
|
result = pipeline.call(text)
|
|
23
23
|
```
|
|
@@ -16,13 +16,13 @@ module HTML
|
|
|
16
16
|
# This filter does not write additional information to the context.
|
|
17
17
|
class VimeoFilter < TextFilter
|
|
18
18
|
def call
|
|
19
|
-
regex = /https?:\/\/(www.)?vimeo\.com\/([A-Za-z0-9._%-]*)((\?|#)\S+)?/
|
|
19
|
+
regex = /(\s|^)https?:\/\/(www.)?vimeo\.com\/([A-Za-z0-9._%-]*)((\?|#)\S+)?/
|
|
20
20
|
@text.gsub(regex) do
|
|
21
|
-
vimeo_id = $
|
|
21
|
+
vimeo_id = $3
|
|
22
22
|
width = context[:vimeo_width] || 440
|
|
23
23
|
height = context[:vimeo_height] || 248
|
|
24
24
|
show_title = "title=0" unless context[:vimeo_show_title]
|
|
25
|
-
show_byline = "byline=0" unless context[:vimeo_show_byline]
|
|
25
|
+
show_byline = "byline=0" unless context[:vimeo_show_byline]
|
|
26
26
|
show_portrait = "portrait=0" unless context[:vimeo_show_portrait]
|
|
27
27
|
allow_fullscreen = " webkitallowfullscreen mozallowfullscreen allowfullscreen" if context[:vimeo_allow_fullscreen]
|
|
28
28
|
frameborder = context[:vimeo_frameborder] || 0
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: html-pipeline-vimeo
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Richard Lee
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-
|
|
11
|
+
date: 2015-11-24 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: html-pipeline
|
|
@@ -108,7 +108,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
108
108
|
version: '0'
|
|
109
109
|
requirements: []
|
|
110
110
|
rubyforge_project:
|
|
111
|
-
rubygems_version: 2.4.
|
|
111
|
+
rubygems_version: 2.4.5.1
|
|
112
112
|
signing_key:
|
|
113
113
|
specification_version: 4
|
|
114
114
|
summary: An HTML::Pipeline filter for Vimeo links
|