dhash-vips 0.1.1.4 → 0.1.1.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/dhash-vips.gemspec +1 -1
  3. data/extconf.rb +20 -17
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1b98ca69a92ce7e640e4497399a906ec5a3cb53
4
- data.tar.gz: 2d3dffbbd39df0448114bb1b4f7d59afb729c162
3
+ metadata.gz: fff14578bcad5c73887655e363e79dddc3acefe7
4
+ data.tar.gz: f4633556e075270a05b456e80b367b9be0bf8a6a
5
5
  SHA512:
6
- metadata.gz: '081328a940448d63e396ba141f1d897c5367de1e923410dd67e8de9da8e811e83f035b1094ba2b7e81eb9ed9cf61a9c23cc1f88a19ba3cb822dabd63160f345b'
7
- data.tar.gz: 59dbcdf54db72f70dc089b1b75c5574e3e06e41ec54ccfd04d270f7fd89d498a71346e62f97cf5c7aa807915f6a88bd542261243dbbdf19d4a72b9b85af9fb9e
6
+ metadata.gz: d3cea61fb131a2737b9e1cb3bcd671ea1e017c8fd2d098e045c6f4cd3463e8621a239ffb7432dacc0196ced7f5060ff1fec8aaf9366d55adc758605df5887966
7
+ data.tar.gz: 316e06f339504f6eddbce864c2585e55428689444da97c9afdb0e1faa0fe976404412240465944a40411bf7ab624d4ddcb187563fb7d32f4f9b0c7dc2ae4dbec
data/dhash-vips.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "dhash-vips"
3
- spec.version = "0.1.1.4"
3
+ spec.version = "0.1.1.5"
4
4
  spec.summary = "dHash and IDHash perceptual image hashing/fingerprinting"
5
5
  # spec.homepage = "https://github.com/nakilon/dhash-vips"
6
6
 
data/extconf.rb CHANGED
@@ -3,14 +3,12 @@ require "mkmf"
3
3
  File.write "Makefile", dummy_makefile(?.).join
4
4
 
5
5
  unless Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.3.8")
6
- if ENV["RBENV_ROOT"] && ENV["RBENV_VERSION"]
7
- # https://github.com/rbenv/rbenv/issues/1199
8
- if found = Dir.glob("#{ENV["RBENV_ROOT"]}/sources/#{ENV["RBENV_VERSION"]}/ruby-*/").first
9
- append_cppflags "-I#{Dir.glob("#{ENV["RBENV_ROOT"]}/sources/#{ENV["RBENV_VERSION"]}/ruby-*/").first}"
10
- end
11
- else
12
- append_cppflags "-I/ruby/"
6
+ if ruby_source_dir = if File.directory? "/ruby"
7
+ "-I/ruby" # for Github Actions: docker (currently disabled) and benchmark
8
+ elsif ENV["RBENV_ROOT"] && ENV["RBENV_VERSION"] && File.exist?(t = "#{ENV["RBENV_ROOT"]}/sources/#{ENV["RBENV_VERSION"]}/ruby-#{ENV["RBENV_VERSION"]}/bignum.c") # https://github.com/rbenv/rbenv/issues/1199
9
+ "-I#{File.dirname t}"
13
10
  end
11
+ append_cppflags ruby_source_dir
14
12
  append_cppflags "-DRUBY_EXPORT" unless Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4")
15
13
  create_makefile "idhash"
16
14
  # Why this hack?
@@ -21,15 +19,20 @@ unless Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.3.8")
21
19
  test: all
22
20
  \t$(RUBY) -r./lib/dhash-vips.rb ./lib/dhash-vips-post-install-test.rb
23
21
  HEREDOC
22
+ end
24
23
  end
25
24
 
26
- # How to test:
27
- # $ ruby extconf.rb && make clean && make
28
- # $ bundle exec rake -rdhash-vips -e "p DHashVips::IDHash.method(:distance3).source_location"
29
- # # ["/Users/nakilon/_/dhash-vips/lib/dhash-vips.rb", 52] # or 42 with Ruby<2.4
30
- # # ["/Users/nakilon/_/dhash-vips/lib/dhash-vips.rb", 32] # if LoadError
31
- # Other cases to check:
32
- # 1. not macOS && rbenv
33
- # 2. fail during append_cppflags
34
- # 3. failed compilation
35
- # 4. failed tests
25
+ __END__
26
+
27
+ to test: $ rake clean && rake install
28
+
29
+ $ ruby extconf.rb && make clean && make
30
+ $ ruby -rdhash-vips -e "p DHashVips::IDHash.method(:distance3).source_location"
31
+ # [".../dhash-vips.rb", 32] # if LoadError
32
+ # [".../dhash-vips.rb", 52] # if native (or 42 with Ruby<2.4)
33
+
34
+ Other cases to check:
35
+ 1. not macOS && rbenv
36
+ 2. fail during append_cppflags
37
+ 3. failed compilation
38
+ 4. failed tests
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dhash-vips
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.4
4
+ version: 0.1.1.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Victor Maslov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-21 00:00:00.000000000 Z
11
+ date: 2022-02-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ruby-vips
@@ -72,7 +72,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  version: '0'
73
73
  requirements: []
74
74
  rubyforge_project:
75
- rubygems_version: 2.5.2.3
75
+ rubygems_version: 2.6.14.4
76
76
  signing_key:
77
77
  specification_version: 4
78
78
  summary: dHash and IDHash perceptual image hashing/fingerprinting