brotli 0.8.0 → 0.9.0

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: brotli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - miyucy
@@ -9,7 +9,7 @@ bindir: bin
9
9
  cert_chain: []
10
10
  date: 1980-01-02 00:00:00.000000000 Z
11
11
  dependencies: []
12
- description: Brotli compressor/decompressor
12
+ description: Native Ruby bindings for Brotli compression and decompression.
13
13
  email:
14
14
  - fistfvck@gmail.com
15
15
  executables: []
@@ -17,20 +17,8 @@ extensions:
17
17
  - ext/brotli/extconf.rb
18
18
  extra_rdoc_files: []
19
19
  files:
20
- - ".github/workflows/main.yml"
21
- - ".github/workflows/publish.yml"
22
- - ".gitignore"
23
- - ".gitmodules"
24
- - ".rspec"
25
- - Dockerfile
26
- - Gemfile
27
20
  - LICENSE.txt
28
21
  - README.md
29
- - Rakefile
30
- - bin/before_install.sh
31
- - bin/console
32
- - bin/setup
33
- - brotli.gemspec
34
22
  - ext/brotli/brotli.c
35
23
  - ext/brotli/brotli.h
36
24
  - ext/brotli/buffer.c
@@ -40,14 +28,11 @@ files:
40
28
  - lib/brotli/reader.rb
41
29
  - lib/brotli/version.rb
42
30
  - lib/brotli/writer.rb
43
- - smoke.sh
44
31
  - vendor/brotli/LICENSE
45
32
  - vendor/brotli/c/common/constants.c
46
33
  - vendor/brotli/c/common/constants.h
47
34
  - vendor/brotli/c/common/context.c
48
35
  - vendor/brotli/c/common/context.h
49
- - vendor/brotli/c/common/dictionary.bin
50
- - vendor/brotli/c/common/dictionary.bin.br
51
36
  - vendor/brotli/c/common/dictionary.c
52
37
  - vendor/brotli/c/common/dictionary.h
53
38
  - vendor/brotli/c/common/dictionary_inc.h
@@ -142,7 +127,6 @@ files:
142
127
  - vendor/brotli/c/enc/static_dict_lut_inc.h
143
128
  - vendor/brotli/c/enc/static_init.c
144
129
  - vendor/brotli/c/enc/static_init.h
145
- - vendor/brotli/c/enc/static_init_lazy.cc
146
130
  - vendor/brotli/c/enc/utf8_util.c
147
131
  - vendor/brotli/c/enc/utf8_util.h
148
132
  - vendor/brotli/c/enc/write_bits.h
@@ -162,14 +146,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
146
  requirements:
163
147
  - - ">="
164
148
  - !ruby/object:Gem::Version
165
- version: '0'
149
+ version: '3.1'
166
150
  required_rubygems_version: !ruby/object:Gem::Requirement
167
151
  requirements:
168
152
  - - ">="
169
153
  - !ruby/object:Gem::Version
170
154
  version: '0'
171
155
  requirements: []
172
- rubygems_version: 4.0.3
156
+ rubygems_version: 4.0.20
173
157
  specification_version: 4
174
- summary: Brotli compressor/decompressor
158
+ summary: Ruby bindings for Brotli compression
175
159
  test_files: []
