jekyll-email-protect 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. checksums.yaml +7 -0
  2. data/LICENSE.md +21 -0
  3. data/README.md +50 -0
  4. data/lib/jekyll-email-protect.rb +11 -0
  5. metadata +118 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 49aef42f85f248f6e7b00229d4c40fcd5f4fabb1
4
+ data.tar.gz: 7ba84f7328c3cf57aebf83a172c92309d684b657
5
+ SHA512:
6
+ metadata.gz: a204a430f683104401d26ff7f4edbbf0f5a216744123fe3c05fedc68b26de9aa1d7e0ea4ebf5b83f1d3e6d99ca1165978c317504d9b1bc49cdcecb7d9ab134d8
7
+ data.tar.gz: 3d4dcea9eba4e0ba44dc3b7e5e54c9db1d6c70bf74ee6513e14628967b89214df7e69a4312c4cf29cd0b5f9167e15da03e8faaf3e5b32fc322f34e8e1bfd54ef
data/LICENSE.md ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Vincent Wochnik.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,50 @@
1
+ # Jekyll Email Protect [![Gem Version](https://badge.fury.io/rb/jekyll-email-protect.png)](http://badge.fury.io/rb/jekyll-email-protect)
2
+
3
+ > Email protection liquid filter for Jekyll
4
+
5
+ Jekyll Email Protect is an email protection liquid filter which can be used to obfuscate `mailto:` links to protect an email address from span bots.
6
+
7
+ ## Installation
8
+
9
+ This plugin is available as a [RubyGem][ruby-gem].
10
+
11
+ Add this line to your application's `Gemfile`:
12
+
13
+ ```
14
+ gem 'jekyll-email-protect'
15
+ ```
16
+
17
+ And then execute the `bundle` command to install the gem.
18
+
19
+ Alternatively, you can also manually install the gem using the following command:
20
+
21
+ ```
22
+ $ gem install jekyll-email-protect
23
+ ```
24
+
25
+ After the plugin has been installed successfully, add the following lines to your `_config.yml` in order to tell Jekyll to use the plugin:
26
+
27
+ ```
28
+ gems:
29
+ - jekyll-email-protect
30
+ ```
31
+
32
+ ## Getting Started
33
+
34
+ In your markup, simply use the `protect_email` liquid filter made available through this plugin:
35
+
36
+ ```
37
+ {{ 'example@example.com' | protect_email }}
38
+ ```
39
+
40
+ # Contribute
41
+
42
+ Fork this repository, make your changes and then issue a pull request. If you find bugs or have new ideas that you do not want to implement yourself, file a bug report.
43
+
44
+ # Copyright
45
+
46
+ Copyright (c) 2015 Vincent Wochnik.
47
+
48
+ License: MIT
49
+
50
+ [ruby-gem]: https://rubygems.org/gems/jekyll-language-plugin
@@ -0,0 +1,11 @@
1
+ require 'addressable/uri'
2
+
3
+ module JekyllEmailProtect
4
+ module EmailProtectionFilter
5
+ def protect_email(email)
6
+ Addressable::URI.encode_component(email, /[^\.@]/)
7
+ end
8
+ end
9
+ end
10
+
11
+ Liquid::Template.register_filter(JekyllEmailProtect::EmailProtectionFilter)
metadata ADDED
@@ -0,0 +1,118 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jekyll-email-protect
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Vincent Wochnik
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-11-20 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: addressable
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - '>='
18
+ - !ruby/object:Gem::Version
19
+ version: 2.3.8
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - '>='
25
+ - !ruby/object:Gem::Version
26
+ version: 2.3.8
27
+ - !ruby/object:Gem::Dependency
28
+ name: jekyll
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ~>
32
+ - !ruby/object:Gem::Version
33
+ version: '3.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ~>
39
+ - !ruby/object:Gem::Version
40
+ version: '3.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ~>
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ~>
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rake
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: bundler
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ~>
74
+ - !ruby/object:Gem::Version
75
+ version: '1.6'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ~>
81
+ - !ruby/object:Gem::Version
82
+ version: '1.6'
83
+ description: Email protection liquid filter for Jekyll
84
+ email:
85
+ - v.wochnik@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - lib/jekyll-email-protect.rb
91
+ - README.md
92
+ - LICENSE.md
93
+ homepage: https://github.com/vwochnik/jekyll-email-protect
94
+ licenses:
95
+ - MIT
96
+ metadata: {}
97
+ post_install_message:
98
+ rdoc_options: []
99
+ require_paths:
100
+ - lib
101
+ required_ruby_version: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - '>='
104
+ - !ruby/object:Gem::Version
105
+ version: '0'
106
+ required_rubygems_version: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ requirements: []
112
+ rubyforge_project:
113
+ rubygems_version: 2.0.14
114
+ signing_key:
115
+ specification_version: 4
116
+ summary: This plugin provides a simple liquid filter which converts emails into percent-encoded
117
+ strings.
118
+ test_files: []