convert 0.1.6 → 0.1.7
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/.gitignore +1 -0
- data/CHANGELOG.md +4 -0
- data/README.md +4 -1
- data/convert.gemspec +2 -2
- data/lib/converters/sanitize.rb +2 -2
- 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: d0d08c1c492c20d6bffca89a7f7a48fdc6e8e43f
|
|
4
|
+
data.tar.gz: 824ebb2f0987124864c82a20dc334b6d9d410e74
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccaf8f1ed2b14863320223d80b564724fdf483c4eed1e41d3263616151e587c7ce9ea53423e2c6dab1f0c7f41eb8d57b09de1647982e48994050f3bfc34f8722
|
|
7
|
+
data.tar.gz: 923ee01389bdb31c9d7ff4832a4f873078bb954d1cf3d220f9e4c7ef73c5e849d68aeb2d7196a45f0ab4ff8efc935052bedb0a652d619fadbf78f91f69bfd598
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
|
@@ -26,7 +26,7 @@ Convert.auto_link('https://crowdfundhq.com')
|
|
|
26
26
|
# Embed dailymotion videos (https://dailymotion.com)
|
|
27
27
|
Convert.dailymotion('string')
|
|
28
28
|
|
|
29
|
-
# Decode HTML, opposite of
|
|
29
|
+
# Decode HTML, opposite of below
|
|
30
30
|
Convert.decode('string')
|
|
31
31
|
|
|
32
32
|
# Encode HTML with HTMLEntities
|
|
@@ -35,6 +35,9 @@ Convert.encode('string')
|
|
|
35
35
|
# Remove embedded videos from emails
|
|
36
36
|
Convert.email_escape('string')
|
|
37
37
|
|
|
38
|
+
# Embed facebook video (https://www.facebook.com)
|
|
39
|
+
Convert.facebook_embed('string')
|
|
40
|
+
|
|
38
41
|
# Embed flickr content (https://flickr.com)
|
|
39
42
|
Convert.flickr('string')
|
|
40
43
|
|
data/convert.gemspec
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'convert'
|
|
3
|
-
s.version = '0.1.
|
|
4
|
-
s.date = '2017-
|
|
3
|
+
s.version = '0.1.7'
|
|
4
|
+
s.date = '2017-11-21'
|
|
5
5
|
s.summary = "Convert strings and HTML to links and embedded content"
|
|
6
6
|
s.description = "Easily convert any string and replace with links and embedded content from a long list of providers and libraries."
|
|
7
7
|
s.authors = ["Fugroup Limited"]
|
data/lib/converters/sanitize.rb
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
module Convert
|
|
2
2
|
module Converters
|
|
3
3
|
|
|
4
|
-
|
|
4
|
+
# Built in configs: :custom, :full, :linebreaks, :simple, :restricted, :basic, :relaxed
|
|
5
5
|
|
|
6
6
|
def sanitize(string, options = {})
|
|
7
7
|
return string if options[:config] == false
|
|
8
8
|
options = {:config => nil}.merge(options)
|
|
9
|
-
config = Object.const_get("Sanitize::Config::#{options[:config].to_s.upcase}")
|
|
9
|
+
config = Object.const_get("Sanitize::Config::#{options[:config].to_s.upcase}")
|
|
10
10
|
Sanitize.fragment(string, config || {})
|
|
11
11
|
end
|
|
12
12
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: convert
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.7
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fugroup Limited
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-
|
|
11
|
+
date: 2017-11-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: redcarpet
|
|
@@ -197,7 +197,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
197
197
|
version: '0'
|
|
198
198
|
requirements: []
|
|
199
199
|
rubyforge_project:
|
|
200
|
-
rubygems_version: 2.6.
|
|
200
|
+
rubygems_version: 2.6.12
|
|
201
201
|
signing_key:
|
|
202
202
|
specification_version: 4
|
|
203
203
|
summary: Convert strings and HTML to links and embedded content
|