bitz 2.0.0 → 2.0.2
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 +4 -4
- data/.github/workflows/ci.yml +30 -0
- data/.github/workflows/release.yml +52 -0
- data/Rakefile +3 -1
- data/lib/bitz/set.rb +3 -5
- data/lib/bitz/version.rb +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8d5a59cf216428af103a6ddefc0eb65a381e744d55d81ec7293f3b00028248d4
|
|
4
|
+
data.tar.gz: 50a006522f1d4209c2079955cf53fd6126f34fd9f6bf11e2f370a4a62d0ef50d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 4a52d337e1721a454334e03d1ebe71001afd85475c9ef2357b908709eb384e66888c1d2aa7887e060e3ff0bd88161541f96526de812f90549a3e14036e719a64
|
|
7
|
+
data.tar.gz: c31b2eafc6581b5486d0af8cb61a0418fd1752bbc85fb29423b0d518fe085f5c84e0e6c6457d967a1eb38241c43ea900151c1c0d030d8c0d0eb0c92296065b0e
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
pull_request:
|
|
6
|
+
|
|
7
|
+
jobs:
|
|
8
|
+
ruby-versions:
|
|
9
|
+
uses: ruby/actions/.github/workflows/ruby_versions.yml@master
|
|
10
|
+
|
|
11
|
+
test:
|
|
12
|
+
needs: ruby-versions
|
|
13
|
+
runs-on: ubuntu-latest
|
|
14
|
+
strategy:
|
|
15
|
+
matrix:
|
|
16
|
+
ruby: ${{ fromJson(needs.ruby-versions.outputs.versions) }}
|
|
17
|
+
|
|
18
|
+
steps:
|
|
19
|
+
- uses: actions/checkout@v4
|
|
20
|
+
|
|
21
|
+
- name: Set up Ruby
|
|
22
|
+
uses: ruby/setup-ruby-pkgs@v1
|
|
23
|
+
with:
|
|
24
|
+
ruby-version: ${{ matrix.ruby }}
|
|
25
|
+
apt-get: "haveged libyaml-dev"
|
|
26
|
+
brew: libyaml
|
|
27
|
+
vcpkg: libyaml
|
|
28
|
+
|
|
29
|
+
- name: Run tests
|
|
30
|
+
run: bundle exec rake test
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
name: Publish gem to rubygems.org
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags:
|
|
6
|
+
- 'v*'
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
push:
|
|
13
|
+
if: github.repository == 'tenderlove/bitz'
|
|
14
|
+
runs-on: ubuntu-latest
|
|
15
|
+
|
|
16
|
+
environment:
|
|
17
|
+
name: rubygems.org
|
|
18
|
+
url: https://rubygems.org/gems/bitz
|
|
19
|
+
|
|
20
|
+
permissions:
|
|
21
|
+
contents: write
|
|
22
|
+
id-token: write
|
|
23
|
+
|
|
24
|
+
strategy:
|
|
25
|
+
matrix:
|
|
26
|
+
ruby: ["ruby"]
|
|
27
|
+
|
|
28
|
+
steps:
|
|
29
|
+
- name: Harden Runner
|
|
30
|
+
uses: step-security/harden-runner@v2
|
|
31
|
+
with:
|
|
32
|
+
egress-policy: audit
|
|
33
|
+
|
|
34
|
+
- uses: actions/checkout@v4
|
|
35
|
+
|
|
36
|
+
- name: Set up Ruby
|
|
37
|
+
uses: ruby/setup-ruby@v1
|
|
38
|
+
with:
|
|
39
|
+
ruby-version: ${{ matrix.ruby }}
|
|
40
|
+
|
|
41
|
+
- name: Install dependencies
|
|
42
|
+
run: bundle install --jobs 4 --retry 3
|
|
43
|
+
|
|
44
|
+
- name: Publish to RubyGems
|
|
45
|
+
uses: rubygems/release-gem@v1
|
|
46
|
+
|
|
47
|
+
- name: Create GitHub release
|
|
48
|
+
run: |
|
|
49
|
+
tag_name="$(git describe --tags --abbrev=0)"
|
|
50
|
+
gh release create "${tag_name}" --verify-tag --generate-notes
|
|
51
|
+
env:
|
|
52
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/Rakefile
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
require 'rake/testtask'
|
|
2
|
+
require "bundler"
|
|
3
|
+
Bundler::GemHelper.install_tasks
|
|
2
4
|
|
|
3
5
|
Rake::TestTask.new(:test) do |t|
|
|
4
6
|
t.libs << "test"
|
|
@@ -7,4 +9,4 @@ Rake::TestTask.new(:test) do |t|
|
|
|
7
9
|
t.warning = true
|
|
8
10
|
end
|
|
9
11
|
|
|
10
|
-
task :default => :test
|
|
12
|
+
task :default => :test
|
data/lib/bitz/set.rb
CHANGED
|
@@ -307,10 +307,9 @@ module Bitz
|
|
|
307
307
|
# @param other [Object] the object to compare with
|
|
308
308
|
# @return [Boolean] true if bitsets are equal, false otherwise
|
|
309
309
|
def == other
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
@buffer == other.buffer
|
|
310
|
+
super || (other.is_a?(self.class) &&
|
|
311
|
+
other.capacity == capacity &&
|
|
312
|
+
@buffer == other.buffer)
|
|
314
313
|
end
|
|
315
314
|
|
|
316
315
|
alias :eql? :==
|
|
@@ -335,6 +334,5 @@ module Bitz
|
|
|
335
334
|
n = (n + (n >> 4)) & 0x0F # 00001111 - count whole byte
|
|
336
335
|
n
|
|
337
336
|
end
|
|
338
|
-
|
|
339
337
|
end
|
|
340
338
|
end
|
data/lib/bitz/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: bitz
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.0.
|
|
4
|
+
version: 2.0.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Aaron Patterson
|
|
@@ -44,6 +44,8 @@ executables: []
|
|
|
44
44
|
extensions: []
|
|
45
45
|
extra_rdoc_files: []
|
|
46
46
|
files:
|
|
47
|
+
- ".github/workflows/ci.yml"
|
|
48
|
+
- ".github/workflows/release.yml"
|
|
47
49
|
- Gemfile
|
|
48
50
|
- LICENSE
|
|
49
51
|
- README.md
|
|
@@ -72,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
72
74
|
- !ruby/object:Gem::Version
|
|
73
75
|
version: '0'
|
|
74
76
|
requirements: []
|
|
75
|
-
rubygems_version: 3.
|
|
77
|
+
rubygems_version: 3.6.9
|
|
76
78
|
specification_version: 4
|
|
77
79
|
summary: A pure Ruby, JIT-friendly dynamic bitset implementation
|
|
78
80
|
test_files:
|