convert 0.1.6 → 0.1.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: efbe8933520a3df3df19a696860fdfa36e46bbb3
4
- data.tar.gz: f5d4f69d27866528472b01e88c355c0bc8c04880
3
+ metadata.gz: d0d08c1c492c20d6bffca89a7f7a48fdc6e8e43f
4
+ data.tar.gz: 824ebb2f0987124864c82a20dc334b6d9d410e74
5
5
  SHA512:
6
- metadata.gz: 2e6cf0cfef2c2554a3bdc7f618ddd4694409cfcdb0fe15aca56eaf53c874a009bb9cf9be9840046c897ae480ac9d3caafb33bccfc2c268f82261465a23058fbc
7
- data.tar.gz: 8ce2123522d35f2e8c801b20ba9a2e150dad511e90cadc119c2936628fda80a9464ee18c72be47881b2efa0c0a72860d111b5989afcf00acee9f45a4476f8abf
6
+ metadata.gz: ccaf8f1ed2b14863320223d80b564724fdf483c4eed1e41d3263616151e587c7ce9ea53423e2c6dab1f0c7f41eb8d57b09de1647982e48994050f3bfc34f8722
7
+ data.tar.gz: 923ee01389bdb31c9d7ff4832a4f873078bb954d1cf3d220f9e4c7ef73c5e849d68aeb2d7196a45f0ab4ff8efc935052bedb0a652d619fadbf78f91f69bfd598
data/.gitignore CHANGED
@@ -1,2 +1,3 @@
1
1
  .bundle
2
2
  Gemfile.lock
3
+ .DS_Store
@@ -1,3 +1,7 @@
1
+ **Version 0.1.7** - *2017-21-11*
2
+
3
+ - Allow custom sanitize
4
+
1
5
  **Version 0.1.6** - *2017-26-04*
2
6
 
3
7
  - Added Facebook embed
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 above
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
 
@@ -1,7 +1,7 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'convert'
3
- s.version = '0.1.6'
4
- s.date = '2017-04-26'
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"]
@@ -1,12 +1,12 @@
1
1
  module Convert
2
2
  module Converters
3
3
 
4
- CONFIGS = [:custom, :full, :linebreaks, :simple, :restricted, :basic, :relaxed]
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}") if CONFIGS.include?(options[:config])
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.6
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-04-26 00:00:00.000000000 Z
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.10
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