Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package rubygem-mini_mime for openSUSE:Factory checked in at 2021-04-21 21:00:05 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-mini_mime (Old) and /work/SRC/openSUSE:Factory/.rubygem-mini_mime.new.12324 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mini_mime" Wed Apr 21 21:00:05 2021 rev:4 rq:887040 version:1.1.0 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-mini_mime/rubygem-mini_mime.changes 2019-07-16 08:41:41.235030696 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-mini_mime.new.12324/rubygem-mini_mime.changes 2021-04-21 21:00:35.678314296 +0200 @@ -1,0 +2,13 @@ +Tue Apr 20 13:45:08 UTC 2021 - Manuel Schnitzer <[email protected]> + +- updated to version 1.1.0 + + 05-04-2021 + - Version 1.1.0 + - MiniMime.lookup_by_extension is now case insensitive + + 26-03-2021 + - Version 1.0.3 + - Update mime types from upstream + +------------------------------------------------------------------- Old: ---- mini_mime-1.0.2.gem New: ---- mini_mime-1.1.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-mini_mime.spec ++++++ --- /var/tmp/diff_new_pack.ayIWyF/_old 2021-04-21 21:00:36.270315229 +0200 +++ /var/tmp/diff_new_pack.ayIWyF/_new 2021-04-21 21:00:36.274315235 +0200 @@ -1,7 +1,7 @@ # # spec file for package rubygem-mini_mime # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2021 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -24,7 +24,7 @@ # Name: rubygem-mini_mime -Version: 1.0.2 +Version: 1.1.0 Release: 0 %define mod_name mini_mime %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: %{ruby} BuildRequires: ruby-macros >= 5 -Url: https://github.com/discourse/mini_mime +URL: https://github.com/discourse/mini_mime Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: A lightweight mime type lookup toy ++++++ mini_mime-1.0.2.gem -> mini_mime-1.1.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.github/workflows/ci.yml new/.github/workflows/ci.yml --- old/.github/workflows/ci.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.github/workflows/ci.yml 2021-04-05 03:20:26.000000000 +0200 @@ -0,0 +1,40 @@ +name: Mini Mime Tests + +on: + pull_request: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + name: "Ruby ${{ matrix.ruby }} / Failure allowed: ${{ matrix.experimental }}" + continue-on-error: ${{ matrix.experimental }} + strategy: + fail-fast: false + matrix: + ruby: ["2.4", "2.5", "2.6", "2.7"] + experimental: [false] + include: + - ruby: "ruby-head" + experimental: true + - ruby: "truffleruby-head" + experimental: true + - ruby: "jruby-head" + experimental: true + - ruby: "jruby-9.1.17.0" + experimental: true + - ruby: "jruby-9.2.13.0" + experimental: true + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby }} + bundler-cache: true + - name: Rubocop + run: bundle exec rubocop + if: "!contains(matrix.ruby, 'jruby')" + - name: Tests + run: bundle exec rake test diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.github/workflows/db.yml new/.github/workflows/db.yml --- old/.github/workflows/db.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.github/workflows/db.yml 2021-04-05 03:20:26.000000000 +0200 @@ -0,0 +1,26 @@ +name: Update MIME type DB + +on: + schedule: + # 10am on the 1st every month https://crontab.guru/#0_10_1_*_* + - cron: "0 10 1 * *" + workflow_dispatch: + +jobs: + update_db: + runs-on: ubuntu-latest + name: "Update MIME type DB" + steps: + - uses: actions/checkout@v2 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: "2.7" + bundler-cache: true + - name: Update mime-types-data + run: bundle update mime-types-data + - name: Update DB + run: bundle exec rake rebuild_db + - name: Create PR + run: bin/db_pull_request + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.rubocop.yml new/.rubocop.yml --- old/.rubocop.yml 1970-01-01 01:00:00.000000000 +0100 +++ new/.rubocop.yml 2021-04-05 03:20:26.000000000 +0200 @@ -0,0 +1,5 @@ +inherit_gem: + rubocop-discourse: default.yml +inherit_mode: + merge: + - Exclude diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2019-07-08 11:42:04.000000000 +0200 +++ new/.travis.yml 1970-01-01 01:00:00.000000000 +0100 @@ -1,20 +0,0 @@ -language: ruby - -rvm: - - 2.3 - - 2.4 - - 2.5 - - 2.6 - - ruby-head - - jruby - - jruby-9.0.5.0 - - jruby-9.1.6.0 - - jruby-head - -matrix: - allow_failures: - - rvm: ruby-head - - rvm: jruby-9.0.5.0 - - rvm: jruby-9.1.6.0 - - rvm: jruby-head - fast_finish: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG new/CHANGELOG --- old/CHANGELOG 2019-07-08 11:42:04.000000000 +0200 +++ new/CHANGELOG 2021-04-05 03:20:26.000000000 +0200 @@ -1,3 +1,11 @@ +05-04-2021 + - Version 1.1.0 + - MiniMime.lookup_by_extension is now case insensitive + +26-03-2021 + - Version 1.0.3 + - Update mime types from upstream + 08-07-2019 - Version 1.0.2 - Update mime types from upstream diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Gemfile new/Gemfile --- old/Gemfile 2019-07-08 11:42:04.000000000 +0200 +++ new/Gemfile 2021-04-05 03:20:26.000000000 +0200 @@ -1,3 +1,4 @@ +# frozen_string_literal: true source 'https://rubygems.org' # Specify your gem's dependencies in mini_mime.gemspec diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2019-07-08 11:42:04.000000000 +0200 +++ new/README.md 2021-04-05 03:20:26.000000000 +0200 @@ -26,6 +26,9 @@ MiniMime.lookup_by_filename("a.txt").content_type # => "text/plain" +MiniMime.lookup_by_extension("txt").content_type +# => "text/plain" + MiniMime.lookup_by_content_type("text/plain").extension # => "txt" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/Rakefile new/Rakefile --- old/Rakefile 2019-07-08 11:42:04.000000000 +0200 +++ new/Rakefile 2021-04-05 03:20:26.000000000 +0200 @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "bundler/gem_tasks" require "rake/testtask" @@ -7,7 +8,7 @@ t.test_files = FileList['test/**/*_test.rb'] end -task :default => :test +task default: :test def pad(array) max = [] @@ -36,11 +37,11 @@ index = {} MIME::Types.each do |type| - type.extensions.each {|ext| (index[ext.downcase] ||= []) << type} + type.extensions.each { |ext| (index[ext.downcase] ||= []) << type } end - index.each do |k,list| - list.sort!{|a,b| a.priority_compare(b)} + index.each do |k, list| + list.sort! { |a, b| a.priority_compare(b) } end buffer = [] @@ -54,9 +55,9 @@ pad(buffer) - buffer.sort!{|a,b| a[0] <=> b[0]} + buffer.sort! { |a, b| a[0] <=> b[0] } - File.open("lib/db/ext_mime.db", File::CREAT|File::TRUNC|File::RDWR) do |f| + File.open("lib/db/ext_mime.db", File::CREAT | File::TRUNC | File::RDWR) do |f| buffer.each do |row| f.write "#{row[0]} #{row[1]} #{row[2]}\n" end @@ -64,7 +65,7 @@ puts "#{buffer.count} rows written to lib/db/ext_mime.db" - buffer.sort!{|a,b| [a[1], a[0]] <=> [b[1], b[0]]} + buffer.sort! { |a, b| [a[1], a[0]] <=> [b[1], b[0]] } # strip cause we are going to re-pad buffer.each do |row| @@ -80,7 +81,7 @@ pad(buffer) - File.open("lib/db/content_type_mime.db", File::CREAT|File::TRUNC|File::RDWR) do |f| + File.open("lib/db/content_type_mime.db", File::CREAT | File::TRUNC | File::RDWR) do |f| last = nil count = 0 buffer.each do |row| diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bench/bench.rb new/bench/bench.rb --- old/bench/bench.rb 2019-07-08 11:42:04.000000000 +0200 +++ new/bench/bench.rb 2021-04-05 03:20:26.000000000 +0200 @@ -1,9 +1,9 @@ +# frozen_string_literal: true require 'memory_profiler' require 'benchmark/ips' $: << File.expand_path('../../lib', __FILE__) - puts puts "Memory stats for requiring mime/types/columnar" result = MemoryProfiler.report do @@ -22,7 +22,6 @@ puts "Total allocated: #{result.total_allocated_memsize} bytes (#{result.total_allocated} objects)" puts "Total retained: #{result.total_retained_memsize} bytes (#{result.total_retained} objects)" - Benchmark.ips do |bm| bm.report 'cached content_type lookup MiniMime' do MiniMime.lookup_by_filename("a.txt").content_type diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bin/console new/bin/console --- old/bin/console 2019-07-08 11:42:04.000000000 +0200 +++ new/bin/console 2021-04-05 03:20:26.000000000 +0200 @@ -1,4 +1,5 @@ #!/usr/bin/env ruby +# frozen_string_literal: true require "bundler/setup" require "mini_mime" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bin/db_pull_request new/bin/db_pull_request --- old/bin/db_pull_request 1970-01-01 01:00:00.000000000 +0100 +++ new/bin/db_pull_request 2021-04-05 03:20:26.000000000 +0200 @@ -0,0 +1,20 @@ +#!/usr/bin/env ruby +# frozen_string_literal: true + +require "time" + +if `git status --porcelain lib/db`.empty? + puts "Skipping, no DB changes to commit..." + return +end + +moment = Time.now.utc +branch_name = "db-updates-#{moment.strftime("%Y%m%d%H%M%S")}" + +system("git", "checkout", "-b", branch_name) || abort("Unable to create branch") +system("git", "add", "lib/db") +system("git", "config", "--local", "user.email", "[email protected]") +system("git", "config", "--local", "user.name", "github-actions") +system("git", "commit", "-m", "DB updates #{moment.iso8601}") || abort("Unable to commit changes") +system("git", "push", "-u", "origin", branch_name) || abort("Unable to push branch") +system("gh", "pr", "create", "--title", "DB updates #{moment.iso8601}", "--body", "From Github Actions") || abort("Unable to create PR") Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/db/content_type_mime.db new/lib/db/content_type_mime.db --- old/lib/db/content_type_mime.db 2019-07-08 11:42:04.000000000 +0200 +++ new/lib/db/content_type_mime.db 2021-04-05 03:20:26.000000000 +0200 @@ -71,7 +71,7 @@ pkipath application/pkix-pkipath base64 pki application/pkixcmp base64 pls application/pls+xml base64 -ai application/postscript 8bit +eps application/postscript 8bit cw application/prs.cww base64 rnd application/prs.nprend base64 pskcxml application/pskc+xml base64 @@ -561,6 +561,7 @@ mie application/x-mie base64 mobi application/x-mobipocket-ebook base64 application application/x-ms-application base64 +exe application/x-ms-dos-executable base64 lnk application/x-ms-shortcut base64 wmd application/x-ms-wmd base64 wmz application/x-ms-wmz base64 @@ -595,6 +596,7 @@ shar application/x-shar 8bit swf application/x-shockwave-flash base64 xap application/x-silverlight-app base64 +notebook application/x-smarttech-notebook base64 sav application/x-spss base64 sql application/x-sql base64 sit application/x-stuffit base64 @@ -664,6 +666,7 @@ qcp audio/vnd.qcelp base64 rip audio/vnd.rip base64 smp3 audio/vnd.sealedmedia.softseal.mpeg base64 +wav audio/wav base64 weba audio/webm base64 aac audio/x-aac base64 aif audio/x-aiff base64 @@ -676,7 +679,6 @@ wmv audio/x-ms-wmv base64 ra audio/x-pn-realaudio base64 rmp audio/x-pn-realaudio-plugin base64 -wav audio/x-wav base64 xm audio/xm base64 cdx chemical/x-cdx base64 cif chemical/x-cif base64 @@ -688,9 +690,14 @@ ttf font/ttf base64 woff font/woff base64 woff2 font/woff2 base64 +avif image/avif base64 cgm image/cgm base64 g3 image/g3fax base64 gif image/gif base64 +heic image/heic base64 +heics image/heic-sequence base64 +heif image/heif base64 +heifs image/heif-sequence base64 ief image/ief base64 jp2 image/jp2 base64 jpeg image/jpeg base64 @@ -722,21 +729,37 @@ xif image/vnd.xiff base64 webp image/webp base64 3ds image/x-3ds base64 +dng image/x-adobe-dng base64 bmp image/x-bmp base64 +cr2 image/x-canon-cr2 base64 +crw image/x-canon-crw base64 ras image/x-cmu-raster base64 cmx image/x-cmx base64 xcfbz2 image/x-compressed-xcf base64 +erf image/x-epson-erf base64 fh image/x-freehand base64 +raf image/x-fuji-raf base64 3fr image/x-hasselblad-3fr base64 +k25 image/x-kodak-k25 base64 +kdc image/x-kodak-kdc base64 +mrw image/x-minolta-mrw base64 sid image/x-mrsid-image base64 +nef image/x-nikon-nef base64 +orf image/x-olympus-orf base64 psp image/x-paintshoppro base64 +raw image/x-panasonic-raw base64 pcx image/x-pcx base64 +pef image/x-pentax-pef base64 pct image/x-pict base64 pnm image/x-portable-anymap base64 pbm image/x-portable-bitmap base64 pgm image/x-portable-graymap base64 ppm image/x-portable-pixmap base64 rgb image/x-rgb base64 +x3f image/x-sigma-x3f base64 +arw image/x-sony-arw base64 +sr2 image/x-sony-sr2 base64 +srf image/x-sony-srf base64 tga image/x-targa base64 dgn image/x-vnd.dgn base64 xbm image/x-xbitmap 7bit diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/db/ext_mime.db new/lib/db/ext_mime.db --- old/lib/db/ext_mime.db 2019-07-08 11:42:04.000000000 +0200 +++ new/lib/db/ext_mime.db 2021-04-05 03:20:26.000000000 +0200 @@ -24,7 +24,7 @@ afm application/x-font-type1 base64 afp application/vnd.ibm.modcap base64 ahead application/vnd.ahead.space base64 -ai application/postscript 8bit +ai application/pdf base64 aif audio/x-aiff base64 aifc audio/x-aiff base64 aiff audio/x-aiff base64 @@ -38,6 +38,7 @@ application application/x-ms-application base64 apr application/vnd.lotus-approach base64 arc application/x-freearc base64 +arw image/x-sony-arw base64 asc application/pgp-signature base64 asf application/vnd.ms-asf base64 asm text/x-asm quoted-printable @@ -50,6 +51,7 @@ atx application/vnd.antix.game-component base64 au audio/basic base64 avi video/x-msvideo base64 +avif image/avif base64 aw application/applixware base64 awb audio/AMR-WB base64 azf application/vnd.airzip.filesecure.azf base64 @@ -142,9 +144,11 @@ cpio application/x-cpio base64 cpp text/plain quoted-printable cpt application/x-mac-compactpro base64 +cr2 image/x-canon-cr2 base64 crd application/x-mscardfile base64 crl application/pkix-crl base64 crt application/x-x509-ca-cert base64 +crw image/x-canon-crw base64 crx application/x-chrome-extension base64 cryptonote application/vnd.rig.cryptonote base64 csh application/x-csh 8bit @@ -192,6 +196,7 @@ dmp application/vnd.tcpdump.pcap base64 dms application/octet-stream base64 dna application/vnd.dna base64 +dng image/x-adobe-dng base64 doc application/msword base64 docm application/vnd.ms-word.document.macroEnabled.12 base64 docx application/vnd.openxmlformats-officedocument.wordprocessingml.document base64 @@ -237,6 +242,7 @@ eot application/vnd.ms-fontobject base64 eps application/postscript 8bit epub application/epub+zip base64 +erf image/x-epson-erf base64 es application/ecmascript base64 es3 application/vnd.eszigno3+xml base64 esa application/vnd.osgi.subsystem base64 @@ -246,7 +252,7 @@ eva application/x-eva base64 evc audio/EVRC base64 evy application/x-envoy base64 -exe application/octet-stream base64 +exe application/x-ms-dos-executable base64 exi application/exi base64 ext application/vnd.novadigm.EXT base64 ez application/andrew-inset base64 @@ -340,8 +346,13 @@ hbc application/vnd.hbci base64 hbci application/vnd.hbci base64 hdf application/x-hdf base64 +heic image/heic base64 +heics image/heic-sequence base64 +heif image/heif base64 +heifs image/heif-sequence base64 hep application/x-hep base64 hh text/plain quoted-printable +hif image/heic base64 hlp text/plain quoted-printable hpgl application/vnd.hp-HPGL base64 hpid application/vnd.hp-hpid base64 @@ -414,9 +425,11 @@ js application/javascript 8bit json application/json 8bit jsonml application/jsonml+json base64 +k25 image/x-kodak-k25 base64 kar audio/midi base64 karbon application/vnd.kde.karbon base64 kcm application/vnd.nervana base64 +kdc image/x-kodak-kdc base64 key application/x-iwork-keynote-sffkey base64 kfo application/vnd.kde.kformula base64 kia application/vnd.kidspiration base64 @@ -550,6 +563,7 @@ mqy application/vnd.Mobius.MQY base64 mrc application/marc base64 mrcx application/marcxml+xml base64 +mrw image/x-minolta-mrw base64 ms text/troff 8bit mscml application/mediaservercontrol+xml base64 mseed application/vnd.fdsn.mseed base64 @@ -577,6 +591,7 @@ nbp application/vnd.wolfram.player base64 nc application/netcdf base64 ncx application/x-dtbncx+xml base64 +nef image/x-nikon-nef base64 nfo text/x-nfo quoted-printable ngdat application/vnd.nokia.n-gage.data base64 nim video/vnd.nokia.interleaved-multimedia base64 @@ -586,6 +601,7 @@ nnd application/vnd.noblenet-directory base64 nns application/vnd.noblenet-sealer base64 nnw application/vnd.noblenet-web base64 +notebook application/x-smarttech-notebook base64 npx image/vnd.net-fpx base64 nsc application/x-conference base64 nsf application/vnd.lotus-notes base64 @@ -621,6 +637,8 @@ opf application/oebps-package+xml base64 opml text/x-opml quoted-printable oprc application/vnd.palm base64 +opus audio/ogg base64 +orf image/x-olympus-orf base64 org application/vnd.lotus-organizer base64 osf application/vnd.yamaha.openscoreformat base64 osfpvg application/vnd.yamaha.openscoreformat.osfpvg+xml base64 @@ -658,6 +676,7 @@ pcx image/x-pcx base64 pdb application/vnd.palm base64 pdf application/pdf base64 +pef image/x-pentax-pef base64 pfa application/x-font-type1 base64 pfb application/x-font-type1 base64 pfm application/x-font-type1 base64 @@ -736,9 +755,11 @@ qxl application/vnd.Quark.QuarkXPress 8bit qxt application/vnd.Quark.QuarkXPress 8bit ra audio/x-pn-realaudio base64 +raf image/x-fuji-raf base64 ram audio/x-pn-realaudio base64 rar application/x-rar-compressed base64 ras image/x-cmu-raster base64 +raw image/x-panasonic-raw base64 rb application/x-ruby 8bit rbw application/x-ruby 8bit rcprofile application/vnd.ipunplugged.rcprofile base64 @@ -883,7 +904,9 @@ sps application/x-spss base64 spx audio/ogg base64 sql application/x-sql base64 +sr2 image/x-sony-sr2 base64 src application/x-wais-source base64 +srf image/x-sony-srf base64 srt application/x-subrip base64 sru application/sru+xml base64 srx application/sparql-results+xml base64 @@ -1037,7 +1060,7 @@ w3d application/x-director base64 wad application/x-doom base64 wasm application/wasm 8bit -wav audio/x-wav base64 +wav audio/wav base64 wax audio/x-ms-wax base64 wbmp image/vnd.wap.wbmp base64 wbs application/vnd.criticaltools.wbs+xml base64 @@ -1091,6 +1114,7 @@ x3dv model/x3d+vrml base64 x3dvz model/x3d+vrml base64 x3dz model/x3d+xml base64 +x3f image/x-sigma-x3f base64 x_b model/vnd.parasolid.transmit.binary base64 x_t model/vnd.parasolid.transmit.text quoted-printable xaml application/xaml+xml base64 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mini_mime/version.rb new/lib/mini_mime/version.rb --- old/lib/mini_mime/version.rb 2019-07-08 11:42:04.000000000 +0200 +++ new/lib/mini_mime/version.rb 2021-04-05 03:20:26.000000000 +0200 @@ -1,3 +1,4 @@ +# frozen_string_literal: true module MiniMime - VERSION = "1.0.2" + VERSION = "1.1.0" end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mini_mime.rb new/lib/mini_mime.rb --- old/lib/mini_mime.rb 2019-07-08 11:42:04.000000000 +0200 +++ new/lib/mini_mime.rb 2021-04-05 03:20:26.000000000 +0200 @@ -1,3 +1,4 @@ +# frozen_string_literal: true require "mini_mime/version" require "thread" @@ -55,14 +56,14 @@ extension = File.extname(filename) return if extension.empty? extension = extension[1..-1] - extension.downcase! lookup_by_extension(extension) end def self.lookup_by_extension(extension) LOCK.synchronize do @db ||= new - @db.lookup_by_extension(extension) + @db.lookup_by_extension(extension) || + @db.lookup_by_extension(extension.downcase) end end @@ -129,7 +130,7 @@ result = nil while from <= to do - midpoint = from + (to-from).div(2) + midpoint = from + (to - from).div(2) current = resolve(midpoint) data = current[@sort_order] if data > val @@ -145,7 +146,7 @@ end def resolve(row) - @file.seek(row*@row_length) + @file.seek(row * @row_length) Info.new(@file.readline) end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2019-07-08 11:42:04.000000000 +0200 +++ new/metadata 2021-04-05 03:20:26.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: mini_mime version: !ruby/object:Gem::Version - version: 1.0.2 + version: 1.1.0 platform: ruby authors: - Sam Saffron -autorequire: +autorequire: bindir: exe cert_chain: [] -date: 2019-07-08 00:00:00.000000000 Z +date: 2021-04-05 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: bundler @@ -52,6 +52,34 @@ - - "~>" - !ruby/object:Gem::Version version: '5.0' +- !ruby/object:Gem::Dependency + name: rubocop + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' +- !ruby/object:Gem::Dependency + name: rubocop-discourse + requirement: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' + type: :development + prerelease: false + version_requirements: !ruby/object:Gem::Requirement + requirements: + - - ">=" + - !ruby/object:Gem::Version + version: '0' description: A lightweight mime type lookup toy email: - [email protected] @@ -59,8 +87,10 @@ extensions: [] extra_rdoc_files: [] files: +- ".github/workflows/ci.yml" +- ".github/workflows/db.yml" - ".gitignore" -- ".travis.yml" +- ".rubocop.yml" - CHANGELOG - CODE_OF_CONDUCT.md - Gemfile @@ -69,6 +99,7 @@ - Rakefile - bench/bench.rb - bin/console +- bin/db_pull_request - bin/setup - lib/db/content_type_mime.db - lib/db/ext_mime.db @@ -79,7 +110,7 @@ licenses: - MIT metadata: {} -post_install_message: +post_install_message: rdoc_options: [] require_paths: - lib @@ -94,8 +125,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubygems_version: 3.0.1 -signing_key: +rubygems_version: 3.2.2 +signing_key: specification_version: 4 summary: A lightweight mime type lookup toy test_files: [] diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mini_mime.gemspec new/mini_mime.gemspec --- old/mini_mime.gemspec 2019-07-08 11:42:04.000000000 +0200 +++ new/mini_mime.gemspec 2021-04-05 03:20:26.000000000 +0200 @@ -25,4 +25,6 @@ spec.add_development_dependency "bundler", ">= 1.13" spec.add_development_dependency "rake", "~> 10.0" spec.add_development_dependency "minitest", "~> 5.0" + spec.add_development_dependency "rubocop" + spec.add_development_dependency "rubocop-discourse" end
