jekyll-glossary_tooltip 1.5.0 → 1.5.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 02fc27dec8d3491d154f94d40a371caec17b2da3b189d157f708a7ce522a7076
4
- data.tar.gz: 49e9d0b6e4f6312c7712df864f51345382e8562a3e124b471415824718ae13d2
3
+ metadata.gz: 101c1828dc5fe466819376a570327368e421dbdc9eefa31c9aedb660cab479db
4
+ data.tar.gz: eb71b1ebbea0819e97c3915b1cadc65f8bf40b91ed83f384cacdddd1e9a16a15
5
5
  SHA512:
6
- metadata.gz: 64c423fc44f600f08a8acbe45e94a86d91300efbe69941177529275f9ec8c1d55bb46d728aeba0a4c2b8c43af24e53d1393baf06e431530f05fc6024a0404daa
7
- data.tar.gz: 3d07bf135cee11a831071eee2c535eef932563eb7277a14e65db02a435d8e5ae85cd5b764d5afd0e4464e79d2367a829a9807b5755618d7c2048ccda4747e3ff
6
+ metadata.gz: 1d85579396ffdebe35a4c69c0e028acda18ff53a0d9c60eb56873a72a4ab3616ab7bcd718f22783fa807deb23774efade5657465e1292ced22afdd00421a6e51
7
+ data.tar.gz: bfbb20f9b579c5112f96cfb26d25880b14e05cf5784c45f43180c9bf4dd72b4a705f4adb76bf4813a1770388df4b87ffef096ea0819d50bc7eb9555893f7706d
data/.codeclimate.yml CHANGED
@@ -21,4 +21,4 @@ ratings:
21
21
  - "**.rb"
22
22
  - "**.js"
23
23
  exclude_paths:
24
- - script/
24
+ - scripts/
@@ -0,0 +1,3 @@
1
+ {
2
+ "postCreateCommand": "bash scripts/devcontainer_postCreateCommand.sh"
3
+ }
data/.rubocop.yml CHANGED
@@ -1,13 +1,13 @@
1
- # See pages relaed at https://docs.rubocop.org/rubocop/1.12/cops_layout.html
1
+ # See pages related at https://docs.rubocop.org/rubocop/1.12/cops_layout.html
2
2
 
3
- # Rubocop extensions
4
- require:
3
+ # Rubocop plugins
4
+ plugins:
5
5
  - rubocop-rake
6
6
  - rubocop-rspec
7
7
 
8
8
  inherit_mode:
9
9
  merge:
10
- - Exclude # Merge my AllCops.Excllude with default exludes from https://github.com/rubocop/rubocop/blob/master/config/default.yml
10
+ - Exclude # Merge my AllCops.Exclude with default excludes from https://github.com/rubocop/rubocop/blob/master/config/default.yml
11
11
 
12
12
  AllCops:
13
13
  TargetRubyVersion: 3.0
@@ -15,10 +15,10 @@ AllCops:
15
15
  - lib/**/*.rb
16
16
  - spec/**/*.rb
17
17
  Exclude:
18
- # Travis: during build there will be a lot of rubocop config files in this pat which will cause build failure as the refer to gems which are not installed by this project.
18
+ # Travis: during build there will be a lot of rubocop config files in this path which will cause build failure as the refer to gems which are not installed by this project.
19
19
  # See https://github.com/rubocop/rubocop/issues/9832
20
20
  - gemfiles/vendor/bundle/**/*
21
- NewCops: enable
21
+ NewCops: disable
22
22
 
23
23
  Gemspec/DeprecatedAttributeAssignment:
24
24
  Enabled: true
@@ -179,21 +179,22 @@ Rake:
179
179
  # https://github.com/rubocop/rubocop-rspec/blob/master/config/default.yml
180
180
  RSpec:
181
181
  Enabled: true
182
- RSpec/FilePath:
183
- # Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
184
- Enabled: false
185
182
  RSpec/IdenticalEqualityAssertion:
186
183
  Enabled: true
187
- RSpec/Rails/AvoidSetupHook:
188
- Enabled: false
189
184
  RSpec/BeforeAfterAll:
190
185
  Enabled: false
191
186
  RSpec/ExcessiveDocstringSpacing:
192
187
  Enabled: true
193
188
  RSpec/SubjectDeclaration:
194
189
  Enabled: true
195
- RSpec/FactoryBot/SyntaxMethods:
196
- Enabled: true
197
190
  RSpec/MultipleMemoizedHelpers:
