-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
standard is by now much more widespread than wetransfer_style. The rubocop config of wetransfer_style was a consensus config and has been bikeshedded over a lot, and changing it is unlikely in the future. Using a standard (sic!) format will make the barrier to contribution smaller. We also need to bump to 2.6 for running CI easier. Installing older Rubies is hard, and this is, after all, a "new" gem.
- Loading branch information
Showing
58 changed files
with
1,459 additions
and
1,462 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ jobs: | |
matrix: | ||
ruby: | ||
- '3.3' | ||
- '2.1' | ||
- '2.5' | ||
experimental: [false] | ||
steps: | ||
- name: Checkout | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
ruby_version: 2.7 | ||
ignore: | ||
- 'spec/**/*': | ||
- Lint/ConstantDefinitionInBlock | ||
- Style/GlobalVars |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
source 'https://rubygems.org' | ||
source "https://rubygems.org" | ||
|
||
# Specify your gem's dependencies in zip_kit.gemspec | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,21 @@ | ||
require 'bundler/gem_tasks' | ||
require 'rspec/core/rake_task' | ||
require 'yard' | ||
require 'rubocop/rake_task' | ||
# frozen_string_literal: true | ||
|
||
require "bundler/gem_tasks" | ||
require "rspec/core/rake_task" | ||
require "yard" | ||
require "rubocop/rake_task" | ||
require "standard/rake" | ||
|
||
task :format do | ||
`bundle exec standardrb --fix-unsafely` | ||
`bundle exec magic_frozen_string_literal ./lib` | ||
end | ||
|
||
YARD::Rake::YardocTask.new(:doc) do |t| | ||
# The dash has to be between the two to "divide" the source files and | ||
# miscellaneous documentation files that contain no code | ||
t.files = ['lib/**/*.rb', '-', 'LICENSE.txt', 'IMPLEMENTATION_DETAILS.md'] | ||
t.files = ["lib/**/*.rb", "-", "LICENSE.txt", "IMPLEMENTATION_DETAILS.md"] | ||
end | ||
|
||
RSpec::Core::RakeTask.new(:spec) | ||
RuboCop::RakeTask.new(:rubocop) | ||
task default: [:spec, :rubocop] | ||
task default: [:spec, :standard] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,15 @@ | ||
# frozen_string_literal: true | ||
|
||
require_relative '../lib/zip_kit' | ||
require_relative "../lib/zip_kit" | ||
|
||
# Predict how large a ZIP file is going to be without having access to | ||
# the actual file contents, but using just the filenames (influences the | ||
# file size) and the size of the files | ||
zip_archive_size_in_bytes = ZipKit::SizeEstimator.estimate do |zip| | ||
zip_archive_size_in_bytes = ZipKit::SizeEstimator.estimate { |zip| | ||
# Pretend we are going to make a ZIP file which contains a few | ||
# MP4 files (those do not compress all too well) | ||
zip.add_stored_entry(filename: 'MOV_1234.MP4', size: 898_090) | ||
zip.add_stored_entry(filename: 'MOV_1235.MP4', size: 7_855_126) | ||
end | ||
zip.add_stored_entry(filename: "MOV_1234.MP4", size: 898_090) | ||
zip.add_stored_entry(filename: "MOV_1235.MP4", size: 7_855_126) | ||
} | ||
|
||
puts zip_archive_size_in_bytes #=> 8_753_467 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.