jekyll-target-blank 1.1.0 → 1.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (25) hide show
  1. checksums.yaml +4 -4
  2. data/lib/jekyll-target-blank.rb +1 -1
  3. data/lib/jekyll-target-blank/version.rb +1 -1
  4. data/spec/fixtures/{_config.yml → unit/_config.yml} +0 -0
  5. data/spec/fixtures/{_docs → unit/_docs}/document-with-a-processable-link.md +0 -0
  6. data/spec/fixtures/{_docs → unit/_docs}/document-with-include.md +0 -0
  7. data/spec/fixtures/{_docs → unit/_docs}/document-with-liquid-tag.md +0 -0
  8. data/spec/fixtures/{_docs → unit/_docs}/test-file.txt +0 -0
  9. data/spec/fixtures/{_includes → unit/_includes}/include.html +0 -0
  10. data/spec/fixtures/{_layouts → unit/_layouts}/default.html +0 -0
  11. data/spec/fixtures/{_posts → unit/_posts}/2018-05-17-post-with-plain-text-link.md +0 -0
  12. data/spec/fixtures/{_posts → unit/_posts}/2018-05-19-post-with-html-anchor-tag.md +0 -0
  13. data/spec/fixtures/{_posts → unit/_posts}/2018-05-20-post-with-external-markdown-link.md +0 -0
  14. data/spec/fixtures/{_posts → unit/_posts}/2018-05-21-post-with-relative-markdown-link.md +0 -0
  15. data/spec/fixtures/{_posts → unit/_posts}/2018-05-22-post-with-multiple-external-markdown-links.md +0 -0
  16. data/spec/fixtures/{_posts → unit/_posts}/2018-05-23-post-with-absolute-internal-markdown-link.md +0 -0
  17. data/spec/fixtures/{_posts → unit/_posts}/2018-05-24-post-with-code-block.md +0 -0
  18. data/spec/fixtures/{_posts → unit/_posts}/2018-05-30-post-with-mailto-link.md +0 -0
  19. data/spec/fixtures/{_posts → unit/_posts}/2018-07-02-post-with-external-html-link-and-random-css-classes.md +0 -0
  20. data/spec/fixtures/{_posts → unit/_posts}/2018-07-02-post-with-html-link-containing-the-specified-css-class.md +0 -0
  21. data/spec/fixtures/{_posts → unit/_posts}/2018-07-05-post-with-external-link-containing-the-specified-css-class-and-other-css-classes.md +0 -0
  22. data/spec/fixtures/{index.md → unit/index.md} +0 -0
  23. data/spec/jekyll-target_spec.rb +3 -3
  24. data/spec/spec_helper.rb +10 -3
  25. metadata +21 -21
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 1993a268ab84dcd8053bd725937f03770855f8f77d5003fff769f30587932cc6
4
- data.tar.gz: 6ce143880eb546bf657fc44dbece8644881db892b7241df5e25c653d1c83f69d
3
+ metadata.gz: aecbdddf56daa5fd8e04ecdfb98cda491a5485fa17a1e43b6eb5eda09dc7fc70
4
+ data.tar.gz: 1d828c4a96d7462bde744f63bb566ee3b9b7c040fcf1dd93692079a233870127
5
5
  SHA512:
6
- metadata.gz: 37602d2da75630a9f0d52fbb3c753706d1cd1f70a2d05ef6e6b0f15b7bd84b0e10d02379e5784701ddef35826e2b51de2864797087c604507103d39d9339297b
7
- data.tar.gz: d9e09b531a1785a6394cc17a14451021252bf3961b895f80102678888e676e7682a7d410c7a553c6b6523c6ae48e48de04fd1c7a3afaa836c98823e89ba4aa39
6
+ metadata.gz: 601f79a681dc075fd24c2ec24bbaea1a27990b76c4ea6def6bfb95dbd57f2b49c42615196911b70ce10c9693fb55590ae0a6fafc4b2ea9d8564b83c2ae2515a7
7
+ data.tar.gz: 15098f5195e42803f415e4d1df6ff1152a0f936944a8984338a1c05ac6b23face66e283f90eb1b2f7a378a2e525d42b907caa48ad1f4d9b79979589d071a454e
@@ -7,7 +7,7 @@ require "uri"
7
7
  module Jekyll
8
8
  class TargetBlank
9
9
  BODY_START_TAG = "<body"
10
- OPENING_BODY_TAG_REGEX = %r!<body(.*)>\s*!
10
+ OPENING_BODY_TAG_REGEX = %r!<body([^<>]*)>\s*!
11
11
 
12
12
  class << self
13
13
  # Public: Processes the content and updated the external links
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module JekyllTargetBlank
4
- VERSION = "1.1.0"
4
+ VERSION = "1.1.1"
5
5
  end
@@ -15,8 +15,8 @@ RSpec.describe(Jekyll::TargetBlank) do
15
15
  {
16
16
  "skip_config_files" => false,
17
17
  "collections" => { "docs" => { "output" => true } },
18
- "source" => fixtures_dir,
19
- "destination" => fixtures_dir("_site"),
18
+ "source" => unit_fixtures_dir,
19
+ "destination" => unit_fixtures_dir("_site"),
20
20
  }
21
21
  ))
22
22
  end