198
191
  Enabled: true
199
192
  Max: 10
193
+ RSpec/SpecFilePathFormat:
194
+ # Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
195
+ Enabled: false
196
+ RSpec/SpecFilePathSuffix:
197
+ # Disable to match structure of lib/. For jekyll plugin inclusion convention features, not having lib/jekyll/sth.rb but lib/jekyll-sth.rb
198
+ Enabled: false
199
+ RSpec/IndexedLet:
200
+ Enabled: false
data/Appraisals CHANGED
@@ -1,4 +1,4 @@
1
- # Override jekyll verion from .gemspec
1
+ # Override jekyll version from .gemspec
2
2
 
3
3
  appraise "jekyll-3.7.x" do
4
4
  gem "jekyll", "~> 3.7"
data/CHANGELOG.md CHANGED
@@ -5,6 +5,9 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
5
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
6
 
7
7
  ## [Unreleased]
8
+ ## [1.5.1] - 2025-03-10
9
+ ### Fixed
10
+ - Strip newlines from generated HTML to prevent unnecessary spaces to be added. [#9](https://github.com/erikw/jekyll-glossary_tooltip/issues/9)
8
11
 
9
12
  ## [1.5.0] - 2022-09-08
10
13
  ### Added
data/Gemfile CHANGED
@@ -23,6 +23,7 @@ group :test do
23
23
  gem "rspec", "~> 3.0"
24
24
  gem "rubocop", "~> 1.18", require: false
25
25
  gem "rubocop-rake", "~> 0.6", require: false
26
- gem "rubocop-rspec", "~> 2.4", require: false
27
- gem "simplecov", "~> 0.21"
26
+ gem "rubocop-rspec", "~> 3.5", require: false
27
+ gem "simplecov", "~> 0.22"
28
+ gem "json_pure", "~> 2.8", require: false # Solargraph pulls in v2.6.3 which fails build with " uninitialized constant JSON::Fragment"
28
29
  end
data/README.md CHANGED
@@ -1,14 +1,20 @@
1
1
  # Jekyll Glossary Tooltip Tag Plugin [![Tweet](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=Get%20a%20nifty%20tooltip%20for%20term%20definitions%20in%20your%20Jekyll%20blog%20with%20this%20plugin&url=https://github.com/erikw/jekyll-glossary_tooltip&via=erik_westrup&hashtags=jekyll,plugin)
2
2
  [![Gem Version](https://badge.fury.io/rb/jekyll-glossary_tooltip.svg)](https://badge.fury.io/rb/jekyll-glossary_tooltip)
3
- [![Gem Downloads](https://ruby-gem-downloads-badge.herokuapp.com/jekyll-glossary_tooltip?color=brightgreen&type=total&label=gem%20downloads)](https://rubygems.org/gems/jekyll-glossary_tooltip)
4
- [![Travis Build Status](https://img.shields.io/travis/erikw/jekyll-glossary_tooltip/main?logo=travis)](https://app.travis-ci.com/github/erikw/jekyll-glossary_tooltip)
3
+ [![Gem Downloads](https://img.shields.io/gem/dt/jekyll-glossary_tooltip?label=gem%20downloads)](https://rubygems.org/gems/jekyll-glossary_tooltip)
4
+ [![Travis Build Status](https://img.shields.io/travis/com/erikw/jekyll-glossary_tooltip/main?logo=travis)](https://app.travis-ci.com/github/erikw/jekyll-glossary_tooltip)
5
5
  [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/7ffb648ec4b77f3f9eb8/maintainability)](https://codeclimate.com/github/erikw/jekyll-glossary_tooltip/maintainability)
6
6
  [![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/7ffb648ec4b77f3f9eb8/test_coverage)](https://codeclimate.com/github/erikw/jekyll-glossary_tooltip/test_coverage)
7
7
  [![CodeQL](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/codeql-analysis.yml/badge.svg)](https://github.com/erikw/jekyll-glossary_tooltip/actions/workflows/codeql-analysis.yml)
8
- [![SLOC](https://img.shields.io/tokei/lines/github/erikw/jekyll-glossary_tooltip?logo=codefactor&logoColor=lightgrey)](#)
8
+ [![SLOC](https://sloc.xyz/github/erikw/jekyll-glossary_tooltip?lower=true)](#)
9
+ [![Number of programming languages used](https://img.shields.io/github/languages/count/erikw/jekyll-glossary_tooltip)](#)
10
+ [![Top programming languages used](https://img.shields.io/github/languages/top/erikw/jekyll-glossary_tooltip)](#)
9
11
  [![License](https://img.shields.io/github/license/erikw/jekyll-glossary_tooltip)](LICENSE.txt)
10
12
  [![OSS Lifecycle](https://img.shields.io/osslifecycle/erikw/jekyll-glossary_tooltip)](https://github.com/Netflix/osstracker)
11
13
 
14
+ <p align="center">
15
+ <!-- Ref: https://dev.to/azure/adding-a-github-codespace-button-to-your-readme-5f6l -->
16
+ <a href="https://github.com/codespaces/new?hide_repo_select=true&ref=main&repo=390309485" title="Open in GitHub Codespaces" ><img alt="Open in GitHub Codespaces" src="https://github.com/codespaces/badge.svg"></a>
17
+ </p>
12
18
 
13
19
  :point_right: **Live demo**: https://erikw.github.io/jekyll-glossary_tooltip/
14
20
 
@@ -107,9 +113,10 @@ The structure of this plugin was inspired by [https://ayastreb.me/writing-a-jeky
107
113
 
108
114
  After checking out the repo;
109
115
  1. Install [RVM](https://rvm.io/rvm/install) and install a supported ruby version (see .gemspec)
110
- 1. run `script/setup` to install dependencies
111
- 1. run `script/test` to run the tests
112
- 1. You can also run `script/console` for an interactive prompt that will allow you to experiment.
116
+ 1. run `scripts/setup` to install dependencies
117
+ 1. run `scripts/test` to run the tests
118
+ * Run a specific test with `bundle exec rspec -e "name of test example"`
119
+ 1. You can also run `scripts/console` for an interactive prompt that will allow you to experiment.
113
120
 
114
121
  To install this gem onto your local machine, run `bundle exec rake install`.
115
122
 
@@ -168,7 +175,7 @@ For `--version`, use `major|minor|patch` as needed.
168
175
  - To generate new/updated gemfiles from `Appraisals`
169
176
  ```shell
170
177
  bundle exec appraisal install
171
- bundle exec appraisal generate --travis
178
+ bundle exec appraisal generate
172
179
  ```
173
180
 
174
181
  ## Travis
@@ -7,17 +7,20 @@ gem "kramdown", "2.3.1"
7
7
  gem "kramdown-parser-gfm", "~> 1.0"
8
8
 
9
9
  group :development, :test do
10
+ gem "appraisal", "~> 2.4", require: false
11
+ gem "gem-release", "~> 2.0", require: false
10
12
  gem "rake", "~> 13.0", require: false
13
+ gem "solargraph", require: false
11
14
  gem "travis", "~> 1.0", require: false
12
- gem "appraisal", "~> 2.4", require: false
13
15
  end
14
16
 
15
17
  group :test do
16
18
  gem "rspec", "~> 3.0"
17
19
  gem "rubocop", "~> 1.18", require: false
18
20
  gem "rubocop-rake", "~> 0.6", require: false
19
- gem "rubocop-rspec", "~> 2.4", require: false
20
- gem "simplecov", "~> 0.21"
21
+ gem "rubocop-rspec", "~> 3.5", require: false
22
+ gem "simplecov", "~> 0.22"
23
+ gem "json_pure", "~> 2.8", require: false
21
24
  end
22
25
 
23
26
  gemspec path: "../"
@@ -5,17 +5,20 @@ source "https://rubygems.org"
5
5
  gem "jekyll", "~> 4.0"
6
6
 
7
7
  group :development, :test do
8
+ gem "appraisal", "~> 2.4", require: false
9
+ gem "gem-release", "~> 2.0", require: false
8
10
  gem "rake", "~> 13.0", require: false
11
+ gem "solargraph", require: false
9
12
  gem "travis", "~> 1.0", require: false
10
- gem "appraisal", "~> 2.4", require: false
11
13
  end
12
14
 
13
15
  group :test do
14
16
  gem "rspec", "~> 3.0"
15
17
  gem "rubocop", "~> 1.18", require: false
16
18
  gem "rubocop-rake", "~> 0.6", require: false
17
- gem "rubocop-rspec", "~> 2.4", require: false
18
- gem "simplecov", "~> 0.21"
19
+ gem "rubocop-rspec", "~> 3.5", require: false
20
+ gem "simplecov", "~> 0.22"
21
+ gem "json_pure", "~> 2.8", require: false
19
22
  end
20
23
 
21
24
  gemspec path: "../"
@@ -6,7 +6,7 @@ Gem::Specification.new do |spec|
6
6
  spec.name = "jekyll-glossary_tooltip"
7
7
  spec.version = Jekyll::GlossaryTooltip::VERSION
8
8
  spec.authors = ["Erik Westrup"]
9
- spec.email = ["erik.westrup@gmail.com"]
9
+ spec.email = ["erik.westrup@icloud.com"]
10
10
 
11
11
  spec.summary = "Jekyll plugin providing a glossary liquid tag that will show a tooltip of a term definition in your site."
12
12
  spec.description = "This plugin simplifies for your readers and you by making it easy to define terms or abbreviations that needs an explanation. Define a common dictionary of terms and their definition in a YAML file. Then inside markdown files you can use the provided glossary liquid tag to insert a tooltip for a defined word from the dictionary. The tooltip will show the term definition on mouse hover."
@@ -15,12 +15,13 @@ module Jekyll
15
15
  def render(context)
16
16
  entry = lookup_entry(context.registers[:site], @opts[:term_query])
17
17
  @opts[:display] ||= @opts[:term_query]
18
- <<~HTML
18
+ html = <<~HTML
19
19
  <span class="jekyll-glossary">
20
20
  #{@opts[:display]}
21
21
  <span class="jekyll-glossary-tooltip">#{entry["definition"]}#{render_tooltip_url(entry, context)}</span>
22
22
  </span>
23
23
  HTML
24
+ html.gsub("\n", "")
24
25
  end
25
26
 
26
27
  private
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Jekyll
4
4
  module GlossaryTooltip
5
- VERSION = "1.5.0"
5
+ VERSION = "1.5.1"
6
6
  end
7
7
  end
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ # Devcontainer postCreateCommand.
3
+ # Install dependencies for running this project in GitHub Codespaces.
4
+
5
+ set -eux
6
+
7
+ # For project.
8
+ bundle install
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-glossary_tooltip
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Erik Westrup
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2022-09-08 00:00:00.000000000 Z
11
+ date: 2025-03-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll
@@ -36,13 +36,14 @@ description: This plugin simplifies for your readers and you by making it easy t
36
36
  use the provided glossary liquid tag to insert a tooltip for a defined word from
37
37
  the dictionary. The tooltip will show the term definition on mouse hover.
38
38
  email:
39
- - erik.westrup@gmail.com
39
+ - erik.westrup@icloud.com
40
40
  executables: []
41
41
  extensions: []
42
42
  extra_rdoc_files: []
43
43
  files:
44
44
  - ".ackrc"
45
45
  - ".codeclimate.yml"
46
+ - ".devcontainer/devcontainer.json"
46
47
  - ".editorconfig"
47
48
  - ".github/dependabot.yml"
48
49
  - ".github/workflows/cd.yml"
@@ -74,11 +75,12 @@ files:
74
75
  - lib/jekyll-glossary_tooltip/options_parser.rb
75
76
  - lib/jekyll-glossary_tooltip/tag.rb
76
77
  - lib/jekyll-glossary_tooltip/version.rb
77
- - script/build
78
- - script/console
79
- - script/lint
80
- - script/setup
81
- - script/test
78
+ - scripts/build
79
+ - scripts/console
80
+ - scripts/devcontainer_postCreateCommand.sh
81
+ - scripts/lint
82
+ - scripts/setup
83
+ - scripts/test
82
84
  homepage: https://github.com/erikw/jekyll-glossary_tooltip/
83
85
  licenses:
84
86
  - MIT
@@ -86,7 +88,7 @@ metadata:
86
88
  homepage_uri: https://github.com/erikw/jekyll-glossary_tooltip/
87
89
  source_code_uri: https://github.com/erikw/jekyll-glossary_tooltip/
88
90
  changelog_uri: https://github.com/erikw/jekyll-glossary_tooltip/blob/main/CHANGELOG.md
89
- post_install_message:
91
+ post_install_message:
90
92
  rdoc_options: []
91
93
  require_paths:
92
94
  - lib
@@ -104,8 +106,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
106
  - !ruby/object:Gem::Version
105
107
  version: '0'
106
108
  requirements: []
107
- rubygems_version: 3.3.3
108
- signing_key:
109
+ rubygems_version: 3.5.11
110
+ signing_key:
109
111
  specification_version: 4
110
112
  summary: Jekyll plugin providing a glossary liquid tag that will show a tooltip of
111
113
  a term definition in your site.
File without changes
File without changes
File without changes
File without changes
File without changes