pagefind 1.5.2 → 1.5.2.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: b7f2d0f2899cf0c61e04f55232a4fdb9f68bc96eaeea49e1ac78409b683a438d
4
- data.tar.gz: 001fc18a290dd28bdd6216025b0f23906538e83f94e5a5585c11f449cda16591
3
+ metadata.gz: 389746e86fa995ad022379eae8e96610fa5eec6457fbbb7973356cded5917d50
4
+ data.tar.gz: bbeb2782cd10317935d074c399d003eafcdd7804de828e781897ee0f556c9386
5
5
  SHA512:
6
- metadata.gz: 6e87504e41bbc64b108a585031f270630e5e57bc33faaf55bca69e637e0ebb8d8d60490cf304a12a9c7d59ffe6d73c0c2b41c1cec8c14b7e69f2dc6404bfae99
7
- data.tar.gz: 73134b3c3cc5e2addad71da735b80f607c5570cee26227737a5891646b6e87dc3c83646bb041714912126acdc8688f4104cf1eed34541348e20431a52a715f43
6
+ metadata.gz: 8159f4491ac8240015a080316e9a1ad4ec1e4754e635e961b3546d2e049c7f41d890aad5a9a95804835d28184e4513632faa6bce048bf6d4264790ebfdd0f6dd
7
+ data.tar.gz: 24a77f5f40ee2bdd73ff2d2eae036843c0ca4040084e6f2548e542caf8bd12d80bf53ba7dbcb31002c9de395ab4d852b474878ac40c0a8517e88e5c57536506f
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # pagefind-ruby changelog
2
2
 
3
+ ## v1.5.2.1
4
+
5
+ * Ship the pagefind_extended release, as Pagefind's npm package does @bangseongbeom
6
+
3
7
  ## v1.5.2
4
8
 
5
9
  * Initial release
data/README.md CHANGED
@@ -1,7 +1,13 @@
1
1
  # Pagefind
2
2
 