@@ -40,7 +40,7 @@ RSpec.describe(Jekyll::TargetBlank) do
40
40
  let(:document_with_a_processable_link) { find_by_title(site.collections["docs"].docs, "Document with a processable link") }
41
41
 
42
42
  let(:text_file) { find_by_title(site.collections["docs"].docs, "Text file") }
43
- 0
43
+
44
44
  let(:post_with_code_block) { find_by_title(posts, "Post with code block") }
45
45
  let(:document_with_liquid_tag) { find_by_title(site.collections["docs"].docs, "Document with liquid tag") }
46
46
 
@@ -3,9 +3,16 @@
3
3
  require File.expand_path("../lib/jekyll-target-blank.rb", __dir__)
4
4
 
5
5
  RSpec.configure do |config|
6
- FIXTURES_DIR = File.expand_path("fixtures", __dir__)
7
- def fixtures_dir(*paths)
8
- File.join(FIXTURES_DIR, *paths)
6
+ UNIT_FIXTURES_DIR = File.expand_path("fixtures/unit", __dir__)
7
+
8
+ INTEGRATION_FIXTURES_DIR = File.expand_path("fixtures/integration", __dir__)
9
+
10
+ def unit_fixtures_dir(*paths)
11
+ File.join(UNIT_FIXTURES_DIR, *paths)
12
+ end
13
+
14
+ def integration_fixtures_dir(*paths)
15
+ File.join(INTEGRATION_FIXTURES_DIR, *paths)
9
16
  end
10
17
 
11
18
  def find_by_title(docs, title)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-target-blank
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Keith Mifsud
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-08-02 00:00:00.000000000 Z
11
+ date: 2018-12-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -117,25 +117,25 @@ files:
117
117
  - scripts/cibuild
118
118
  - scripts/quality
119
119
  - scripts/test
120
- - spec/fixtures/_config.yml
121
- - spec/fixtures/_docs/document-with-a-processable-link.md
122
- - spec/fixtures/_docs/document-with-include.md
123
- - spec/fixtures/_docs/document-with-liquid-tag.md
124
- - spec/fixtures/_docs/test-file.txt
125
- - spec/fixtures/_includes/include.html
126
- - spec/fixtures/_layouts/default.html
127
- - spec/fixtures/_posts/2018-05-17-post-with-plain-text-link.md
128
- - spec/fixtures/_posts/2018-05-19-post-with-html-anchor-tag.md
129
- - spec/fixtures/_posts/2018-05-20-post-with-external-markdown-link.md
130
- - spec/fixtures/_posts/2018-05-21-post-with-relative-markdown-link.md
131
- - spec/fixtures/_posts/2018-05-22-post-with-multiple-external-markdown-links.md
132
- - spec/fixtures/_posts/2018-05-23-post-with-absolute-internal-markdown-link.md
133
- - spec/fixtures/_posts/2018-05-24-post-with-code-block.md
134
- - spec/fixtures/_posts/2018-05-30-post-with-mailto-link.md
135
- - spec/fixtures/_posts/2018-07-02-post-with-external-html-link-and-random-css-classes.md
136
- - spec/fixtures/_posts/2018-07-02-post-with-html-link-containing-the-specified-css-class.md
137
- - spec/fixtures/_posts/2018-07-05-post-with-external-link-containing-the-specified-css-class-and-other-css-classes.md
138
- - spec/fixtures/index.md
120
+ - spec/fixtures/unit/_config.yml
121
+ - spec/fixtures/unit/_docs/document-with-a-processable-link.md
122
+ - spec/fixtures/unit/_docs/document-with-include.md
123
+ - spec/fixtures/unit/_docs/document-with-liquid-tag.md
124
+ - spec/fixtures/unit/_docs/test-file.txt
125
+ - spec/fixtures/unit/_includes/include.html
126
+ - spec/fixtures/unit/_layouts/default.html
127
+ - spec/fixtures/unit/_posts/2018-05-17-post-with-plain-text-link.md
128
+ - spec/fixtures/unit/_posts/2018-05-19-post-with-html-anchor-tag.md
129
+ - spec/fixtures/unit/_posts/2018-05-20-post-with-external-markdown-link.md
130
+ - spec/fixtures/unit/_posts/2018-05-21-post-with-relative-markdown-link.md
131
+ - spec/fixtures/unit/_posts/2018-05-22-post-with-multiple-external-markdown-links.md
132
+ - spec/fixtures/unit/_posts/2018-05-23-post-with-absolute-internal-markdown-link.md
133
+ - spec/fixtures/unit/_posts/2018-05-24-post-with-code-block.md
134
+ - spec/fixtures/unit/_posts/2018-05-30-post-with-mailto-link.md
135
+ - spec/fixtures/unit/_posts/2018-07-02-post-with-external-html-link-and-random-css-classes.md
136
+ - spec/fixtures/unit/_posts/2018-07-02-post-with-html-link-containing-the-specified-css-class.md
137
+ - spec/fixtures/unit/_posts/2018-07-05-post-with-external-link-containing-the-specified-css-class-and-other-css-classes.md
138
+ - spec/fixtures/unit/index.md
139
139
  - spec/jekyll-target_spec.rb
140
140
  - spec/spec_helper.rb
141
141
  homepage: https://github.com/keithmifsud/jekyll-target-blank