jekyll-koziolekweb-tags 0.4.3 → 0.4.4
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 +4 -4
- data/CHANGELOG.md +15 -0
- data/Gemfile.lock +113 -0
- data/jekyll-koziolekweb-tags.gemspec +39 -0
- data/lib/jekyll/koziolekweb/tags/version.rb +1 -1
- data/lib/jekyll/koziolekweb/tags.rb +33 -4
- data/release.sh +83 -0
- metadata +5 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 2da371200ebcd6314f4a80855978f32793599b544f34101df51aedd00f4ce216
|
|
4
|
+
data.tar.gz: a197e61ede1294520c1405e80844980fbb26b09db113c7588bda86cefe693fe2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1eca45c74f60667e1599e86e175f56ac27d5b79be0225dbacf1c041d20e9d0e3a3051434f34b05846a30b49aa9891c1cb2cfd65666dcea4cda63a0b8d09d7b97
|
|
7
|
+
data.tar.gz: bb3c317ddd89212d70ffc40376119d9d366a3cd3408999709b0a7f6a9e5f5abd9628e2d2dcb202a938e27ce27326888d4d819c4f22384f3bba883f141e19eb40
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,8 @@
|
|
|
1
|
+
## 0.4.4
|
|
2
|
+
|
|
3
|
+
* `album` tag (like `book`, but ISMN instead of ISBN, album cover alt text)
|
|
4
|
+
* empty ISBN/ISMN no longer renders an empty row
|
|
5
|
+
|
|
1
6
|
## 0.4.1
|
|
2
7
|
|
|
3
8
|
* Fixed listing counter
|
|
@@ -37,3 +42,13 @@ New project were born…
|
|
|
37
42
|
- 4822571 [2025-05-15] fix title (Koziolek)
|
|
38
43
|
- 4aa037f [2024-10-14] yt_video (Koziolek)
|
|
39
44
|
- cab336e [2024-10-11] init (Koziolek)
|
|
45
|
+
|
|
46
|
+
## 2025-05-18
|
|
47
|
+
- 0e89167 [2025-05-17] update rake stuff (Koziolek)
|
|
48
|
+
- 67f3ca1 [2025-05-17] update rake stuff (Koziolek)
|
|
49
|
+
- 2492798 [2025-05-17] release v.0.4.1 (Koziolek)
|
|
50
|
+
- 732616c [2025-05-16] release v.0.4.0 (Koziolek)
|
|
51
|
+
- 8dfc876 [2025-05-16] Refactor and tests (Koziolek)
|
|
52
|
+
- 4822571 [2025-05-15] fix title (Koziolek)
|
|
53
|
+
- 4aa037f [2024-10-14] yt_video (Koziolek)
|
|
54
|
+
- cab336e [2024-10-11] init (Koziolek)
|
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
jekyll-koziolekweb-tags (0.4.1)
|
|
5
|
+
jekyll (>= 3.7, < 5.0)
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
addressable (2.8.7)
|
|
11
|
+
public_suffix (>= 2.0.2, < 7.0)
|
|
12
|
+
base64 (0.2.0)
|
|
13
|
+
bigdecimal (3.1.9)
|
|
14
|
+
colorator (1.1.0)
|
|
15
|
+
concurrent-ruby (1.3.5)
|
|
16
|
+
csv (3.3.4)
|
|
17
|
+
date (3.4.1)
|
|
18
|
+
em-websocket (0.5.3)
|
|
19
|
+
eventmachine (>= 0.12.9)
|
|
20
|
+
http_parser.rb (~> 0)
|
|
21
|
+
eventmachine (1.2.7)
|
|
22
|
+
ffi (1.17.2-x86_64-linux-gnu)
|
|
23
|
+
forwardable-extended (2.6.0)
|
|
24
|
+
google-protobuf (4.31.0-x86_64-linux-gnu)
|
|
25
|
+
bigdecimal
|
|
26
|
+
rake (>= 13)
|
|
27
|
+
http_parser.rb (0.8.0)
|
|
28
|
+
i18n (1.14.7)
|
|
29
|
+
concurrent-ruby (~> 1.0)
|
|
30
|
+
io-console (0.8.0)
|
|
31
|
+
irb (1.15.2)
|
|
32
|
+
pp (>= 0.6.0)
|
|
33
|
+
rdoc (>= 4.0.0)
|
|
34
|
+
reline (>= 0.4.2)
|
|
35
|
+
jekyll (4.4.1)
|
|
36
|
+
addressable (~> 2.4)
|
|
37
|
+
base64 (~> 0.2)
|
|
38
|
+
colorator (~> 1.0)
|
|
39
|
+
csv (~> 3.0)
|
|
40
|
+
em-websocket (~> 0.5)
|
|
41
|
+
i18n (~> 1.0)
|
|
42
|
+
jekyll-sass-converter (>= 2.0, < 4.0)
|
|
43
|
+
jekyll-watch (~> 2.0)
|
|
44
|
+
json (~> 2.6)
|
|
45
|
+
kramdown (~> 2.3, >= 2.3.1)
|
|
46
|
+
kramdown-parser-gfm (~> 1.0)
|
|
47
|
+
liquid (~> 4.0)
|
|
48
|
+
mercenary (~> 0.3, >= 0.3.6)
|
|
49
|
+
pathutil (~> 0.9)
|
|
50
|
+
rouge (>= 3.0, < 5.0)
|
|
51
|
+
safe_yaml (~> 1.0)
|
|
52
|
+
terminal-table (>= 1.8, < 4.0)
|
|
53
|
+
webrick (~> 1.7)
|
|
54
|
+
jekyll-sass-converter (3.1.0)
|
|
55
|
+
sass-embedded (~> 1.75)
|
|
56
|
+
jekyll-watch (2.2.1)
|
|
57
|
+
listen (~> 3.0)
|
|
58
|
+
json (2.12.0)
|
|
59
|
+
kramdown (2.5.1)
|
|
60
|
+
rexml (>= 3.3.9)
|
|
61
|
+
kramdown-parser-gfm (1.1.0)
|
|
62
|
+
kramdown (~> 2.0)
|
|
63
|
+
liquid (4.0.4)
|
|
64
|
+
listen (3.9.0)
|
|
65
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
66
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
|
67
|
+
mercenary (0.4.0)
|
|
68
|
+
minitest (5.25.5)
|
|
69
|
+
pathutil (0.16.2)
|
|
70
|
+
forwardable-extended (~> 2.6)
|
|
71
|
+
pp (0.6.2)
|
|
72
|
+
prettyprint
|
|
73
|
+
prettyprint (0.2.0)
|
|
74
|
+
psych (5.2.6)
|
|
75
|
+
date
|
|
76
|
+
stringio
|
|
77
|
+
public_suffix (6.0.2)
|
|
78
|
+
rake (13.2.1)
|
|
79
|
+
rb-fsevent (0.11.2)
|
|
80
|
+
rb-inotify (0.11.1)
|
|
81
|
+
ffi (~> 1.0)
|
|
82
|
+
rdoc (6.13.1)
|
|
83
|
+
psych (>= 4.0.0)
|
|
84
|
+
reline (0.6.1)
|
|
85
|
+
io-console (~> 0.5)
|
|
86
|
+
rexml (3.4.1)
|
|
87
|
+
rouge (4.5.2)
|
|
88
|
+
rubygems-tasks (0.2.6)
|
|
89
|
+
irb (~> 1.0)
|
|
90
|
+
rake (>= 10.0.0)
|
|
91
|
+
safe_yaml (1.0.5)
|
|
92
|
+
sass-embedded (1.89.0-x86_64-linux-gnu)
|
|
93
|
+
google-protobuf (~> 4.31)
|
|
94
|
+
shellwords (0.2.2)
|
|
95
|
+
stringio (3.1.7)
|
|
96
|
+
terminal-table (3.0.2)
|
|
97
|
+
unicode-display_width (>= 1.1.1, < 3)
|
|
98
|
+
unicode-display_width (2.6.0)
|
|
99
|
+
webrick (1.9.1)
|
|
100
|
+
|
|
101
|
+
PLATFORMS
|
|
102
|
+
x86_64-linux
|
|
103
|
+
|
|
104
|
+
DEPENDENCIES
|
|
105
|
+
jekyll-koziolekweb-tags!
|
|
106
|
+
liquid (~> 4.0)
|
|
107
|
+
minitest
|
|
108
|
+
rake (~> 13.0)
|
|
109
|
+
rubygems-tasks
|
|
110
|
+
shellwords
|
|
111
|
+
|
|
112
|
+
BUNDLED WITH
|
|
113
|
+
2.3.22
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/jekyll/koziolekweb/tags/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "jekyll-koziolekweb-tags"
|
|
7
|
+
spec.version = Jekyll::Koziolekweb::Tags::VERSION
|
|
8
|
+
spec.authors = ["Koziolek"]
|
|
9
|
+
spec.email = ["bjkuczynski@gmail.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "Set of structural tags that helps to organise article."
|
|
12
|
+
spec.description = "Here you will find a set of tags that allow you to create code listings with numbering, notes using the <aside> element and more."
|
|
13
|
+
spec.homepage = "https://github.com/Koziolek/jekyll-koziolekweb-tags"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
spec.required_ruby_version = ">= 2.4.0"
|
|
16
|
+
spec.add_dependency "jekyll", ">= 3.7", "< 5.0"
|
|
17
|
+
|
|
18
|
+
# Specify which files should be added to the gem when it is released.
|
|
19
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
20
|
+
spec.files = Dir.chdir(__dir__) do
|
|
21
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
|
22
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
spec.bindir = "exe"
|
|
26
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
27
|
+
|
|
28
|
+
spec.metadata["source_code_uri"] = "https://github.com/Koziolek/jekyll-koziolekweb-tags"
|
|
29
|
+
spec.metadata["changelog_uri"] = "https://github.com/Koziolek/jekyll-koziolekweb-tags/CHANGELOG.md"
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
spec.require_paths = ["lib"]
|
|
33
|
+
|
|
34
|
+
# Uncomment to register a new dependency of your gem
|
|
35
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
|
36
|
+
|
|
37
|
+
# For more information and examples about making a new gem, check out our
|
|
38
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
|
39
|
+
end
|
|
@@ -164,8 +164,8 @@ module Koziolekweb
|
|
|
164
164
|
label_title = @language_manager.translate('title', @lang, 'Tytuł')
|
|
165
165
|
label_author = @language_manager.translate('author', @lang, 'Autor')
|
|
166
166
|
label_year = @language_manager.translate('year', @lang, 'Rok')
|
|
167
|
-
label_isbn = @language_manager.translate(
|
|
168
|
-
cover_alt = @language_manager.translate(
|
|
167
|
+
label_isbn = @language_manager.translate(identifier_key, @lang, identifier_label)
|
|
168
|
+
cover_alt = @language_manager.translate(cover_alt_key, @lang, cover_alt_default)
|
|
169
169
|
.gsub('%{title}', @title)
|
|
170
170
|
.gsub('%{author}', @author)
|
|
171
171
|
|
|
@@ -177,12 +177,41 @@ module Koziolekweb
|
|
|
177
177
|
<li><span>#{label_title}: </span>#{title_html}</li>
|
|
178
178
|
<li><span>#{label_author}: </span>#{author_html}</li>
|
|
179
179
|
<li><span>#{label_year}: </span>#{year_html}</li>
|
|
180
|
-
#{@isbn.
|
|
180
|
+
#{@isbn.to_s.empty? ? "" : "<li><span>#{label_isbn}: </span>#{isbn_html}</li>"}
|
|
181
181
|
</ul>
|
|
182
182
|
</div>
|
|
183
183
|
</div>
|
|
184
184
|
HTML
|
|
185
185
|
end
|
|
186
|
+
|
|
187
|
+
private
|
|
188
|
+
|
|
189
|
+
# Klucz słownika i domyślna etykieta identyfikatora (nadpisywane w Album).
|
|
190
|
+
def identifier_key = 'isbn'
|
|
191
|
+
def identifier_label = 'ISBN'
|
|
192
|
+
|
|
193
|
+
# Klucz słownika i domyślny tekst alt okładki (nadpisywane w Album).
|
|
194
|
+
def cover_alt_key = 'cover_alt'
|
|
195
|
+
def cover_alt_default = 'Okładka książki %{title} autorstwa %{author}'
|
|
196
|
+
end
|
|
197
|
+
|
|
198
|
+
# A tag that displays album (music release) information with cover image.
|
|
199
|
+
# Identical to {% book %}, but the identifier is labelled ISMN instead of ISBN.
|
|
200
|
+
#
|
|
201
|
+
# Usage:
|
|
202
|
+
# {% album "Title" "Artist" "2024" "9790000000000" "https://example.com/cover.jpg" %}
|
|
203
|
+
# {% album "Title" "Artist" "2024" "" "https://example.com/cover.jpg" lang:pl %}
|
|
204
|
+
#
|
|
205
|
+
# The ISMN may be an empty string - the ISMN row is then omitted.
|
|
206
|
+
# Dictionary keys: title, author, year, ismn, album_cover_alt.
|
|
207
|
+
class Album < Book
|
|
208
|
+
private
|
|
209
|
+
|
|
210
|
+
def identifier_key = 'ismn'
|
|
211
|
+
def identifier_label = 'ISMN'
|
|
212
|
+
|
|
213
|
+
def cover_alt_key = 'album_cover_alt'
|
|
214
|
+
def cover_alt_default = 'Okładka albumu %{title} wykonawcy %{author}'
|
|
186
215
|
end
|
|
187
216
|
end
|
|
188
217
|
|
|
@@ -231,7 +260,7 @@ module Koziolekweb
|
|
|
231
260
|
end
|
|
232
261
|
end
|
|
233
262
|
|
|
234
|
-
%w[listing offtop yt_video book].each do |tag|
|
|
263
|
+
%w[listing offtop yt_video book album].each do |tag|
|
|
235
264
|
class_name = tag.split('_').map(&:capitalize).join
|
|
236
265
|
begin
|
|
237
266
|
klass = Koziolekweb::Tags.const_get(class_name)
|
data/release.sh
ADDED
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
#!/usr/bin/env bash
|
|
2
|
+
# Release gema jekyll-koziolekweb-tags.
|
|
3
|
+
#
|
|
4
|
+
# Użycie: ./release.sh <wersja> [--dry-run] np. ./release.sh 0.5.0
|
|
5
|
+
#
|
|
6
|
+
# Kroki: sprawdzenia -> testy -> podbicie version.rb -> CHANGELOG (Unreleased -> wersja)
|
|
7
|
+
# -> build -> [potwierdzenie] -> commit + tag -> push -> gem push.
|
|
8
|
+
# Zastępuje `rake myrelease` (ten szuka pliku VERSION, którego nie ma, i dopisuje cały git log).
|
|
9
|
+
# --dry-run: wszystko do builda włącznie, bez commita, tagu i pushy (zmiany w plikach są cofane).
|
|
10
|
+
set -euo pipefail
|
|
11
|
+
cd "$(dirname "$0")"
|
|
12
|
+
|
|
13
|
+
VERSION="${1:-}"; DRY=0
|
|
14
|
+
[[ "${2:-}" == "--dry-run" ]] && DRY=1
|
|
15
|
+
[[ "$VERSION" =~ ^[0-9]+\.[0-9]+\.[0-9]+$ ]] || { echo "Użycie: $0 <x.y.z> [--dry-run]" >&2; exit 1; }
|
|
16
|
+
|
|
17
|
+
GEMSPEC=$(ls ./*.gemspec | head -1)
|
|
18
|
+
NAME=$(ruby -e 'puts Gem::Specification.load(ARGV[0]).name' "$GEMSPEC")
|
|
19
|
+
VERSION_FILE=lib/jekyll/koziolekweb/tags/version.rb
|
|
20
|
+
TAG="v$VERSION"
|
|
21
|
+
die() { echo "BŁĄD: $*" >&2; exit 1; }
|
|
22
|
+
step() { echo; echo "==> $*"; }
|
|
23
|
+
|
|
24
|
+
step "Sprawdzenia"
|
|
25
|
+
[[ "$(git rev-parse --abbrev-ref HEAD)" == "master" ]] || die "nie jesteś na master"
|
|
26
|
+
# untracked (stare .gem, swap Vima) nie blokują, zmiany w śledzonych plikach tak
|
|
27
|
+
[[ -z "$(git status --porcelain --untracked-files=no)" ]] || die "niezacommitowane zmiany w śledzonych plikach (zacommituj je najpierw)"
|
|
28
|
+
git rev-parse "$TAG" >/dev/null 2>&1 && die "tag $TAG już istnieje"
|
|
29
|
+
if curl -sf "https://rubygems.org/api/v1/versions/$NAME.json" | grep -q "\"number\":\"$VERSION\""; then
|
|
30
|
+
die "wersja $VERSION jest już na rubygems.org"
|
|
31
|
+
fi
|
|
32
|
+
git fetch -q origin && [[ "$(git rev-parse HEAD)" == "$(git merge-base HEAD origin/master)" ]] || die "lokalny master jest za origin/master (zrób pull) lub rozjechany"
|
|
33
|
+
grep -q '^## Unreleased' CHANGELOG.md || echo "UWAGA: brak sekcji '## Unreleased' w CHANGELOG.md, dopiszę tylko nagłówek wersji"
|
|
34
|
+
|
|
35
|
+
step "Testy"
|
|
36
|
+
ruby -Ilib -Itest -e 'Dir["test/test_*.rb"].sort.each { |f| require "./" + f }'
|
|
37
|
+
|
|
38
|
+
step "Podbicie wersji -> $VERSION"
|
|
39
|
+
sed -i -E "s/VERSION = \"[0-9.]+\"/VERSION = \"$VERSION\"/" "$VERSION_FILE"
|
|
40
|
+
grep -q "VERSION = \"$VERSION\"" "$VERSION_FILE" || die "nie udało się zmienić $VERSION_FILE"
|
|
41
|
+
if grep -q '^## Unreleased' CHANGELOG.md; then
|
|
42
|
+
sed -i "s/^## Unreleased/## $VERSION/" CHANGELOG.md
|
|
43
|
+
else
|
|
44
|
+
printf '## %s\n\n' "$VERSION" | cat - CHANGELOG.md > CHANGELOG.md.tmp && mv CHANGELOG.md.tmp CHANGELOG.md
|
|
45
|
+
fi
|
|
46
|
+
|
|
47
|
+
step "Build"
|
|
48
|
+
BUILD_DIR=pkg
|
|
49
|
+
mkdir -p "$BUILD_DIR"
|
|
50
|
+
gem build "$GEMSPEC" --output "$BUILD_DIR/$NAME-$VERSION.gem"
|
|
51
|
+
GEM_FILE="$BUILD_DIR/$NAME-$VERSION.gem"
|
|
52
|
+
|
|
53
|
+
if [[ $DRY -eq 1 ]]; then
|
|
54
|
+
step "DRY RUN: cofam zmiany w version.rb i CHANGELOG.md"
|
|
55
|
+
git checkout -- "$VERSION_FILE" CHANGELOG.md
|
|
56
|
+
echo "Zbudowano $GEM_FILE, nic nie wypchnięto."
|
|
57
|
+
exit 0
|
|
58
|
+
fi
|
|
59
|
+
|
|
60
|
+
echo
|
|
61
|
+
git --no-pager diff --stat
|
|
62
|
+
read -r -p "Wydać $NAME $VERSION (commit, tag, push, gem push)? [tak/N] " ANS
|
|
63
|
+
if [[ "$ANS" != "tak" ]]; then
|
|
64
|
+
git checkout -- "$VERSION_FILE" CHANGELOG.md
|
|
65
|
+
echo "Przerwano, zmiany cofnięte."; exit 1
|
|
66
|
+
fi
|
|
67
|
+
|
|
68
|
+
step "Commit i tag"
|
|
69
|
+
git add "$VERSION_FILE" CHANGELOG.md
|
|
70
|
+
git commit -m "release $TAG"
|
|
71
|
+
git tag -a "$TAG" -m "Release $TAG"
|
|
72
|
+
|
|
73
|
+
step "Push do origin (commit + tag)"
|
|
74
|
+
git push origin master "$TAG"
|
|
75
|
+
|
|
76
|
+
step "gem push (może zapytać o OTP)"
|
|
77
|
+
gem push "$GEM_FILE"
|
|
78
|
+
|
|
79
|
+
cat <<EOF
|
|
80
|
+
|
|
81
|
+
Gotowe: $NAME $VERSION.
|
|
82
|
+
W blogu: zmień wersję w Gemfile na "~> $VERSION" i uruchom: bundle update $NAME
|
|
83
|
+
EOF
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: jekyll-koziolekweb-tags
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Koziolek
|
|
@@ -40,10 +40,13 @@ files:
|
|
|
40
40
|
- ".tool-versions"
|
|
41
41
|
- CHANGELOG.md
|
|
42
42
|
- Gemfile
|
|
43
|
+
- Gemfile.lock
|
|
43
44
|
- README.md
|
|
44
45
|
- Rakefile
|
|
46
|
+
- jekyll-koziolekweb-tags.gemspec
|
|
45
47
|
- lib/jekyll/koziolekweb/tags.rb
|
|
46
48
|
- lib/jekyll/koziolekweb/tags/version.rb
|
|
49
|
+
- release.sh
|
|
47
50
|
- sig/jekyll/koziolekweb/tags.rbs
|
|
48
51
|
homepage: https://github.com/Koziolek/jekyll-koziolekweb-tags
|
|
49
52
|
licenses:
|
|
@@ -65,7 +68,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
65
68
|
- !ruby/object:Gem::Version
|
|
66
69
|
version: '0'
|
|
67
70
|
requirements: []
|
|
68
|
-
rubygems_version: 3.6.
|
|
71
|
+
rubygems_version: 3.6.9
|
|
69
72
|
specification_version: 4
|
|
70
73
|
summary: Set of structural tags that helps to organise article.
|
|
71
74
|
test_files: []
|