digest 3.1.0.pre2 → 3.1.0.pre3

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: b9e055404c669016e5396b100ec0f300762ee25382705476e541c146c722c359
4
- data.tar.gz: 78502d4308b80141cf0adc91097a3f742ba0a26030f7bdddfefd41d0c344eb11
3
+ metadata.gz: a901be021123562b80812ad783e1e6cb9d44a3d3082b38304860722b1de65b8d
4
+ data.tar.gz: d22dfd3515b87aa626b52a096240fab8ebe635eb0ee43edc1ce595c6ae6901a8
5
5
  SHA512:
6
- metadata.gz: 7e064d1ce651832f2c8bc528292983c045274c089a5179a3b20750dfa2ba0d4d3d4d97be187ae89eafcd61e86c43cfae7ebf7a61d367430dc378a1ac668c8d32
7
- data.tar.gz: 31e7e2d7ad75b0e2bfe429d818ac310ceba62329168eba5916a8fcfd52733976a496c9de340679dabe88032d7e9169068f6abd7945794bcd10e1e285fc4559b4
6
+ metadata.gz: 4f06a8c82073b0ae69a6f6a0292a92bcca0e13af7f751cc98471769c71efcd5f5cd2cfa45ad9b3b7d1b574b7ce7b442ee85f75391de1376f9180499dd682c002
7
+ data.tar.gz: 3a53dbbcd44edacf5ea23a326a27474715693ea6064d9ed5211790fcf2af12669a9115219cf8cd83bda99d5a0c4790bd9d7a9062b4b3f29de0e4b3c2bc15f16d
data/ext/digest/depend ADDED
@@ -0,0 +1,3 @@
1
+ do-install-rb: do-install-headers
2
+ do-install-headers:
3
+ $(Q) $(RUBY) install_headers.rb $(srcdir)/digest.h $(DESTDIR)$(HDRDIR)
@@ -4,8 +4,4 @@
4
4
 
5
5
  require "mkmf"
6
6
 
7
- $INSTALLFILES = {
8
- "digest.h" => "$(HDRDIR)"
9
- }
10
-
11
7
  create_makefile("digest")
@@ -0,0 +1,13 @@
1
+ require "fileutils"
2
+
3
+ *files, dest = ARGV
4
+
5
+ if File.exist?(File.join(dest, "ruby.h"))
6
+ warn "installing header files"
7
+
8
+ files.each { |file|
9
+ FileUtils.install file, dest, mode: 0644, verbose: true
10
+ }
11
+ else
12
+ warn "not installing header files when installed as an external library"
13
+ end
data/ext/digest/md5/md5.c CHANGED
@@ -225,7 +225,7 @@ md5_process(MD5_CTX *pms, const uint8_t *data /*[64]*/)
225
225
  uint32_t xbuf[16];
226
226
  const uint32_t *X;
227
227
 
228
- if (!((data - (const uint8_t *)0) & 3)) {
228
+ if (!(((uintptr_t)data) & 3)) {
229
229
  /* data are properly aligned */
230
230
  X = (const uint32_t *)data;
231
231
  } else {
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Digest
4
+ VERSION = "3.1.0.pre3"
5
+ end
data/lib/digest.rb CHANGED
@@ -1,10 +1,25 @@
1
1
  # frozen_string_literal: false
2
2
 
3
+ # The gem and bundle commands (except for bundle exec) first load
4
+ # digest via openssl and then load gems, so if this is installed via
5
+ # gem, we are overwriting the default version of digest. Beware not
6
+ # to break it or cause redefinition warnings.
7
+ #
8
+ # When we introduce incompatible changes and overwriting is not an
9
+ # option, and given that the default version does not have security
10
+ # defects, we may just give up and let those commands just use the
11
+ # default version of digest.
12
+ #
13
+ # return if defined?(Digest) && caller_locations.any? { |l|
14
+ # %r{/(rubygems/gem_runner|bundler/cli)\.rb}.match?(l.path)
15
+ # }
16
+
17
+ require 'digest/version'
3
18
  require 'digest/loader'
4
19
 
5
20
  module Digest
6
21
  # A mutex for Digest().
7
- REQUIRE_MUTEX = Thread::Mutex.new
22
+ REQUIRE_MUTEX ||= Thread::Mutex.new
8
23
 
9
24
  def self.const_missing(name) # :nodoc:
10
25
  case name
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: digest
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.0.pre2
4
+ version: 3.1.0.pre3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Akinori MUSHA
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-09-30 00:00:00.000000000 Z
11
+ date: 2021-10-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Provides a framework for message digest libraries.
14
14
  email:
@@ -28,10 +28,12 @@ files:
28
28
  - ext/digest/bubblebabble/bubblebabble.c
29
29
  - ext/digest/bubblebabble/extconf.rb
30
30
  - ext/digest/defs.h
31
+ - ext/digest/depend
31
32
  - ext/digest/digest.c
32
33
  - ext/digest/digest.h
33
34
  - ext/digest/digest_conf.rb
34
35
  - ext/digest/extconf.rb
36
+ - ext/digest/install_headers.rb
35
37
  - ext/digest/lib/digest/loader.rb
36
38
  - ext/digest/lib/digest/sha2/loader.rb
37
39
  - ext/digest/md5/extconf.rb
@@ -56,6 +58,7 @@ files:
56
58
  - ext/digest/test.sh
57
59
  - lib/digest.rb
58
60
  - lib/digest/sha2.rb
61
+ - lib/digest/version.rb
59
62
  homepage: https://github.com/ruby/digest
60
63
  licenses:
61
64
  - Ruby