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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 81b3e01265c409832de742771d83abbfa21c0445a0ad3fa44d8ae646998786d5
4
- data.tar.gz: 79d4545e4c507a0ef774412c005fe8ac999a31457347fbea31e21533c194b0ba
3
+ metadata.gz: ab7474a5a27fb0167098bc9838f8e57bc78082d596c5e38a7c86764fdf62bf13
4
+ data.tar.gz: 5a0b4d731bfd0fdbdd19a2cec36973cfc04460237acf58ac03dda51e8da82fe1
5
5
  SHA512:
6
- metadata.gz: 9380345b150e5d8e2de3d9c58e4a1b5e6e4ac293f247c9a86caf5b9d1e9026b9b3a89d91254d91edf12212e553fe979894c1a01d6e0d1bfbf5cb1fd37571a7af
7
- data.tar.gz: 64bb2538e6d712929a8fdfb2511f612b638c0f33d47eb38b973c9a26876e8ed44642ab1198dcc9f92614716e2b2d5b519705287897dca3ecd66e102d21a41b4e
6
+ metadata.gz: ae940a4cb85d44b0ad84a01fde9e8aaf285366dfcbccca4ba68619966005e1f003046de298b5d69098a4d3fcfd2a020ef49fa6eb5a3a0c790f59cd3060138bb6
7
+ data.tar.gz: 92b9e926ad5b98f4afc7522c0b7a1a7490f32ed474d0881643f09ae8747ada70f25aa77360dc4707c369c6e58bfa747fc0eca7efb8cc05ee2f752e802202b017
@@ -5,17 +5,18 @@ cache:
5
5
  directories:
6
6
  - "$HOME/.ccache"
7
7
  rvm:
8
- - 1.9.3
9
- - 2.2.8
10
- - 2.3.5
11
- - 2.4.2
12
- - 2.5.3
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
@@ -0,0 +1,9 @@
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'
@@ -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", "~> 1.10"
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"
@@ -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
- $INCFLAGS << ' -I$(srcdir)/enc -I$(srcdir)/dec -I$(srcdir)/common -I$(srcdir)/include'
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
- __DIR__ = File.expand_path(File.dirname __FILE__)
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
- FileUtils.mkdir_p dirname
13
- FileUtils.cp_r File.expand_path(File.join(__DIR__, '..', '..', 'vendor', 'brotli', 'c', dirname), __DIR__), __DIR__, verbose: true
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
- file[__DIR__ + File::SEPARATOR] = ''
20
- srcs << file
21
- objs << file.sub(/\.c\z/, '.' + RbConfig::CONFIG['OBJEXT'])
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
- src = 'ORIG_SRCS = brotli.c buffer.c'
26
- obj = 'OBJS = brotli.o buffer.o'
27
- txt = f.read
28
- .sub(/^ORIG_SRCS = .*$/, src + ' ' + srcs.join(' '))
29
- .sub(/^OBJS = .*$/, obj + ' ' + objs.join(' '))
30
- f.rewind
31
- f.write txt
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
@@ -1,3 +1,3 @@
1
1
  module Brotli
2
- VERSION = '0.2.2'
2
+ VERSION = '0.2.3'
3
3
  end
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 --no-ri --no-rdoc "$(ls pkg/brotli-*.gem)"
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.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: 2018-11-01 00:00:00.000000000 Z
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: '1.10'
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: '1.10'
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
- rubyforge_project:
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