publify_textfilter_youtube 10.0.0
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 +7 -0
- data/CHANGELOG.md +5 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +12 -0
- data/config/routes.rb +4 -0
- data/lib/publify_app/textfilter_youtube.rb +44 -0
- data/lib/publify_textfilter_youtube/engine.rb +6 -0
- data/lib/publify_textfilter_youtube/version.rb +5 -0
- data/lib/publify_textfilter_youtube.rb +9 -0
- data/lib/tasks/manifest.rake +30 -0
- data/lib/tasks/publify_textfilter_youtube_tasks.rake +6 -0
- metadata +166 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 157376d1502a48b686ee1dd31d833b7ac64743e09734f3d234a5963cce27e3f3
|
4
|
+
data.tar.gz: 03cc9ab46ad9955a22d6eb7f88643aadb112a025fe39de5d888fcbb268ef41b2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 94c8d529ced6100f818dc05880ab023a5da1b3c7c8ffe07515569c223acf8dadf91110899d4c99dbc6fb9cdd59e57df10aab3d59a223e6003dab4b4b494c3e99
|
7
|
+
data.tar.gz: c9b2103b4a0f134e78ea4e9c4015af823a3dd295eed0b83cb617c6f97047bc0b0fb5ccc40418a722c65b4bb8494212bf64ff403a00a99f157db33c7dda1f67b2
|
data/CHANGELOG.md
ADDED
data/MIT-LICENSE
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
Copyright 2016 Matijs van Zuijlen
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
= PublifyTextfilterYoutube
|
2
|
+
|
3
|
+
You can use <code><publify:youtube v="eXamPL" /></code> to embed Youtube videos.
|
4
|
+
|
5
|
+
Options:
|
6
|
+
|
7
|
+
* **v**. Required, the video_id.
|
8
|
+
* **width**. 560 by default.
|
9
|
+
* **height**. Height. 315 by default.
|
10
|
+
* **start**. Sets the start time
|
11
|
+
|
12
|
+
This project uses MIT-LICENSE.
|
data/config/routes.rb
ADDED
@@ -0,0 +1,44 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
class PublifyApp
|
4
|
+
class Textfilter
|
5
|
+
class Youtube < TextFilterPlugin::MacroPre
|
6
|
+
plugin_display_name "Youtube"
|
7
|
+
plugin_description "Embed Youtube videos"
|
8
|
+
|
9
|
+
DEFAULT_OPTIONS = { width: 560,
|
10
|
+
height: 315 }.freeze
|
11
|
+
|
12
|
+
def self.help_text
|
13
|
+
%{
|
14
|
+
You can use `<publify:youtube v="eXamPL" />` to embed Youtube videos.
|
15
|
+
|
16
|
+
Options:
|
17
|
+
|
18
|
+
* **v**. Required, the video_id.
|
19
|
+
* **width**. 560 by default.
|
20
|
+
* **height**. Height. 315 by default.
|
21
|
+
* **start**. Sets the start time
|
22
|
+
}
|
23
|
+
end
|
24
|
+
|
25
|
+
def self.macrofilter(attrib)
|
26
|
+
video_id = attrib["v"]
|
27
|
+
return '' unless video_id # Video ID is required
|
28
|
+
|
29
|
+
width = attrib.fetch("width", DEFAULT_OPTIONS[:width])
|
30
|
+
height = attrib.fetch("height", DEFAULT_OPTIONS[:height])
|
31
|
+
start = attrib["start"]
|
32
|
+
|
33
|
+
src = "https://www.youtube.com/embed/#{video_id}"
|
34
|
+
src += "?start=#{start}" if start
|
35
|
+
|
36
|
+
"<iframe width=\"#{width}\" height=\"#{height}\" src=\"#{src}\" frameborder=\"0\"" \
|
37
|
+
' allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope;' \
|
38
|
+
' picture-in-picture; web-share"' \
|
39
|
+
' referrerpolicy="strict-origin-when-cross-origin" allowfullscreen>' \
|
40
|
+
'</iframe>'
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
namespace :manifest do
|
4
|
+
def gemmable_files
|
5
|
+
`git ls-files -z`.split("\x0").reject do |file|
|
6
|
+
file.match(%r{^(bin|spec)/}) ||
|
7
|
+
file.end_with?("/.keep") ||
|
8
|
+
file.start_with?(".") ||
|
9
|
+
%w(Manifest.txt Gemfile Rakefile publify_textfilter_youtube.gemspec).include?(file)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
def manifest_files
|
14
|
+
File.open("Manifest.txt").readlines.map(&:chomp)
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Create manifest"
|
18
|
+
task :create do
|
19
|
+
File.open("Manifest.txt", "w") do |manifest|
|
20
|
+
gemmable_files.each { |file| manifest.puts file }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
desc "Check manifest"
|
25
|
+
task :check do
|
26
|
+
unless gemmable_files == manifest_files
|
27
|
+
raise "Manifest check failed, try recreating the manifest"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,166 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: publify_textfilter_youtube
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 10.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Brad Johnson
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2024-11-22 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: publify_core
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 10.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 10.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec-rails
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '6.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '6.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rubocop
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 1.63.1
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 1.63.1
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rubocop-performance
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.21.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.21.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop-rails
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 2.25.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 2.25.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 3.0.1
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 3.0.1
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: simplecov
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 0.22.0
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 0.22.0
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: sqlite3
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '1.4'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '1.4'
|
125
|
+
description: Youtube text filter sidebar for the Publify blogging system.
|
126
|
+
email:
|
127
|
+
- climatebrad@gmail.com
|
128
|
+
executables: []
|
129
|
+
extensions: []
|
130
|
+
extra_rdoc_files: []
|
131
|
+
files:
|
132
|
+
- CHANGELOG.md
|
133
|
+
- MIT-LICENSE
|
134
|
+
- README.rdoc
|
135
|
+
- config/routes.rb
|
136
|
+
- lib/publify_app/textfilter_youtube.rb
|
137
|
+
- lib/publify_textfilter_youtube.rb
|
138
|
+
- lib/publify_textfilter_youtube/engine.rb
|
139
|
+
- lib/publify_textfilter_youtube/version.rb
|
140
|
+
- lib/tasks/manifest.rake
|
141
|
+
- lib/tasks/publify_textfilter_youtube_tasks.rake
|
142
|
+
homepage: https://github.com/climatebrad/publify_textfilter_youtube
|
143
|
+
licenses:
|
144
|
+
- MIT
|
145
|
+
metadata:
|
146
|
+
rubygems_mfa_required: 'true'
|
147
|
+
post_install_message:
|
148
|
+
rdoc_options: []
|
149
|
+
require_paths:
|
150
|
+
- lib
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: 3.0.0
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
requirements: []
|
162
|
+
rubygems_version: 3.5.23
|
163
|
+
signing_key:
|
164
|
+
specification_version: 4
|
165
|
+
summary: Youtube text filter for the Publify blogging system.
|
166
|
+
test_files: []
|