3
+ [![ci](https://github.com/bangseongbeom/pagefind-ruby/actions/workflows/ci.yml/badge.svg)](https://github.com/bangseongbeom/pagefind-ruby/actions/workflows/ci.yml)
4
+ [![Ruby Code Style](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://github.com/standardrb/standard)
5
+ [![Gem Version](https://badge.fury.io/rb/pagefind.svg)](https://badge.fury.io/rb/pagefind)
6
+
3
7
  A self-contained `pagefind` executable, wrapped up in a ruby gem. That's it. Nothing else.
4
8
 
9
+ This gem is based on [tailwindcss-ruby](https://github.com/flavorjones/tailwindcss-ruby). Much of the packaging approach, code, and documentation was adapted from it.
10
+
5
11
 
6
12
  ## Installation
7
13
 
@@ -31,7 +37,7 @@ gem install pagefind
31
37
 
32
38
  ### Using a local installation of `pagefind`
33
39
 
34
- If you are not able to use the vendored precompiled binaries (for example, if you're on an unsupported platform), you can use a [local installation](https://pagefind.app/docs/installation/) of the `pagefind` binary by setting an environment variable named `PAGEFIND_INSTALL_DIR` to the directory path containing the binary.
40
+ If you are not able to use the vendored precompiled binaries (for example, if you're on an unsupported platform), you can use a [local installation](https://pagefind.app/docs/installation/) of the `pagefind_extended` or `pagefind` binary by setting an environment variable named `PAGEFIND_INSTALL_DIR` to the directory path containing the binary.
35
41
 
36
42
  For example, if you've [built Pagefind from source](https://pagefind.app/docs/installation/#building-from-source) with `cargo install pagefind` so that the binary is found at `$HOME/.cargo/bin/pagefind`, then you should set your environment variable like so:
37
43
 
@@ -62,7 +68,7 @@ The gem makes available `Pagefind.executable` which is the path to the vendored
62
68
  ``` ruby
63
69
  require "pagefind"
64
70
  Pagefind.executable
65
- # => "/path/to/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/pagefind-1.5.2-x86_64-linux/exe/x86_64-linux/pagefind"
71
+ # => "/path/to/installs/ruby/3.3.5/lib/ruby/gems/3.3.0/gems/pagefind-1.5.2-x86_64-linux/exe/x86_64-linux/pagefind_extended"
66
72
  ```
67
73
 
68
74
 
@@ -77,10 +83,10 @@ $ bundle exec which pagefind
77
83
 
78
84
  # run the actual executable through the shim
79
85
  $ bundle exec pagefind --help
80
- ["/path/to/installs/installs/ruby/3.4.2/lib/ruby/gems/3.4.0/gems/pagefind-1.5.2-x86_64-linux/exe/x86_64-linux/pagefind", "--help"]
86
+ ["/path/to/installs/installs/ruby/3.4.2/lib/ruby/gems/3.4.0/gems/pagefind-1.5.2-x86_64-linux/exe/x86_64-linux/pagefind_extended", "--help"]
81
87
  Implement search on any static website.
82
88
 
83
- Usage: pagefind [OPTIONS]
89
+ Usage: pagefind_extended [OPTIONS]
84
90
 
85
91
  Options:
86
92
  -s, --site <SITE>
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pagefind
4
- VERSION = "1.5.2"
4
+ VERSION = "1.5.2.1"
5
5
  end
data/lib/pagefind.rb CHANGED
@@ -30,7 +30,7 @@ module Pagefind
30
30
  if File.directory?(pagefind_install_dir)
31
31
  warn "NOTE: using PAGEFIND_INSTALL_DIR to find pagefind executable: #{pagefind_install_dir}"
32
32
  exe_path = pagefind_install_dir
33
- exe_file = (Gem.win_platform? ? %w[pagefind.exe pagefind.cmd pagefind] : %w[pagefind])
33
+ exe_file = (Gem.win_platform? ? %w[pagefind_extended.exe pagefind.exe pagefind.cmd] : %w[pagefind_extended pagefind])
34
34
  .map { |file_name| File.expand_path(File.join(pagefind_install_dir, file_name)) }
35
35
  .find { |file_name| File.exist?(file_name) }
36
36
  else
@@ -47,7 +47,7 @@ module Pagefind
47
47
  MESSAGE
48
48
  end
49
49
 
50
- exe_file = Dir.glob(File.expand_path(File.join(exe_path, "*", "pagefind"))).find do |f|
50
+ exe_file = Dir.glob(File.expand_path(File.join(exe_path, "*", "pagefind_extended"))).find do |f|
51
51
  Gem::Platform.match_gem?(Gem::Platform.new(File.basename(File.dirname(f))), GEM_NAME)
52
52
  end
53
53
  end
data/rakelib/package.rake CHANGED
@@ -4,12 +4,12 @@
4
4
  # TL;DR: run "rake package"
5
5
  #
6
6
  # The native platform gems (defined by Pagefind::Upstream::NATIVE_PLATFORMS) will each contain
7
- # the pagefind binary executable in addition to what the vanilla ruby gem contains:
7
+ # the pagefind_extended binary executable in addition to what the vanilla ruby gem contains:
8
8
  #
9
9
  # exe/
10
10
  # ├── pagefind # generic ruby script to find and run the binary
11
11
  # └── <Gem::Platform architecture name>/
12
- # └── pagefind # the pagefind binary executable
12
+ # └── pagefind_extended # the pagefind_extended binary executable
13
13
  #
14
14
  # The ruby script `exe/pagefind` is installed into the user's path, and it simply locates the
15
15
  # binary and executes it. Note that this script is required because rubygems requires that
@@ -21,7 +21,7 @@
21
21
  # exe/
22
22
  # ├── pagefind
23
23
  # └── x86_64-linux/
24
- # └── pagefind
24
+ # └── pagefind_extended
25
25
  #
26
26
  # So the full set of gem files created will be:
27
27
  #
@@ -69,7 +69,7 @@ require_relative "../lib/pagefind/upstream"
69
69
  PAGEFIND_ARCHIVE_DIR = "tmp"
70
70
 
71
71
  def pagefind_archive_filename(target)
72
- "pagefind-#{Pagefind::Upstream::VERSION}-#{target}.tar.gz"
72
+ "pagefind_extended-#{Pagefind::Upstream::VERSION}-#{target}.tar.gz"
73
73
  end
74
74
 
75
75
  def pagefind_download_url(filename)
@@ -106,8 +106,8 @@ exepaths = []
106
106
  Pagefind::Upstream::NATIVE_PLATFORMS.each do |platform, target|
107
107
  PAGEFIND_RUBY_GEMSPEC.dup.tap do |gemspec|
108
108
  exedir = File.join(gemspec.bindir, platform) # "exe/x86_64-linux"
109
- exepath = File.join(exedir, "pagefind") # "exe/x86_64-linux/pagefind"
110
- archivepath = File.join(PAGEFIND_ARCHIVE_DIR, pagefind_archive_filename(target)) # "tmp/pagefind-v1.5.2-x86_64-unknown-linux-musl.tar.gz"
109
+ exepath = File.join(exedir, "pagefind_extended") # "exe/x86_64-linux/pagefind_extended"
110
+ archivepath = File.join(PAGEFIND_ARCHIVE_DIR, pagefind_archive_filename(target)) # "tmp/pagefind_extended-v1.5.2-x86_64-unknown-linux-musl.tar.gz"
111
111
  exepaths << exepath
112
112
 
113
113
  # modify a copy of the gemspec to include the native executable
@@ -125,7 +125,7 @@ Pagefind::Upstream::NATIVE_PLATFORMS.each do |platform, target|
125
125
 
126
126
  Zlib::GzipReader.open(archivepath) do |gz|
127
127
  Gem::Package::TarReader.new(gz) do |tar|
128
- entry = tar.find { |entry| %w[pagefind pagefind.exe].include?(entry.full_name) }
128
+ entry = tar.find { |entry| %w[pagefind_extended pagefind_extended.exe].include?(entry.full_name) }
129
129
  abort "Cannot find the pagefind executable in #{archivepath}" unless entry
130
130
 
131
131
  File.binwrite(exepath, entry.read)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pagefind
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.5.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - 방성범 (Bang Seongbeom)
@@ -53,7 +53,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  requirements: []
56
- rubygems_version: 4.0.16
56
+ rubygems_version: 4.0.20
57
57
  specification_version: 4
58
58
  summary: A self-contained `pagefind` executable.
59
59
  test_files: []