fastqr 1.0.6 → 1.0.7

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: 64e5094926c2ab8b1364ab771d1f54c143ad6faff6bdd16a9628126580a33cc6
4
- data.tar.gz: 2c2d8cf8992fcf4a8bd74a972831d5caad6ab13f8ca748a401bf0976412e7746
3
+ metadata.gz: b06744eea866ba5302111b88bbb8f19ee25eef3c88c1f4c6cc2db04cfd358cc0
4
+ data.tar.gz: 2fca75cffbf6dd4b1751ecfe12c89899d40a8cfcf7b22183ad9ae04581579f8f
5
5
  SHA512:
6
- metadata.gz: 3f2d657235b53a9aca3cc7069c0067a85d1885dbe487e7ba0df6f455035ce0ffa2b933ef4dd189440465646bf2da34bfe0914c73d8e27c3748e78649c6f382d3
7
- data.tar.gz: f51d20d88bd2c25edcec98f94905196688b5a4fae88b4e9500619b4ee85e6d0cd2dd5b515266aac950bacd998bb0f92adca4ccdfe50a16697322cdadcb8a1aeb
6
+ metadata.gz: f640f6a41cd6676e1ca5b91fa4c482c7eaead0d4d6561f9d20c8d7a7821d7f02ebf8a6fea28bd80ee23c635b4db7f507640d8866dc1a545d90c1cd38eccd8355
7
+ data.tar.gz: d556c90d8fcac826d99ee7be2b93041614870ddbecaf483edce992becb278c5c9995463f43ec8c659c2e8ffb0101a304a0b97d89054eb512b1da125df7e9013b
data/CMakeLists.txt CHANGED
@@ -1,5 +1,5 @@
1
1
  cmake_minimum_required(VERSION 3.15)
2
- project(fastqr VERSION 1.0.6 LANGUAGES CXX C)
2
+ project(fastqr VERSION 1.0.7 LANGUAGES CXX C)
3
3
 
4
4
  set(CMAKE_CXX_STANDARD 14)
5
5
  set(CMAKE_CXX_STANDARD_REQUIRED ON)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.6
1
+ 1.0.7
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tranhuucanh/fastqr",
3
- "version": "1.0.6",
3
+ "version": "1.0.7",
4
4
  "description": "Fast QR code generator with UTF-8 support, custom colors, logo embedding, and precise size control",
5
5
  "main": "index.js",
6
6
  "types": "index.d.ts",
@@ -34,6 +34,30 @@ module FastQR
34
34
  end
35
35
  end
36
36
 
37
+ # Check if pre-built binary is available
38
+ # @return [Boolean] true if binary exists
39
+ def prebuilt_available?
40
+ binary_path = find_binary
41
+ binary_path && File.exist?(binary_path)
42
+ rescue StandardError
43
+ false
44
+ end
45
+
46
+ # Get path to the library file
47
+ # @return [String] Path to libfastqr.dylib or libfastqr.so
48
+ def lib_path
49
+ platform = detect
50
+ base_dir = File.expand_path('../../prebuilt', __dir__)
51
+ lib_file = platform.start_with?('macos') ? 'libfastqr.dylib' : 'libfastqr.so'
52
+ File.join(base_dir, platform, 'lib', lib_file)
53
+ end
54
+
55
+ # Get binary name
56
+ # @return [String] 'fastqr'
57
+ def binary_name
58
+ 'fastqr'
59
+ end
60
+
37
61
  # Extracts pre-built binary from tarball
38
62
  # @param tarball_path [String] Path to the tarball
39
63
  # @param dest_dir [String] Destination directory
@@ -46,16 +70,16 @@ module FastQR
46
70
  # @return [String] Path to fastqr binary
47
71
  def find_binary
48
72
  platform = detect
49
- prebuilt_dir = File.expand_path("../../prebuilt/#{platform}", __dir__)
50
- binary_path = File.join(prebuilt_dir, 'fastqr')
73
+ base_dir = File.expand_path('../../prebuilt', __dir__)
74
+ binary_path = File.join(base_dir, platform, 'bin', 'fastqr')
51
75
 
52
76
  return binary_path if File.exist?(binary_path)
53
77
 
54
78
  # Try to extract from tarball
55
- tarball_path = File.expand_path("../../prebuilt/#{platform}.tar.gz", __dir__)
79
+ tarball_path = File.join(base_dir, "#{platform}.tar.gz")
56
80
  if File.exist?(tarball_path)
57
81
  puts "Extracting pre-built binary from #{tarball_path}..."
58
- extract_binary(tarball_path, prebuilt_dir)
82
+ extract_binary(tarball_path, File.join(base_dir, platform))
59
83
 
60
84
  if File.exist?(binary_path)
61
85
  File.chmod(0755, binary_path)
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FastQR
4
- VERSION = "1.0.6"
4
+ VERSION = "1.0.7"
5
5
  end
6
6
 
data/src/fastqr.cpp CHANGED
@@ -25,7 +25,7 @@
25
25
  // Enable benchmarking
26
26
  // #define FASTQR_BENCHMARK
27
27
 
28
- #define FASTQR_VERSION "1.0.6"
28
+ #define FASTQR_VERSION "1.0.7"
29
29
 
30
30
  namespace fastqr {
31
31
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastqr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - FastQR Project