summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkinori MUSHA <[email protected]>2021-09-27 16:31:55 +0900
committerHiroshi SHIBATA <[email protected]>2021-10-12 20:53:16 +0900
commitb245b67d9e325824f3869d839a16d06c6a1e8392 ()
tree547cc3f299d0edaca28a6036892ee0bcf71e919b
parent5e1d2c5c9770118713857499c28cd55a2c483631 (diff)
[ruby/digest] Place common parts in lib and engine specific parts under ext/**/lib
https://.com/ruby/digest/commit/8d7496c3be
-rw-r--r--ext/digest/bubblebabble/lib/bubblebabble.rb9
-rw-r--r--ext/digest/digest.gemspec55
-rw-r--r--ext/digest/lib/digest/loader.rb3
-rw-r--r--ext/digest/lib/digest/sha2/loader.rb3
-rw-r--r--ext/digest/md5/lib/md5.rb9
-rw-r--r--ext/digest/rmd160/lib/rmd160.rb9
-rw-r--r--ext/digest/sha1/lib/sha1.rb9
-rw-r--r--lib/digest.rb (renamed from ext/digest/lib/digest.rb)7
-rw-r--r--lib/digest/sha2.rb (renamed from ext/digest/sha2/lib/sha2.rb)7
9 files changed, 20 insertions, 91 deletions
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-
-require 'digest'
-
-if RUBY_ENGINE == 'jruby'
- JRuby::Util.load_ext("org.jruby.ext.digest.BubbleBabble")
-else
- require 'digest/bubblebabble.so'
-end
@@ -12,60 +12,27 @@ Gem::Specification.new do |spec|
spec.homepage = "https://.com/ruby/digest"
spec.licenses = ["Ruby", "BSD-2-Clause"]
- spec.files = [
- "LICENSE.txt", "README.md",
-
- "ext/digest/defs.h", "ext/digest/digest.c", "ext/digest/digest.h",
- "ext/digest/digest_conf.rb", "ext/digest/extconf.rb",
- "ext/digest/lib/digest.rb",
-
- "ext/digest/bubblebabble/bubblebabble.c",
- "ext/digest/bubblebabble/extconf.rb",
-
- "ext/digest/md5/extconf.rb", "ext/digest/md5/md5.c",
- "ext/digest/md5/md5.h", "ext/digest/md5/md5cc.h",
- "ext/digest/md5/md5init.c",
-
- "ext/digest/rmd160/extconf.rb", "ext/digest/rmd160/rmd160.c",
- "ext/digest/rmd160/rmd160.h", "ext/digest/rmd160/rmd160init.c",
-
- "ext/digest/sha1/extconf.rb", "ext/digest/sha1/sha1.c",
- "ext/digest/sha1/sha1.h", "ext/digest/sha1/sha1cc.h",
- "ext/digest/sha1/sha1init.c",
-
- "ext/digest/sha2/extconf.rb", "ext/digest/sha2/lib/sha2.rb",
- "ext/digest/sha2/sha2.c", "ext/digest/sha2/sha2.h",
- "ext/digest/sha2/sha2cc.h", "ext/digest/sha2/sha2init.c",
-
- "ext/openssl/deprecation.rb",
- "ext/digest/test.sh",
]
spec.required_ruby_version = ">= 2.5.0"
spec.bindir = "exe"
spec.executables = []
- spec.require_paths = ["lib"]
if Gem::Platform === spec.platform and spec.platform =~ 'java' or RUBY_ENGINE == 'jruby'
spec.platform = 'java'
- spec.files.concat [
- "lib/digest.jar",
- "lib/digest/md5.rb",
- "lib/digest/sha1.rb",
- "lib/digest/sha2.rb",
- "lib/digest/rmd160.rb",
- "lib/digest/bubblebabble.rb"
- ]
else
- spec.extensions = %w[
- ext/digest/extconf.rb
- ext/digest/bubblebabble/extconf.rb
- ext/digest/md5/extconf.rb
- ext/digest/rmd160/extconf.rb
- ext/digest/sha1/extconf.rb
- ext/digest/sha2/extconf.rb
- ]
end
spec.metadata["msys2_mingw_dependencies"] = "openssl"
@@ -0,0 +1,3 @@
@@ -0,0 +1,3 @@
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-
-require 'digest'
-
-if RUBY_ENGINE == 'jruby'
- JRuby::Util.load_ext("org.jruby.ext.digest.MD5")
-else
- require 'digest/md5.so'
-end
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-
-require 'digest'
-
-if RUBY_ENGINE == 'jruby'
- JRuby::Util.load_ext("org.jruby.ext.digest.RMD160")
-else
- require 'digest/rmd160.so'
-end
@@ -1,9 +0,0 @@
-# frozen_string_literal: false
-
-require 'digest'
-
-if RUBY_ENGINE == 'jruby'
- JRuby::Util.load_ext("org.jruby.ext.digest.SHA1")
-else
- require 'digest/sha1.so'
-end
@@ -1,9 +1,6 @@
# frozen_string_literal: false
-if RUBY_ENGINE == 'jruby'
- JRuby::Util.load_ext("org.jruby.ext.digest.DigestLibrary")
-else
- require 'digest.so'
-end
module Digest
# A mutex for Digest().
@@ -11,12 +11,7 @@
# $Id$
require 'digest'
-
-if RUBY_ENGINE == 'jruby'
- JRuby::Util.load_ext("org.jruby.ext.digest.SHA2")
-else
- require 'digest/sha2.so'
-end
module Digest
#