@@ -1,37 +0,0 @@
1
- name: Ruby
2
-
3
- on: [pull_request]
4
-
5
- jobs:
6
- build:
7
- strategy:
8
- fail-fast: false
9
- matrix:
10
- ruby: [3.1, 3.2, 3.3, 3.4]
11
- runs-on: ubuntu-latest
12
- steps:
13
- - uses: actions/checkout@v4
14
- with:
15
- submodules: true
16
- - name: Set up Ruby
17
- uses: ruby/setup-ruby@v1
18
- with:
19
- ruby-version: ${{ matrix.ruby }}
20
- bundler-cache: true
21
- - name: Run the default task
22
- run: |
23
- bundle exec rake clobber
24
- bundle exec rake compile -- --enable-vendor
25
- bundle exec rake test
26
- bundle exec rake build
27
- gem install --no-document "$(ls pkg/brotli-*.gem)"
28
- cat <<EOF | ruby
29
- require "brotli"
30
- if Brotli.inflate(Brotli.deflate(File.read("README.md"))) == File.read("README.md")
31
- puts "OK"
32
- exit 0
33
- else
34
- puts "NG"
35
- exit 0
36
- end
37
- EOF
@@ -1,24 +0,0 @@
1
- name: Publish Gem
2
-
3
- on:
4
- push:
5
- tags:
6
- - 'v*'
7
-
8
- jobs:
9
- build:
10
- if: github.repository == 'miyucy/brotli'
11
- runs-on: ubuntu-latest
12
- permissions:
13
- contents: write
14
- id-token: write
15
- steps:
16
- - uses: actions/checkout@v4
17
- with:
18
- submodules: true
19
- - name: Set up Ruby
20
- uses: ruby/setup-ruby@v1
21
- with:
22
- ruby-version: ruby
23
- bundler-cache: true
24
- - uses: rubygems/release-gem@v1
data/.gitignore DELETED
@@ -1,18 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /Gemfile.lock
4
- /_yardoc/
5
- /coverage/
6
- /doc/
7
- /pkg/
8
- /spec/reports/
9
- /tmp/
10
- *.bundle
11
- *.so
12
- *.o
13
- *.a
14
- mkmf.log
15
- /ext/brotli/common
16
- /ext/brotli/dec
17
- /ext/brotli/enc
18
- /ext/brotli/include
data/.gitmodules DELETED
@@ -1,3 +0,0 @@
1
- [submodule "vendor/brotli"]
2
- path = vendor/brotli
3
- url = https://github.com/google/brotli.git
data/.rspec DELETED
@@ -1,2 +0,0 @@
1
- --format documentation
2
- --color
data/Dockerfile DELETED
@@ -1,38 +0,0 @@
1
- ARG GCC_VERSION=14
2
- FROM gcc:${GCC_VERSION}
3
-
4
- ARG USE_SYSTEM_BROTLI=true
5
-
6
- # Install Ruby and development dependencies
7
- RUN apt-get update && apt-get install -y \
8
- git \
9
- libbrotli-dev \
10
- pkg-config \
11
- ruby \
12
- ruby-dev \
13
- && rm -rf /var/lib/apt/lists/*
14
-
15
- # Verify GCC version
16
- RUN gcc --version
17
-
18
- # Set working directory
19
- WORKDIR /app
20
-
21
- # Copy source code
22
- COPY . .
23
-
24
- # Install bundler and dependencies
25
- RUN gem install bundler
26
- RUN bundle install
27
-
28
- # Build and test
29
- RUN if [ "${USE_SYSTEM_BROTLI}" = "true" ]; then \
30
- echo "Building with system Brotli" && \
31
- bundle exec rake compile; \
32
- else \
33
- echo "Building with vendor Brotli" && \
34
- bundle exec rake compile -- --enable-vendor; \
35
- fi
36
- RUN bundle exec rake test
37
-
38
- CMD ["bash"]
data/Gemfile DELETED
@@ -1,10 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- # Specify your gem's dependencies in brotli.gemspec
4
- gemspec
5
-
6
- gem "rake", "~> 13.0"
7
- gem "rake-compiler"
8
- gem "test-unit", "~> 3.0"
9
- gem "test-unit-rr"
10
- gem "rantly"
data/Rakefile DELETED
@@ -1,42 +0,0 @@
1
- require "bundler/setup"
2
- require "bundler/gem_tasks"
3
- require "rake/clean"
4
- require "rake/testtask"
5
- require "rake/extensiontask"
6
-
7
- CLEAN.include("ext/brotli/common")
8
- CLEAN.include("ext/brotli/dec")
9
- CLEAN.include("ext/brotli/enc")
10
- CLEAN.include("ext/brotli/include")
11
-
12
- Rake::TestTask.new(:test) do |t|
13
- t.libs << "test"
14
- t.test_files = FileList["test/**/*_test.rb"]
15
- t.warning = true
16
- t.verbose = true
17
- end
18
-
19
- Rake::ExtensionTask.new("brotli") do |ext|
20
- ext.lib_dir = "lib/brotli"
21
- end
22
-
23
- task build: :compile
24
- task test: :compile
25
- task default: :test
26
-
27
- task :docker do
28
- gcc_versions = ["14", "15"]
29
- brotli_configs = [true, false]
30
- gcc_versions.product(brotli_configs).each do |gcc_version, use_system_brotli|
31
- command = "docker build "\
32
- "--progress=plain "\
33
- "--build-arg GCC_VERSION=#{gcc_version} "\
34
- "--build-arg USE_SYSTEM_BROTLI=#{use_system_brotli} "\
35
- "-t brotli:#{gcc_version}#{use_system_brotli ? "-use_system_brotli" : ""} ."
36
- puts "Running: #{command}"
37
- system command
38
- unless $?.exited?
39
- raise "Docker build failed for GCC version #{gcc_version} with use_system_brotli=#{use_system_brotli}"
40
- end
41
- end
42
- end
@@ -1,9 +0,0 @@
1
- #!/bin/bash
2
- set -ev
3
- gem update --system || gem update --system '2.7.8'
4
- if [ "$(gem --version | cut -b 1)" = 3 ]; then
5
- echo "gem: -N" >> ~/.gemrc
6
- else
7
- echo "gem: --no-ri --no-rdoc" >> ~/.gemrc
8
- fi
9
- gem install bundler || gem install bundler -v '< 2'
data/bin/console DELETED
@@ -1,14 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require "bundler/setup"
4
- require "brotli"
5
-
6
- # You can add fixtures and/or initialization code here to make experimenting
7
- # with your gem easier. You can also use a different console, if you like.
8
-
9
- # (If you use this, don't forget to add pry to your Gemfile!)
10
- # require "pry"
11
- # Pry.start
12
-
13
- require "irb"
14
- IRB.start
data/bin/setup DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
-
5
- bundle install
6
-
7
- # Ensure Brotli library dependencies are available
8
- git submodule update --init
data/brotli.gemspec DELETED
@@ -1,27 +0,0 @@
1
- require_relative "lib/brotli/version"
2
-
3
- Gem::Specification.new do |spec|
4
- spec.name = "brotli"
5
- spec.version = Brotli::VERSION
6
- spec.authors = ["miyucy"]
7
- spec.email = ["fistfvck@gmail.com"]
8
-
9
- spec.summary = "Brotli compressor/decompressor"
10
- spec.description = "Brotli compressor/decompressor"
11
- spec.homepage = "https://github.com/miyucy/brotli"
12
- spec.license = "MIT"
13
-
14
- tracked_files = Dir.chdir(__dir__) { `git ls-files -z`.split("\x0") }
15
- vendored_brotli_files = Dir.chdir(__dir__) do
16
- Dir["vendor/brotli/c/{common,enc,dec,include}/**/*"].select { |path| File.file?(path) }
17
- end
18
-
19
- spec.files = tracked_files
20
- .reject { |path| path == "vendor/brotli" || path.start_with?("test/") }
21
- .concat(vendored_brotli_files)
22
- .append("vendor/brotli/LICENSE")
23
- .sort
24
- .uniq
25
- spec.require_paths = ["lib"]
26
- spec.extensions = ["ext/brotli/extconf.rb"]
27
- end
data/smoke.sh DELETED
@@ -1,8 +0,0 @@
1
- #!/bin/bash
2
- gem list | grep brotli && gem uninstall --force brotli
3
- bundle exec rake clobber build
4
- gem install --force --local "$(ls pkg/brotli-*.gem)"
5
- cat <<EOF | ruby
6
- require 'brotli'
7
- abort if Brotli.inflate(Brotli.deflate(File.read('smoke.sh'))) != File.read('smoke.sh')
8
- EOF