-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* gem: update for ruby 3.2 * ci: add codeql * ci: fix spec path * ci: add dependabot yml
- Loading branch information
Showing
11 changed files
with
126 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
--- | ||
updates: | ||
- | ||
directory: / | ||
labels: | ||
- dependencies | ||
package-ecosystem: bundler | ||
schedule: | ||
interval: weekly | ||
versioning-strategy: increase | ||
- | ||
directory: / | ||
labels: | ||
- operations | ||
package-ecosystem: github-actions | ||
schedule: | ||
interval: monthly | ||
version: 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
--- | ||
name: CodeQL | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
permissions: | ||
actions: read | ||
contents: read | ||
security-events: write | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
language: | ||
- ruby | ||
- c | ||
steps: | ||
- name: "Checkout repository" | ||
uses: actions/checkout@v3 | ||
- name: "Initialize CodeQL" | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: "${{ matrix.language }}" | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
- name: "Perform CodeQL Analysis" | ||
uses: github/codeql-action/analyze@v2 | ||
- uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.2' | ||
bundler-cache: true | ||
- name: "Run rufo code formatting checks" | ||
run: | | ||
gem install rufo | ||
rufo --check ./lib | ||
rufo --check ./test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# frozen_string_literal: true | ||
|
||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in keccak.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
# frozen_string_literal: true | ||
|
||
lib = File.expand_path('lib', __dir__).freeze | ||
lib = File.expand_path("lib", __dir__).freeze | ||
$LOAD_PATH.unshift lib unless $LOAD_PATH.include? lib | ||
|
||
require 'digest/keccak/version' | ||
require "digest/keccak/version" | ||
|
||
Gem::Specification.new do |spec| | ||
spec.name = "keccak" | ||
|
@@ -15,15 +15,15 @@ Gem::Specification.new do |spec| | |
spec.email = "%w[[email protected]]" | ||
spec.extensions << "ext/digest/extconf.rb" | ||
spec.platform = Gem::Platform::RUBY | ||
spec.required_ruby_version = ">= 2.2", "< 4.0" | ||
spec.required_ruby_version = ">= 2.7", "< 4.0" | ||
spec.license = "Apache-2.0" | ||
spec.metadata = { | ||
'homepage_uri' => 'https://github.com/q9f/keccak.rb', | ||
'source_code_uri' => 'https://github.com/q9f/keccak.rb', | ||
'github_repo' => 'https://github.com/q9f/keccak.rb', | ||
'bug_tracker_uri' => 'https://github.com/q9f/keccak.rb/issues', | ||
"homepage_uri" => "https://github.com/q9f/keccak.rb", | ||
"source_code_uri" => "https://github.com/q9f/keccak.rb", | ||
"github_repo" => "https://github.com/q9f/keccak.rb", | ||
"bug_tracker_uri" => "https://github.com/q9f/keccak.rb/issues", | ||
}.freeze | ||
spec.require_paths = ['lib'] | ||
spec.require_paths = ["lib"] | ||
spec.files = Dir[ | ||
"README.md", | ||
"COPYRIGHT", | ||
|
@@ -34,6 +34,6 @@ Gem::Specification.new do |spec| | |
"lib/**/*" | ||
] | ||
spec.test_files = spec.files.grep %r{^(test|spec|features)/} | ||
spec.add_development_dependency 'bundler', '~> 2.2' | ||
spec.add_development_dependency 'test-unit', '~> 3.4' | ||
spec.add_development_dependency "bundler", "~> 2.2" | ||
spec.add_development_dependency "test-unit", "~> 3.4" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,6 +2,6 @@ | |
|
||
module Digest | ||
class Keccak | ||
VERSION = "1.3.1" | ||
VERSION = "1.3.2" | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,21 @@ | ||
# frozen_string_literal: true | ||
|
||
require 'test/unit' | ||
require "test/unit" | ||
|
||
class KeccakNewTests < Test::Unit::TestCase | ||
def test_singleton_method_hexdigest_256_empty | ||
result = Digest::Keccak.hexdigest '', 256 | ||
result = Digest::Keccak.hexdigest "", 256 | ||
assert_instance_of String, result | ||
assert_equal 'c5d2460186f7233c927e7db2dcc703c0' \ | ||
'e500b653ca82273b7bfad8045d85a470', | ||
assert_equal "c5d2460186f7233c927e7db2dcc703c0" \ | ||
"e500b653ca82273b7bfad8045d85a470", | ||
result | ||
end | ||
|
||
def test_singleton_method_hexdigest_256_sample | ||
result = Digest::Keccak.hexdigest 'sample', 256 | ||
result = Digest::Keccak.hexdigest "sample", 256 | ||
assert_instance_of String, result | ||
assert_equal 'b80204f7e9243e4fca5489740ccd31dc' \ | ||
'd0a54619a7f4165cee73c191ef7271a1', | ||
assert_equal "b80204f7e9243e4fca5489740ccd31dc" \ | ||
"d0a54619a7f4165cee73c191ef7271a1", | ||
result | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters