Hello community, here is the log from the commit of package rubygem-mimemagic for openSUSE:Factory checked in at 2020-03-07 21:38:46 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-mimemagic (Old) and /work/SRC/openSUSE:Factory/.rubygem-mimemagic.new.26092 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mimemagic" Sat Mar 7 21:38:46 2020 rev:5 rq:773785 version:0.3.4 Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-mimemagic/rubygem-mimemagic.changes 2019-01-21 10:53:37.315781675 +0100 +++ /work/SRC/openSUSE:Factory/.rubygem-mimemagic.new.26092/rubygem-mimemagic.changes 2020-03-07 21:38:47.616294637 +0100 @@ -1,0 +2,10 @@ +Mon Feb 10 15:06:35 UTC 2020 - Stephan Kulow <co...@suse.com> + +- updated to version 0.3.4 + see installed CHANGELOG.md + + ## 0.3.4 (2020-01-28) + + Added frozen string literal comments + +------------------------------------------------------------------- Old: ---- mimemagic-0.3.3.gem New: ---- mimemagic-0.3.4.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-mimemagic.spec ++++++ --- /var/tmp/diff_new_pack.6bqiIF/_old 2020-03-07 21:38:48.184295020 +0100 +++ /var/tmp/diff_new_pack.6bqiIF/_new 2020-03-07 21:38:48.184295020 +0100 @@ -1,7 +1,7 @@ # # spec file for package rubygem-mimemagic # -# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany. +# Copyright (c) 2020 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -12,7 +12,7 @@ # license that conforms to the Open Source Definition (Version 1.9) # published by the Open Source Initiative. -# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# Please submit bugfixes or comments via https://bugs.opensuse.org/ # @@ -24,7 +24,7 @@ # Name: rubygem-mimemagic -Version: 0.3.3 +Version: 0.3.4 Release: 0 %define mod_name mimemagic %define mod_full_name %{mod_name}-%{version} @@ -32,7 +32,7 @@ BuildRequires: %{rubygem gem2rpm} BuildRequires: %{ruby} BuildRequires: ruby-macros >= 5 -Url: https://github.com/minad/mimemagic +URL: https://github.com/minad/mimemagic Source: https://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml Summary: Fast mime detection by extension or content ++++++ mimemagic-0.3.3.gem -> mimemagic-0.3.4.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2018-12-20 09:51:29.000000000 +0100 +++ new/.travis.yml 2020-01-28 01:32:04.000000000 +0100 @@ -11,7 +11,10 @@ - jruby-19mode - rbx-3 before_install: - - gem install bundler # the default bundler version on travis is very old and causes 1.9.3 build issues + # 1. The pre-installed Bundler version on Travis is very old; causes 1.9.3 build issues + # 2. Bundler 2.0 is not supported by the whole matrix + - gem install bundler -v'< 2' matrix: allow_failures: - rvm: ruby-head + - rvm: rbx-3 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/CHANGELOG.md new/CHANGELOG.md --- old/CHANGELOG.md 2018-12-20 09:51:29.000000000 +0100 +++ new/CHANGELOG.md 2020-01-28 01:32:04.000000000 +0100 @@ -14,6 +14,10 @@ None +## 0.3.4 (2020-01-28) + +Added frozen string literal comments + ## 0.3.3 (2018-12-20) Upgrade to shared-mime-info-1.10 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2018-12-20 09:51:29.000000000 +0100 +++ new/README.md 2020-01-28 01:32:04.000000000 +0100 @@ -3,27 +3,31 @@ [![Gem Version](https://img.shields.io/gem/v/mimemagic.svg)](http://rubygems.org/gems/mimemagic) [![Gem Downloads](https://img.shields.io/gem/dt/mimemagic.svg)](http://rubygems.org/gems/mimemagic) -[![Build Status](https://secure.travis-ci.org/minad/mimemagic.png?branch=master)](http://travis-ci.org/minad/mimemagic) [![Code Climate](https://codeclimate.com/github/minad/mimemagic.png)](https://codeclimate.com/github/minad/mimemagic) +[![Build Status](https://secure.travis-ci.org/minad/mimemagic.svg?branch=master)](http://travis-ci.org/minad/mimemagic) [![Code Climate](https://codeclimate.com/github/minad/mimemagic.svg)](https://codeclimate.com/github/minad/mimemagic) [![Flattr this git repo](http://api.flattr.com/button/flattr-badge-large.png)](https://flattr.com/submit/auto?user_id=min4d&url=https://github.com/minad/mimemagic&title=MimeMagic&language=&tags=github&category=software) Usage ===== - require 'mimemagic' - MimeMagic.by_extension('html').text? - MimeMagic.by_extension('.html').child_of? 'text/plain' - MimeMagic.by_path('filename.txt') - MimeMagic.by_magic(File.open('test.html')) - # etc... +```ruby +require 'mimemagic' +MimeMagic.by_extension('html').text? +MimeMagic.by_extension('.html').child_of? 'text/plain' +MimeMagic.by_path('filename.txt') +MimeMagic.by_magic(File.open('test.html')) +# etc... +``` Extra magic overlay ===== Microsoft Office 2007+ formats (xlsx, docx, and pptx) are not supported by the mime database at freedesktop.org. These files are all zipped collections of xml files and will be detected as "application/zip". Mimemagic comes with extra magic you can overlay on top of the defaults to correctly detect these file types. Enable it like this: - require 'mimemagic' - require 'mimemagic/overlay' - MimeMagic.by_magic(File.open('test.xlsx')) +```ruby +require 'mimemagic' +require 'mimemagic/overlay' +MimeMagic.by_magic(File.open('test.xlsx')) +``` You can add your own magic with `MimeMagic.add`. See `lib/mimemagic/overlay.rb`. Binary files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mimemagic/overlay.rb new/lib/mimemagic/overlay.rb --- old/lib/mimemagic/overlay.rb 2018-12-20 09:51:29.000000000 +0100 +++ new/lib/mimemagic/overlay.rb 2020-01-28 01:32:04.000000000 +0100 @@ -1,7 +1,8 @@ +# frozen_string_literal: true # Extra magic -[['application/vnd.openxmlformats-officedocument.presentationml.presentation', [[0, "PK\003\004", [[30, '[Content_Types].xml', [[0..5000, 'ppt/']]]]]]], - ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', [[0, "PK\003\004", [[30, '[Content_Types].xml', [[0..5000, 'xl/']]]]]]], - ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', [[0, "PK\003\004", [[30, '[Content_Types].xml', [[0..5000, 'word/']]]]]]]].each do |magic| +[['application/vnd.openxmlformats-officedocument.presentationml.presentation', [[0, "PK\003\004", [[0..5000, '[Content_Types].xml', [[0..5000, 'ppt/']]]]]]], + ['application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', [[0, "PK\003\004", [[0..5000, '[Content_Types].xml', [[0..5000, 'xl/']]]]]]], + ['application/vnd.openxmlformats-officedocument.wordprocessingml.document', [[0, "PK\003\004", [[0..5000, '[Content_Types].xml', [[0..5000, 'word/']]]]]]]].each do |magic| MimeMagic.add(magic[0], magic: magic[1]) end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mimemagic/tables.rb new/lib/mimemagic/tables.rb --- old/lib/mimemagic/tables.rb 2018-12-20 09:51:29.000000000 +0100 +++ new/lib/mimemagic/tables.rb 2020-01-28 01:32:04.000000000 +0100 @@ -1,4 +1,5 @@ # -*- coding: binary -*- +# frozen_string_literal: true # Generated from freedesktop.org.xml class MimeMagic # @private diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/mimemagic/version.rb new/lib/mimemagic/version.rb --- old/lib/mimemagic/version.rb 2018-12-20 09:51:29.000000000 +0100 +++ new/lib/mimemagic/version.rb 2020-01-28 01:32:04.000000000 +0100 @@ -1,5 +1,5 @@ class MimeMagic # MimeMagic version string # @api public - VERSION = '0.3.3' + VERSION = '0.3.4' end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2018-12-20 09:51:29.000000000 +0100 +++ new/metadata 2020-01-28 01:32:04.000000000 +0100 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: mimemagic version: !ruby/object:Gem::Version - version: 0.3.3 + version: 0.3.4 platform: ruby authors: - Daniel Mendler autorequire: bindir: bin cert_chain: [] -date: 2018-12-20 00:00:00.000000000 Z +date: 2020-01-28 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: minitest @@ -62,7 +62,9 @@ - script/freedesktop.org.xml - script/generate-mime.rb - test/files/application.gzip -- test/files/application.vnd.openxmlformats-officedocument.spreadsheetml.sheet +- test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{gdocs}.sheet +- test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{msoffice}.sheet +- test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{rubyxl}.sheet - test/files/application.x-bzip - test/files/application.x-ruby - test/files/application.x-tar @@ -73,7 +75,10 @@ homepage: https://github.com/minad/mimemagic licenses: - MIT -metadata: {} +metadata: + changelog_uri: https://github.com/minad/mimemagic/blob/master/CHANGELOG.md + source_code_uri: https://github.com/minad/mimemagic + bug_tracker_uri: https://github.com/minad/mimemagic/issues post_install_message: rdoc_options: [] require_paths: @@ -89,8 +94,8 @@ - !ruby/object:Gem::Version version: '0' requirements: [] -rubyforge_project: mimemagic -rubygems_version: 2.7.6 +rubyforge_project: +rubygems_version: 2.7.6.2 signing_key: specification_version: 4 summary: Fast mime detection by extension or content diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/mimemagic.gemspec new/mimemagic.gemspec --- old/mimemagic.gemspec 2018-12-20 09:51:29.000000000 +0100 +++ new/mimemagic.gemspec 2020-01-28 01:32:04.000000000 +0100 @@ -13,7 +13,6 @@ s.files = `git ls-files`.split("\n") s.require_paths = %w(lib) - s.rubyforge_project = s.name s.summary = 'Fast mime detection by extension or content' s.description = 'Fast mime detection by extension or content in pure ruby (Uses freedesktop.org.xml shared-mime-info database)' s.homepage = 'https://github.com/minad/mimemagic' @@ -21,4 +20,10 @@ s.add_development_dependency('minitest', '~> 5.11') s.add_development_dependency('rake') + + if s.respond_to?(:metadata) + s.metadata['changelog_uri'] = "https://github.com/minad/mimemagic/blob/master/CHANGELOG.md" + s.metadata['source_code_uri'] = "https://github.com/minad/mimemagic" + s.metadata['bug_tracker_uri'] = "https://github.com/minad/mimemagic/issues" + end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/script/generate-mime.rb new/script/generate-mime.rb --- old/script/generate-mime.rb 2018-12-20 09:51:29.000000000 +0100 +++ new/script/generate-mime.rb 2020-01-28 01:32:04.000000000 +0100 @@ -133,6 +133,7 @@ magics = (common_magics.compact + magics).uniq puts "# -*- coding: binary -*-" +puts "# frozen_string_literal: true" puts "# Generated from #{FILE}" puts "class MimeMagic" puts " # @private" Binary files old/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml.sheet and new/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml.sheet differ Binary files old/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{gdocs}.sheet and new/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{gdocs}.sheet differ Binary files old/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{msoffice}.sheet and new/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{msoffice}.sheet differ Binary files old/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{rubyxl}.sheet and new/test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{rubyxl}.sheet differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/test/mimemagic_test.rb new/test/mimemagic_test.rb --- old/test/mimemagic_test.rb 2018-12-20 09:51:29.000000000 +0100 +++ new/test/mimemagic_test.rb 2020-01-28 01:32:04.000000000 +0100 @@ -70,14 +70,17 @@ def test_recognize_xlsx_as_zip_without_magic file = "test/files/application.vnd.openxmlformats-officedocument.spreadsheetml.sheet" - assert_equal "application/zip", MimeMagic.by_magic(File.read(file)).to_s - assert_equal "application/zip", MimeMagic.by_magic(File.open(file, 'rb')).to_s + %w(msoffice rubyxl gdocs).each do |variant| + file = "test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{#{variant}}.sheet" + assert_equal "application/zip", MimeMagic.by_magic(File.read(file)).to_s + assert_equal "application/zip", MimeMagic.by_magic(File.open(file, 'rb')).to_s + end end def test_recognize_by_magic load "mimemagic/overlay.rb" Dir['test/files/*'].each do |file| - mime = file[11..-1].sub('.', '/') + mime = file[11..-1].sub('.', '/').sub(/\{\w+\}/, '') assert_equal mime, MimeMagic.by_magic(File.read(file)).to_s assert_equal mime, MimeMagic.by_magic(File.open(file, 'rb')).to_s end @@ -85,9 +88,11 @@ def test_recognize_all_by_magic load 'mimemagic/overlay.rb' - file = 'test/files/application.vnd.openxmlformats-officedocument.spreadsheetml.sheet' - mimes = %w[application/vnd.openxmlformats-officedocument.spreadsheetml.sheet application/zip] - assert_equal mimes, MimeMagic.all_by_magic(File.read(file)).map(&:type) + %w(msoffice rubyxl gdocs).each do |variant| + file = "test/files/application.vnd.openxmlformats-officedocument.spreadsheetml{#{variant}}.sheet" + mimes = %w[application/vnd.openxmlformats-officedocument.spreadsheetml.sheet application/zip] + assert_equal mimes, MimeMagic.all_by_magic(File.read(file)).map(&:type) + end end def test_have_add