brotli 0.2.2 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +11 -7
- data/bin/before_install.sh +9 -0
- data/brotli.gemspec +1 -1
- data/ext/brotli/extconf.rb +38 -21
- data/lib/brotli/version.rb +1 -1
- data/smoke.sh +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab7474a5a27fb0167098bc9838f8e57bc78082d596c5e38a7c86764fdf62bf13
|
4
|
+
data.tar.gz: 5a0b4d731bfd0fdbdd19a2cec36973cfc04460237acf58ac03dda51e8da82fe1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ae940a4cb85d44b0ad84a01fde9e8aaf285366dfcbccca4ba68619966005e1f003046de298b5d69098a4d3fcfd2a020ef49fa6eb5a3a0c790f59cd3060138bb6
|
7
|
+
data.tar.gz: 92b9e926ad5b98f4afc7522c0b7a1a7490f32ed474d0881643f09ae8747ada70f25aa77360dc4707c369c6e58bfa747fc0eca7efb8cc05ee2f752e802202b017
|
data/.travis.yml
CHANGED
@@ -5,17 +5,18 @@ cache:
|
|
5
5
|
directories:
|
6
6
|
- "$HOME/.ccache"
|
7
7
|
rvm:
|
8
|
-
- 1.9
|
9
|
-
- 2.2
|
10
|
-
- 2.3
|
11
|
-
- 2.4
|
12
|
-
- 2.5
|
8
|
+
- 1.9
|
9
|
+
- 2.2
|
10
|
+
- 2.3
|
11
|
+
- 2.4
|
12
|
+
- 2.5
|
13
|
+
- 2.6
|
14
|
+
- truffleruby
|
13
15
|
env:
|
14
16
|
global:
|
15
17
|
- RANTLY_COUNT=10000
|
16
18
|
- PATH="/usr/lib/ccache:$PATH"
|
17
|
-
before_install:
|
18
|
-
- gem install bundler
|
19
|
+
before_install: ./bin/before_install.sh
|
19
20
|
deploy:
|
20
21
|
provider: rubygems
|
21
22
|
api_key:
|
@@ -25,3 +26,6 @@ deploy:
|
|
25
26
|
tags: true
|
26
27
|
repo: miyucy/brotli
|
27
28
|
script: bundle exec rake && ./smoke.sh
|
29
|
+
matrix:
|
30
|
+
allow_failures:
|
31
|
+
- rvm: truffleruby
|
data/brotli.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.require_paths = ["lib"]
|
26
26
|
spec.extensions = ["ext/brotli/extconf.rb"]
|
27
27
|
|
28
|
-
spec.add_development_dependency "bundler"
|
28
|
+
spec.add_development_dependency "bundler"
|
29
29
|
spec.add_development_dependency "rake"
|
30
30
|
spec.add_development_dependency "rake-compiler"
|
31
31
|
spec.add_development_dependency "rspec"
|
data/ext/brotli/extconf.rb
CHANGED
@@ -2,31 +2,48 @@ require 'mkmf'
|
|
2
2
|
require 'fileutils'
|
3
3
|
require 'rbconfig'
|
4
4
|
|
5
|
+
dir_config("brotli")
|
6
|
+
|
7
|
+
# libbrotli-dev
|
8
|
+
have_dev_pkg = [
|
9
|
+
have_header("brotli/decode.h"),
|
10
|
+
have_header("brotli/encode.h"),
|
11
|
+
pkg_config("libbrotlicommon"),
|
12
|
+
pkg_config("libbrotlidec"),
|
13
|
+
pkg_config("libbrotlienc")
|
14
|
+
].all? { |e| e }
|
15
|
+
|
5
16
|
$CPPFLAGS << ' -DOS_MACOSX' if RbConfig::CONFIG['host_os'] =~ /darwin|mac os/
|
6
|
-
|
17
|
+
unless have_dev_pkg
|
18
|
+
$INCFLAGS << ' -I$(srcdir)/enc -I$(srcdir)/dec -I$(srcdir)/common -I$(srcdir)/include'
|
19
|
+
end
|
20
|
+
|
7
21
|
create_makefile('brotli/brotli')
|
8
22
|
|
9
|
-
|
23
|
+
unless have_dev_pkg
|
24
|
+
__DIR__ = File.expand_path(File.dirname __FILE__)
|
10
25
|
|
11
|
-
%w[enc dec common include].each do |dirname|
|
12
|
-
|
13
|
-
|
14
|
-
end
|
26
|
+
%w[enc dec common include].each do |dirname|
|
27
|
+
FileUtils.mkdir_p dirname
|
28
|
+
FileUtils.cp_r File.expand_path(File.join(__DIR__, '..', '..', 'vendor', 'brotli', 'c', dirname), __DIR__), __DIR__, verbose: true
|
29
|
+
end
|
15
30
|
|
16
|
-
srcs = []
|
17
|
-
objs = []
|
18
|
-
Dir[File.expand_path(File.join('{enc,dec,common,include}', '**', '*.c'), __DIR__)].sort.each do |file|
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
end
|
31
|
+
srcs = []
|
32
|
+
objs = []
|
33
|
+
Dir[File.expand_path(File.join('{enc,dec,common,include}', '**', '*.c'), __DIR__)].sort.each do |file|
|
34
|
+
file[__DIR__ + File::SEPARATOR] = ''
|
35
|
+
srcs << file
|
36
|
+
objs << file.sub(/\.c\z/, '.' + RbConfig::CONFIG['OBJEXT'])
|
37
|
+
end
|
23
38
|
|
24
|
-
File.open('Makefile', 'r+') do |f|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
39
|
+
File.open('Makefile', 'r+') do |f|
|
40
|
+
obj_ext = RbConfig::CONFIG['OBJEXT']
|
41
|
+
src = 'ORIG_SRCS = brotli.c buffer.c'
|
42
|
+
obj = "OBJS = brotli.#{obj_ext} buffer.#{obj_ext}"
|
43
|
+
txt = f.read
|
44
|
+
.sub(/^ORIG_SRCS = .*$/, src + ' ' + srcs.join(' '))
|
45
|
+
.sub(/^OBJS = .*$/, obj + ' ' + objs.join(' '))
|
46
|
+
f.rewind
|
47
|
+
f.write txt
|
48
|
+
end
|
32
49
|
end
|
data/lib/brotli/version.rb
CHANGED
data/smoke.sh
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/bin/bash
|
2
2
|
gem list | grep brotli && gem uninstall --force brotli
|
3
3
|
bundle exec rake clobber build
|
4
|
-
gem install --force --local
|
4
|
+
gem install --force --local "$(ls pkg/brotli-*.gem)"
|
5
5
|
cat <<EOF | ruby
|
6
6
|
require 'brotli'
|
7
7
|
abort if Brotli.inflate(Brotli.deflate(File.read('smoke.sh'))) != File.read('smoke.sh')
|
metadata
CHANGED
@@ -1,29 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: brotli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- miyucy
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-04-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '0'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -96,6 +96,7 @@ files:
|
|
96
96
|
- LICENSE.txt
|
97
97
|
- README.md
|
98
98
|
- Rakefile
|
99
|
+
- bin/before_install.sh
|
99
100
|
- bin/console
|
100
101
|
- bin/setup
|
101
102
|
- brotli.gemspec
|
@@ -228,8 +229,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
228
229
|
- !ruby/object:Gem::Version
|
229
230
|
version: '0'
|
230
231
|
requirements: []
|
231
|
-
|
232
|
-
rubygems_version: 2.7.7
|
232
|
+
rubygems_version: 3.0.3
|
233
233
|
signing_key:
|
234
234
|
specification_version: 4
|
235
235
|
summary: Brotli compressor/decompressor
|