pdfsink 0.1.1 → 0.1.2

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: c7525fe1b6e8a7688263ba1ed46a94b2ad85c542b24b2d1af4eae85bd27978ae
4
- data.tar.gz: b3a38251708e54692876ada2c8f133eee09aab0c76864cb54353b2a317d1c0cc
3
+ metadata.gz: 0406a9057adb9c3470182b98d6600e8bf239227e792e4dd1f9560542ab5056bb
4
+ data.tar.gz: e048fcdd3eaf050bcd91cd289930822ff17a28c6603b45e22c5a857982374a6f
5
5
  SHA512:
6
- metadata.gz: cad11ed6fc3820deb61a5b91506980665c8ec3a0985f0a1c5b3e220eada77942a54c7581e4f727e67e17ea2be7afa120d8732061d3d050ad148a506df3990fc1
7
- data.tar.gz: c7574fb8b982d8c04f85ab2168b26c2aa3158cf2befa2b944962fe58f9b755c07055c33fec96557de4512668e637e71bcb30c2202ee5f569b3573a057df921ae
6
+ metadata.gz: '098ac8d04c6585bd7355beb2a5aec26d6d4e625e49248baa00907161ce1ddb870be0012ede8e67bf327afb2dcf3a03dacab1ee32076dea1ecb737176d1c32f28'
7
+ data.tar.gz: 9679286de91e56311407459e52f3214171b7977ec06ba377c943f5b901b1f1973bc7ac7bd7d95cd3ae34c6694cad227f326be5f76f592de8346294ca54bd5571
data/Rakefile CHANGED
@@ -1,19 +1,25 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "rspec/core/rake_task"
4
+ require "./lib/pdfsink/version"
4
5
 
5
6
  RSpec::Core::RakeTask.new(:spec)
6
7
 
7
8
  namespace :cargo do
8
9
  desc "Build the pdfsink-rs binary into lib/pdfsink/"
9
10
  task :build do
10
- crate_ver = "0.2.9"
11
- bin_name = "pdfsink-rs"
12
- stage = File.expand_path("ext/pdfsink/cargo-root", __dir__)
13
- lib_dir = File.expand_path("lib/pdfsink", __dir__)
11
+ bin_name = "pdfsink-rs"
12
+ repo = "https://github.com/AccountAim/pdfsink-rs"
13
+ tag = "v#{Pdfsink::PDFSINK_RS_VERSION}"
14
+ stage = File.expand_path("ext/pdfsink/cargo-root", __dir__)
15
+ lib_dir = File.expand_path("lib/pdfsink", __dir__)
14
16
 
17
+ # Build from the pinned git tag, not crates.io: the crate carries a
18
+ # [patch.crates-io] for a vendored adobe-cmap-parser fix, and cargo strips
19
+ # [patch] on publish -- so the fix only applies when building from source.
15
20
  sh "cargo", "install", "pdfsink-rs",
16
- "--version", crate_ver, "--bin", bin_name,
21
+ "--git", repo, "--tag", tag,
22
+ "--bin", bin_name, "--locked",
17
23
  "--root", stage, "--force"
18
24
 
19
25
  built = File.join(stage, "bin", bin_name)
@@ -1,18 +1,22 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  # extconf.rb -- invoked by `gem install` or `bundle install` to build the
4
- # pdfsink-rs CLI binary from the published crate.
4
+ # pdfsink-rs CLI binary from the pinned git tag.
5
5
  #
6
6
  # Requirements:
7
- # - cargo / rustc (Rust toolchain, 1.88+)
7
+ # - cargo / rustc (Rust toolchain, 1.97+)
8
+ # - git
8
9
  #
9
10
  # Precompiled platform gems ship the binary in lib/pdfsink/ and strip this
10
11
  # extension, so this script only runs for source installs.
11
12
 
12
13
  require "fileutils"
14
+ # RubyGems runs this from the extension dir, so resolve the version from __dir__.
15
+ require File.expand_path("../../lib/pdfsink/version", __dir__)
13
16
 
14
17
  CRATE = "pdfsink-rs"
15
- CRATE_VER = "0.2.9"
18
+ REPO = "https://github.com/AccountAim/pdfsink-rs"
19
+ TAG = "v#{Pdfsink::PDFSINK_RS_VERSION}"
16
20
  BIN_NAME = "pdfsink-rs"
17
21
  EXT_DIR = __dir__
18
22
  LIB_DIR = File.expand_path("../../lib/pdfsink", EXT_DIR)
@@ -46,10 +50,13 @@ end
46
50
  stage = File.join(EXT_DIR, "cargo-root")
47
51
  FileUtils.mkdir_p(stage)
48
52
 
49
- puts "Installing #{CRATE} v#{CRATE_VER} (release)..."
53
+ puts "Installing #{CRATE} #{TAG} from #{REPO} (release)..."
54
+ # Build from the git tag, not crates.io: the crate's [patch.crates-io] fix
55
+ # (vendored adobe-cmap-parser) is stripped on publish, so it only applies
56
+ # when building from source.
50
57
  ok = system("cargo", "install", CRATE,
51
- "--version", CRATE_VER,
52
- "--bin", BIN_NAME,
58
+ "--git", REPO, "--tag", TAG,
59
+ "--bin", BIN_NAME, "--locked",
53
60
  "--root", stage,
54
61
  "--force")
55
62
  abort "ERROR: cargo install #{CRATE} failed" unless ok
@@ -1,8 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Pdfsink
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
 
6
- # Version of the pdfsink-rs crate this gem builds and wraps.
7
- PDFSINK_RS_VERSION = "0.2.9"
6
+ # Version of the pdfsink-rs crate this gem builds and wraps. Built from the
7
+ # matching git tag (v#{PDFSINK_RS_VERSION}), not crates.io -- the crate carries
8
+ # a [patch.crates-io] fix that cargo strips on publish.
9
+ PDFSINK_RS_VERSION = "0.2.12"
8
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pdfsink
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Accountaim
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2026-07-01 00:00:00.000000000 Z
11
+ date: 2026-07-17 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: |
14
14
  A Ruby gem that wraps the pdfsink-rs CLI, a fast pure-Rust PDF extraction