jekyll-autolinks 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +114 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +100 -0
- data/LICENSE +12 -0
- data/Makefile +25 -0
- data/NOTICE +0 -0
- data/README.md +65 -0
- data/Rakefile +9 -0
- data/jekyll-autolinks.gemspec +26 -0
- data/lib/jekyll-autolinks.rb +32 -0
- data/test/helper.rb +5 -0
- data/test/test_autolinks.rb +74 -0
- metadata +141 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 1efbf4080e17ee8c6baacd375198514960375306d00ae5db4a690fe6e39afbbc
|
4
|
+
data.tar.gz: 6f5b547545094a894e4e57950e0dc709d2b1d4ce5d58ab8e771448920d7ec96a
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 590a2c2236f07c1f548092fdd1bdaa15e9323a6fd6e00b721746ecfdb8d6d7a54e3dfee17ca12af57a3aa40be69b66cd01e75217f95e465b038957234139ed47
|
7
|
+
data.tar.gz: 50dd8ed83ec0b59cfc5cdbcafe390daa88465af649e0f4c03cdecaa8ba27aace434b8ecbf7fafd713cca73b002c364c6ec0384ba3849e6d2bbf7b1d75115ae9c
|
data/.gitignore
ADDED
@@ -0,0 +1,114 @@
|
|
1
|
+
# Created by https://www.toptal.com/developers/gitignore/api/ruby,macos,vim
|
2
|
+
# Edit at https://www.toptal.com/developers/gitignore?templates=ruby,macos,vim
|
3
|
+
|
4
|
+
### macOS ###
|
5
|
+
# General
|
6
|
+
.DS_Store
|
7
|
+
.AppleDouble
|
8
|
+
.LSOverride
|
9
|
+
|
10
|
+
# Icon must end with two \r
|
11
|
+
Icon
|
12
|
+
|
13
|
+
# Thumbnails
|
14
|
+
._*
|
15
|
+
|
16
|
+
# Files that might appear in the root of a volume
|
17
|
+
.DocumentRevisions-V100
|
18
|
+
.fseventsd
|
19
|
+
.Spotlight-V100
|
20
|
+
.TemporaryItems
|
21
|
+
.Trashes
|
22
|
+
.VolumeIcon.icns
|
23
|
+
.com.apple.timemachine.donotpresent
|
24
|
+
|
25
|
+
# Directories potentially created on remote AFP share
|
26
|
+
.AppleDB
|
27
|
+
.AppleDesktop
|
28
|
+
Network Trash Folder
|
29
|
+
Temporary Items
|
30
|
+
.apdisk
|
31
|
+
|
32
|
+
### macOS Patch ###
|
33
|
+
# iCloud generated files
|
34
|
+
*.icloud
|
35
|
+
|
36
|
+
### Ruby ###
|
37
|
+
*.gem
|
38
|
+
*.rbc
|
39
|
+
/.config
|
40
|
+
/coverage/
|
41
|
+
/InstalledFiles
|
42
|
+
/pkg/
|
43
|
+
/spec/reports/
|
44
|
+
/spec/examples.txt
|
45
|
+
/test/tmp/
|
46
|
+
/test/version_tmp/
|
47
|
+
/tmp/
|
48
|
+
|
49
|
+
# Used by dotenv library to load environment variables.
|
50
|
+
# .env
|
51
|
+
|
52
|
+
# Ignore Byebug command history file.
|
53
|
+
.byebug_history
|
54
|
+
|
55
|
+
## Specific to RubyMotion:
|
56
|
+
.dat*
|
57
|
+
.repl_history
|
58
|
+
build/
|
59
|
+
*.bridgesupport
|
60
|
+
build-iPhoneOS/
|
61
|
+
build-iPhoneSimulator/
|
62
|
+
|
63
|
+
## Specific to RubyMotion (use of CocoaPods):
|
64
|
+
#
|
65
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
66
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
67
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
68
|
+
# vendor/Pods/
|
69
|
+
|
70
|
+
## Documentation cache and generated files:
|
71
|
+
/.yardoc/
|
72
|
+
/_yardoc/
|
73
|
+
/doc/
|
74
|
+
/rdoc/
|
75
|
+
|
76
|
+
## Environment normalization:
|
77
|
+
/.bundle/
|
78
|
+
/vendor/bundle
|
79
|
+
/lib/bundler/man/
|
80
|
+
|
81
|
+
# for a library or gem, you might want to ignore these files since the code is
|
82
|
+
# intended to run in multiple environments; otherwise, check them in:
|
83
|
+
# Gemfile.lock
|
84
|
+
# .ruby-version
|
85
|
+
# .ruby-gemset
|
86
|
+
|
87
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
88
|
+
.rvmrc
|
89
|
+
|
90
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
91
|
+
# .rubocop-https?--*
|
92
|
+
|
93
|
+
### Vim ###
|
94
|
+
# Swap
|
95
|
+
[._]*.s[a-v][a-z]
|
96
|
+
!*.svg # comment out if you don't need vector files
|
97
|
+
[._]*.sw[a-p]
|
98
|
+
[._]s[a-rt-v][a-z]
|
99
|
+
[._]ss[a-gi-z]
|
100
|
+
[._]sw[a-p]
|
101
|
+
|
102
|
+
# Session
|
103
|
+
Session.vim
|
104
|
+
Sessionx.vim
|
105
|
+
|
106
|
+
# Temporary
|
107
|
+
.netrwhist
|
108
|
+
*~
|
109
|
+
# Auto-generated tag files
|
110
|
+
tags
|
111
|
+
# Persistent undo
|
112
|
+
[._]*.un~
|
113
|
+
|
114
|
+
# End of https://www.toptal.com/developers/gitignore/api/ruby,macos,vim
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,100 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
jekyll-autolinks (0.1.0)
|
5
|
+
jekyll (>= 3.9.3)
|
6
|
+
rinku (~> 2.0.6)
|
7
|
+
|
8
|
+
GEM
|
9
|
+
remote: https://rubygems.org/
|
10
|
+
specs:
|
11
|
+
activesupport (7.0.5)
|
12
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
13
|
+
i18n (>= 1.6, < 2)
|
14
|
+
minitest (>= 5.1)
|
15
|
+
tzinfo (~> 2.0)
|
16
|
+
addressable (2.8.4)
|
17
|
+
public_suffix (>= 2.0.2, < 6.0)
|
18
|
+
colorator (1.1.0)
|
19
|
+
concurrent-ruby (1.2.2)
|
20
|
+
em-websocket (0.5.3)
|
21
|
+
eventmachine (>= 0.12.9)
|
22
|
+
http_parser.rb (~> 0)
|
23
|
+
eventmachine (1.2.7)
|
24
|
+
ffi (1.15.5)
|
25
|
+
forwardable-extended (2.6.0)
|
26
|
+
google-protobuf (3.23.3-arm64-darwin)
|
27
|
+
http_parser.rb (0.8.0)
|
28
|
+
i18n (1.14.1)
|
29
|
+
concurrent-ruby (~> 1.0)
|
30
|
+
jekyll (4.3.2)
|
31
|
+
addressable (~> 2.4)
|
32
|
+
colorator (~> 1.0)
|
33
|
+
em-websocket (~> 0.5)
|
34
|
+
i18n (~> 1.0)
|
35
|
+
jekyll-sass-converter (>= 2.0, < 4.0)
|
36
|
+
jekyll-watch (~> 2.0)
|
37
|
+
kramdown (~> 2.3, >= 2.3.1)
|
38
|
+
kramdown-parser-gfm (~> 1.0)
|
39
|
+
liquid (~> 4.0)
|
40
|
+
mercenary (>= 0.3.6, < 0.5)
|
41
|
+
pathutil (~> 0.9)
|
42
|
+
rouge (>= 3.0, < 5.0)
|
43
|
+
safe_yaml (~> 1.0)
|
44
|
+
terminal-table (>= 1.8, < 4.0)
|
45
|
+
webrick (~> 1.7)
|
46
|
+
jekyll-sass-converter (3.0.0)
|
47
|
+
sass-embedded (~> 1.54)
|
48
|
+
jekyll-watch (2.2.1)
|
49
|
+
listen (~> 3.0)
|
50
|
+
kramdown (2.4.0)
|
51
|
+
rexml
|
52
|
+
kramdown-parser-gfm (1.1.0)
|
53
|
+
kramdown (~> 2.0)
|
54
|
+
liquid (4.0.4)
|
55
|
+
listen (3.8.0)
|
56
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
57
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
58
|
+
mercenary (0.4.0)
|
59
|
+
minitest (5.18.1)
|
60
|
+
mocha (2.0.4)
|
61
|
+
ruby2_keywords (>= 0.0.5)
|
62
|
+
pathutil (0.16.2)
|
63
|
+
forwardable-extended (~> 2.6)
|
64
|
+
public_suffix (5.0.1)
|
65
|
+
rake (13.0.6)
|
66
|
+
rb-fsevent (0.11.2)
|
67
|
+
rb-inotify (0.10.1)
|
68
|
+
ffi (~> 1.0)
|
69
|
+
rexml (3.2.5)
|
70
|
+
rinku (2.0.6)
|
71
|
+
rouge (4.1.2)
|
72
|
+
ruby2_keywords (0.0.5)
|
73
|
+
safe_yaml (1.0.5)
|
74
|
+
sass-embedded (1.63.6-arm64-darwin)
|
75
|
+
google-protobuf (~> 3.23)
|
76
|
+
shoulda (4.0.0)
|
77
|
+
shoulda-context (~> 2.0)
|
78
|
+
shoulda-matchers (~> 4.0)
|
79
|
+
shoulda-context (2.0.0)
|
80
|
+
shoulda-matchers (4.5.1)
|
81
|
+
activesupport (>= 4.2.0)
|
82
|
+
terminal-table (3.0.2)
|
83
|
+
unicode-display_width (>= 1.1.1, < 3)
|
84
|
+
tzinfo (2.0.6)
|
85
|
+
concurrent-ruby (~> 1.0)
|
86
|
+
unicode-display_width (2.4.2)
|
87
|
+
webrick (1.8.1)
|
88
|
+
|
89
|
+
PLATFORMS
|
90
|
+
arm64-darwin-22
|
91
|
+
|
92
|
+
DEPENDENCIES
|
93
|
+
bundler
|
94
|
+
jekyll-autolinks!
|
95
|
+
mocha
|
96
|
+
rake
|
97
|
+
shoulda
|
98
|
+
|
99
|
+
BUNDLED WITH
|
100
|
+
2.4.10
|
data/LICENSE
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Copyright (c) 2023 ADoyle (adoyle.h@gmail.com)
|
2
|
+
Some rights reserved.
|
3
|
+
|
4
|
+
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
5
|
+
|
6
|
+
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
7
|
+
|
8
|
+
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
9
|
+
|
10
|
+
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
11
|
+
|
12
|
+
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
data/Makefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
.PHONY: test
|
2
|
+
test:
|
3
|
+
bundle exec rake test
|
4
|
+
|
5
|
+
.PHONY: install
|
6
|
+
install: init vendor/bundle
|
7
|
+
|
8
|
+
.PHONY: init
|
9
|
+
init:
|
10
|
+
bundle config set --local path 'vendor/bundle'
|
11
|
+
|
12
|
+
.PHONY: build
|
13
|
+
build:
|
14
|
+
bundle exec rake build
|
15
|
+
|
16
|
+
.PHONY: release
|
17
|
+
release:
|
18
|
+
bundle exec rake release
|
19
|
+
|
20
|
+
.PHONY: clean
|
21
|
+
clean:
|
22
|
+
rm -rf vendor
|
23
|
+
|
24
|
+
vendor/bundle:
|
25
|
+
bundle install
|
data/NOTICE
ADDED
File without changes
|
data/README.md
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
# Jekyll::Autolinks
|
2
|
+
|
3
|
+
Automatically create `<a>` DOMs from standard URLs for your Jekyll site.
|
4
|
+
|
5
|
+
In any html page or post, standard URLs and emails will be autolinked.
|
6
|
+
|
7
|
+
- `https://github.com/` => `<a href="https://github.com/">https://github.com/</a>`.
|
8
|
+
- `hi@gmail.com` => `<a href="mailto:hi@gmail.com">hi@gmail.com</a>`.
|
9
|
+
|
10
|
+
Modified based on [ivantsepp/jekyll-autolink_email](https://github.com/ivantsepp/jekyll-autolink_email).
|
11
|
+
|
12
|
+
## Installation
|
13
|
+
|
14
|
+
1. Add to your `Gemfile`:
|
15
|
+
|
16
|
+
```
|
17
|
+
gem 'jekyll-autolinks'
|
18
|
+
```
|
19
|
+
|
20
|
+
2. Add to your `_config.yml`:
|
21
|
+
|
22
|
+
```yml
|
23
|
+
gems:
|
24
|
+
- jekyll-autolinks
|
25
|
+
```
|
26
|
+
|
27
|
+
## Usage
|
28
|
+
|
29
|
+
## Configuration
|
30
|
+
|
31
|
+
Autolinking is done by [Rinku](https://github.com/vmg/rinku) so visit that gem for a more in-depth explanation of the configuration options:
|
32
|
+
|
33
|
+
```yml
|
34
|
+
autolink_email:
|
35
|
+
link_attr: 'target="_blank"'
|
36
|
+
skip_tags: ["a", "pre", "code", "kbd", "script"]
|
37
|
+
```
|
38
|
+
|
39
|
+
- `link_attr` is a string containing the link attributes for each link that will be generated. These attributes are not sanitized and will be include as-is in each generated link, e.g.
|
40
|
+
|
41
|
+
```
|
42
|
+
link_attr: 'target="_blank" class="my-link"'
|
43
|
+
# hi.com => '<a href="http://hi.com" target="_blank" class="my-link">hi.com</a>'
|
44
|
+
```
|
45
|
+
|
46
|
+
- `skip_tags` is a list of strings with the names of HTML tags that will be skipped when autolinking. If nil, this defaults to the value of the global Rinku.skip_tags, which is initially `["a", "pre", "code", "kbd", "script"]`.
|
47
|
+
|
48
|
+
## Suggestion, Bug Reporting, Contributing
|
49
|
+
|
50
|
+
**Before opening new Issue/Discussion/PR and posting any comments**, please read [Contributing Guidelines](https://gcg.adoyle.me/CONTRIBUTING).
|
51
|
+
|
52
|
+
## Copyright and License
|
53
|
+
|
54
|
+
Copyright 2023 ADoyle (adoyle.h@gmail.com). Some Rights Reserved.
|
55
|
+
The project is licensed under the **BSD 3-clause License**.
|
56
|
+
|
57
|
+
Read the [LICENSE][] file for the specific language governing permissions and limitations under the License.
|
58
|
+
|
59
|
+
Read the [NOTICE][] file distributed with this work for additional information regarding copyright ownership.
|
60
|
+
|
61
|
+
|
62
|
+
<!-- links -->
|
63
|
+
|
64
|
+
[LICENSE]: ./LICENSE
|
65
|
+
[NOTICE]: ./NOTICE
|
data/Rakefile
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "jekyll-autolinks"
|
7
|
+
spec.version = "0.1.0"
|
8
|
+
spec.authors = ["ADoyle"]
|
9
|
+
spec.email = ["adoyle.h@gmail.com"]
|
10
|
+
spec.summary = "Autolink for your Jekyll site."
|
11
|
+
spec.description = "Automatically create <a> DOMs from standard URLs."
|
12
|
+
spec.homepage = "https://github.com/adoyle-h/jekyll-autolinks"
|
13
|
+
spec.license = "BSD-3-Clause"
|
14
|
+
|
15
|
+
spec.files = `git ls-files -z`.split("\x0")
|
16
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
17
|
+
spec.require_paths = ["lib"]
|
18
|
+
|
19
|
+
spec.add_dependency "jekyll", '>= 3.9.3'
|
20
|
+
spec.add_dependency "rinku", '~> 2.0.6'
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
spec.add_development_dependency "shoulda"
|
25
|
+
spec.add_development_dependency "mocha"
|
26
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require 'jekyll'
|
2
|
+
require 'rinku'
|
3
|
+
|
4
|
+
module Jekyll
|
5
|
+
class Autolinks < Jekyll::Generator
|
6
|
+
safe true
|
7
|
+
|
8
|
+
def initialize(config)
|
9
|
+
config['autolinks'] ||= {}
|
10
|
+
end
|
11
|
+
|
12
|
+
def generate(site)
|
13
|
+
@site = site
|
14
|
+
site.pages.each { |page| autolinkify page if page.html?}
|
15
|
+
site.posts.docs.each { |page| autolinkify page }
|
16
|
+
end
|
17
|
+
|
18
|
+
private
|
19
|
+
|
20
|
+
def autolinkify(page)
|
21
|
+
page.content = +Rinku.auto_link(page.content, :all, link_attr, skip_tags)
|
22
|
+
end
|
23
|
+
|
24
|
+
def link_attr
|
25
|
+
@link_attr ||= @site.config['autolinks']['link_attr']
|
26
|
+
end
|
27
|
+
|
28
|
+
def skip_tags
|
29
|
+
@skip_tags ||= Array(@site.config['autolinks']['skip_tags'])
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
data/test/helper.rb
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class Jekyll::AutolinksTest < Minitest::Test
|
4
|
+
context 'Autolinks' do
|
5
|
+
setup do
|
6
|
+
@site = Jekyll::Site.new(Jekyll::Configuration::DEFAULTS.dup)
|
7
|
+
@autolinks = Jekyll::Autolinks.new(@site.config)
|
8
|
+
@page = Jekyll::Page.new(@site, File.expand_path('../../', __FILE__), '', 'README.md')
|
9
|
+
@page.instance_variable_set(:@content, '<div>hi@gmail.com</div>')
|
10
|
+
@site.pages << @page
|
11
|
+
@email_link = '<div><a href="mailto:hi@gmail.com">hi@gmail.com</a></div>'
|
12
|
+
end
|
13
|
+
|
14
|
+
should 'replace https url with link' do
|
15
|
+
@page.instance_variable_set(:@content, 'https://123.com')
|
16
|
+
@autolinks.instance_variable_set(:@site, @site)
|
17
|
+
@autolinks.send(:autolinkify, @page)
|
18
|
+
assert_equal '<a href="https://123.com">https://123.com</a>', @page.content
|
19
|
+
end
|
20
|
+
|
21
|
+
should 'replace http url with link' do
|
22
|
+
@page.instance_variable_set(:@content, 'http://123.com')
|
23
|
+
@autolinks.instance_variable_set(:@site, @site)
|
24
|
+
@autolinks.send(:autolinkify, @page)
|
25
|
+
assert_equal '<a href="http://123.com">http://123.com</a>', @page.content
|
26
|
+
end
|
27
|
+
|
28
|
+
should 'replace url with link (with link_attr)' do
|
29
|
+
@autolinks = Jekyll::Autolinks.new(@site.config)
|
30
|
+
@site.config['autolinks']['link_attr'] = 'target="_blank" class="my-link"'
|
31
|
+
@page.instance_variable_set(:@content, 'http://123.com')
|
32
|
+
@autolinks.instance_variable_set(:@site, @site)
|
33
|
+
@autolinks.send(:autolinkify, @page)
|
34
|
+
assert_equal '<a href="http://123.com" target="_blank" class="my-link">http://123.com</a>', @page.content
|
35
|
+
end
|
36
|
+
|
37
|
+
should 'replace email with link' do
|
38
|
+
@autolinks.instance_variable_set(:@site, @site)
|
39
|
+
@autolinks.send(:autolinkify, @page)
|
40
|
+
assert_equal @email_link, @page.content
|
41
|
+
end
|
42
|
+
|
43
|
+
should 'replace page content on generate' do
|
44
|
+
@autolinks.generate(@site)
|
45
|
+
assert_equal @email_link, @page.content
|
46
|
+
end
|
47
|
+
|
48
|
+
should 'replace page content on site#generate' do
|
49
|
+
@site.generators = Array(@autolinks)
|
50
|
+
@site.generate
|
51
|
+
assert_equal @email_link, @page.content
|
52
|
+
end
|
53
|
+
|
54
|
+
should 'pull link_attr from config' do
|
55
|
+
@site.config['autolinks']['link_attr'] = 'class="ivan"'
|
56
|
+
@autolinks.generate(@site)
|
57
|
+
assert @page.content.include?('class="ivan"')
|
58
|
+
end
|
59
|
+
|
60
|
+
should 'pull skip_tags from config' do
|
61
|
+
@site.config['autolinks']['skip_tags'] = 'div'
|
62
|
+
@autolinks.generate(@site)
|
63
|
+
assert_equal '<div>hi@gmail.com</div>', @page.content
|
64
|
+
end
|
65
|
+
|
66
|
+
should 'not replace email with link if page is not html' do
|
67
|
+
@page = Jekyll::Page.new(@site, File.expand_path('../../', __FILE__), '', 'LICENSE')
|
68
|
+
@page.instance_variable_set(:@content, '<div>adoyle.h@gmail.com</div>')
|
69
|
+
@site.pages << @page
|
70
|
+
@autolinks.generate(@site)
|
71
|
+
assert_equal '<div>adoyle.h@gmail.com</div>', @page.content
|
72
|
+
end
|
73
|
+
end
|
74
|
+
end
|
metadata
ADDED
@@ -0,0 +1,141 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: jekyll-autolinks
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ADoyle
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-06-23 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: jekyll
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 3.9.3
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.9.3
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rinku
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 2.0.6
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 2.0.6
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '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: shoulda
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mocha
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: Automatically create <a> DOMs from standard URLs.
|
98
|
+
email:
|
99
|
+
- adoyle.h@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- Gemfile
|
106
|
+
- Gemfile.lock
|
107
|
+
- LICENSE
|
108
|
+
- Makefile
|
109
|
+
- NOTICE
|
110
|
+
- README.md
|
111
|
+
- Rakefile
|
112
|
+
- jekyll-autolinks.gemspec
|
113
|
+
- lib/jekyll-autolinks.rb
|
114
|
+
- test/helper.rb
|
115
|
+
- test/test_autolinks.rb
|
116
|
+
homepage: https://github.com/adoyle-h/jekyll-autolinks
|
117
|
+
licenses:
|
118
|
+
- BSD-3-Clause
|
119
|
+
metadata: {}
|
120
|
+
post_install_message:
|
121
|
+
rdoc_options: []
|
122
|
+
require_paths:
|
123
|
+
- lib
|
124
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
130
|
+
requirements:
|
131
|
+
- - ">="
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: '0'
|
134
|
+
requirements: []
|
135
|
+
rubygems_version: 3.4.10
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: Autolink for your Jekyll site.
|
139
|
+
test_files:
|
140
|
+
- test/helper.rb
|
141
|
+
- test/test_autolinks.rb
|