Skip to content

Commit d477793

Browse files
committed
Initial commit
0 parents  commit d477793

30 files changed

Lines changed: 2459 additions & 0 deletions

.gitignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
.idea
2+
*.gem
3+
.bundle
4+
Gemfile.lock
5+
coverage
6+
pkg/
7+
.ruby-gemset
8+
.ruby-version
9+
/vendor/bundle

.rubocop.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
AllCops:
2+
TargetRubyVersion: 2.4
3+
4+
Layout/LineLength:
5+
Max: 120
6+
7+
Metrics/MethodLength:
8+
Max: 20
9+
10+
Style/TrailingCommaInArguments:
11+
EnforcedStyleForMultiline: comma
12+
13+
Style/TrailingCommaInArrayLiteral:
14+
EnforcedStyleForMultiline: comma
15+
16+
Style/TrailingCommaInHashLiteral:
17+
EnforcedStyleForMultiline: comma

.simplecov

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
require 'coveralls'
2+
3+
SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([
4+
SimpleCov::Formatter::HTMLFormatter,
5+
Coveralls::SimpleCov::Formatter
6+
])
7+
SimpleCov.start do
8+
add_filter '/test'
9+
end

.travis.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
language: ruby
2+
dist: xenial
3+
cache: bundler
4+
rvm:
5+
- 2.4
6+
- 2.5
7+
- 2.6
8+
- 2.7
9+
- ruby-head
10+
matrix:
11+
fast_finish: true
12+
include:
13+
- rvm: jruby-9.2
14+
jdk: openjdk8
15+
- rvm: jruby-9.2
16+
jdk: openjdk11
17+
- rvm: jruby-head
18+
jdk: openjdk11
19+
- rvm: rbx-4
20+
allow_failures:
21+
- rvm: ruby-head
22+
- rvm: rbx-4
23+
- rvm: jruby-head
24+
before_install:
25+
- gem --version
26+
before_script:
27+
- echo `whereis zip`
28+
- echo `whereis unzip`
29+
env:
30+
global:
31+
- JRUBY_OPTS="--debug"
32+
- COVERALLS_PARALLEL=true
33+
script:
34+
- bundle exec rubocop
35+
- bundle exec rake
36+
notifications:
37+
webhooks: https://coveralls.io/webhook

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# 0.0.1
2+
Initial version

Gemfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# frozen_string_literal: true
2+
3+
source 'https://rubygems.org'
4+
5+
gemspec

Guardfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# frozen_string_literal: true
2+
3+
guard :minitest do
4+
# with Minitest::Unit
5+
watch(%r{^test/(.*)\/?(.*)_test\.rb$})
6+
watch(%r{^lib/zip/bzip2/(.*/)?([^/]+)\.rb$}) { |m| "test/models/zip/bzip2/#{m[1]}#{m[2]}_test.rb" }
7+
watch(%r{^test/test_helper\.rb$}) { 'test' }
8+
end

README.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
# rubyzip-bzip2
2+
3+
[![Gem Version](https://badge.fury.io/rb/rubyzip-bzip2.svg)](http://badge.fury.io/rb/rubyzip-bzip2)
4+
[![Build Status](https://secure.travis-ci.org/rubyzip/rubyzip-bzip2.svg)](http://travis-ci.org/rubyzip/rubyzip-bzip2)
5+
[![Code Climate](https://codeclimate.com/github/rubyzip/rubyzip-bzip2.svg)](https://codeclimate.com/github/rubyzip/rubyzip-bzip2)
6+
[![Coverage Status](https://img.shields.io/coveralls/rubyzip/rubyzip-bzip2.svg)](https://coveralls.io/r/rubyzip/rubyzip-bzip2?branch=master)
7+
8+
The rubyzip-bzip2 gem provides an extension of the rubyzip gem for reading zip files
9+
compressed with bzip2 compression.
10+
11+
## Website and Project Home
12+
http://github.com/rubyzip/rubyzip-bzip2
13+
14+
## Requirements
15+
- Ruby 2.4 or greater
16+
17+
## Installation
18+
The rubyzip-bzip2 gem is available on RubyGems:
19+
20+
```
21+
gem install rubyzip-bzip2
22+
```
23+
24+
Or in your Gemfile:
25+
26+
```ruby
27+
gem 'rubyzip-bzip2'
28+
```
29+
30+
## Usage
31+
Reading a zip file with bzip2 compression is not different from reading
32+
any other zip file using rubyzip:
33+
34+
```ruby
35+
Zip::File.open('foo.zip') do |zipfile|
36+
zipfile.each do |entry|
37+
content = zipfile.read(entry.name)
38+
end
39+
end
40+
41+
```
42+
43+
## License
44+
Rubyzip-bzip2 is distributed under the same license as ruby. See
45+
http://www.ruby-lang.org/en/LICENSE.txt
46+
47+
## Contributing
48+
Bug reports and pull requests are welcome on GitHub at https://github.com/rubyzip/rubyzip-bzip2.
49+
50+
## Development
51+
You can run the tests with:
52+
53+
```
54+
bundle install
55+
rake
56+
```
57+
58+
## Authors
59+
Jan-Joost Spanjers ( oss at hiberis.nl )

Rakefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# frozen_string_literal: true
2+
3+
require 'bundler/gem_tasks'
4+
require 'rake/testtask'
5+
6+
Rake::TestTask.new(:test) do |t|
7+
t.libs << 'test'
8+
t.libs << 'lib'
9+
t.test_files = FileList['test/**/*_test.rb']
10+
end
11+
12+
task default: :test

lib/zip/bzip2.rb

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# frozen_string_literal: true
2+
3+
require 'zip'
4+
require 'zip/bzip2/version'
5+
require 'zip/bzip2/decompressor'
6+
7+
module Zip
8+
# The Zip::Bzip2 module extends Rubyzip with support for the bzip2 compression method.
9+
module Bzip2
10+
end
11+
end

0 commit comments

Comments
 (0)