Hello community,
here is the log from the commit of package rubygem-mini_mime for
openSUSE:Factory checked in at 2019-07-16 08:41:41
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/rubygem-mini_mime (Old)
and /work/SRC/openSUSE:Factory/.rubygem-mini_mime.new.1887 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-mini_mime"
Tue Jul 16 08:41:41 2019 rev:3 rq:715395 version:1.0.2
Changes:
--------
--- /work/SRC/openSUSE:Factory/rubygem-mini_mime/rubygem-mini_mime.changes
2018-08-18 00:03:57.471049395 +0200
+++
/work/SRC/openSUSE:Factory/.rubygem-mini_mime.new.1887/rubygem-mini_mime.changes
2019-07-16 08:41:41.235030696 +0200
@@ -1,0 +2,7 @@
+Mon Jul 15 07:20:52 UTC 2019 - Manuel Schnitzer <[email protected]>
+
+- updated to version 1.0.2
+
+ * Update mime types from upstream
+
+-------------------------------------------------------------------
Old:
----
mini_mime-1.0.1.gem
New:
----
mini_mime-1.0.2.gem
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ rubygem-mini_mime.spec ++++++
--- /var/tmp/diff_new_pack.9TZVV3/_old 2019-07-16 08:41:41.955030309 +0200
+++ /var/tmp/diff_new_pack.9TZVV3/_new 2019-07-16 08:41:41.955030309 +0200
@@ -1,7 +1,7 @@
#
# spec file for package rubygem-mini_mime
#
-# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
+# Copyright (c) 2019 SUSE LINUX GmbH, Nuernberg, Germany.
#
# 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-mini_mime
-Version: 1.0.1
+Version: 1.0.2
Release: 0
%define mod_name mini_mime
%define mod_full_name %{mod_name}-%{version}
++++++ mini_mime-1.0.1.gem -> mini_mime-1.0.2.gem ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/.travis.yml new/.travis.yml
--- old/.travis.yml 2018-08-14 07:42:02.000000000 +0200
+++ new/.travis.yml 2019-07-08 11:42:04.000000000 +0200
@@ -1,24 +1,15 @@
language: ruby
-sudo: false
-cache: bundler
-
-before_install: gem install bundler -v 1.13.6
rvm:
- - 1.8.7
- - 1.9.2
- - 1.9.3
- - 2.0.0
- - 2.1.10
- - 2.2.7
- - 2.3.4
- - 2.4.1
+ - 2.3
+ - 2.4
+ - 2.5
+ - 2.6
- ruby-head
- jruby
- jruby-9.0.5.0
- jruby-9.1.6.0
- jruby-head
- - rbx-2
matrix:
allow_failures:
@@ -26,5 +17,4 @@
- rvm: jruby-9.0.5.0
- rvm: jruby-9.1.6.0
- rvm: jruby-head
- - rvm: rbx-2
fast_finish: true
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/CHANGELOG new/CHANGELOG
--- old/CHANGELOG 2018-08-14 07:42:02.000000000 +0200
+++ new/CHANGELOG 2019-07-08 11:42:04.000000000 +0200
@@ -1,3 +1,7 @@
+08-07-2019
+ - Version 1.0.2
+ - Update mime types from upstream
+
14-08-2018
- Version 1.0.1
- Update mime types from upstream
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/Gemfile new/Gemfile
--- old/Gemfile 2018-08-14 07:42:02.000000000 +0200
+++ new/Gemfile 2019-07-08 11:42:04.000000000 +0200
@@ -4,3 +4,5 @@
gemspec
gem "mime-types", "~> 3" if RUBY_VERSION > '2'
+gem "memory_profiler"
+gem "benchmark-ips"
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/README.md new/README.md
--- old/README.md 2018-08-14 07:42:02.000000000 +0200
+++ new/README.md 2019-07-08 11:42:04.000000000 +0200
@@ -34,46 +34,63 @@
```
+## Configuration
+
+If you'd like to add your own mime types, try using custom database files:
+
+```
+MiniMime::Configuration.ext_db_path = "path_to_file_extension_db"
+MiniMime::Configuration.content_type_db_path = "path_to_content_type_db"
+```
+
+Check out the [default databases](lib/db) for proper formatting and structure
hints.
+
## Performance
-MiniMime is optimised to minimize memory usage. It keeps a cache of 100 mime
type lookups (and 100 misses). There are benchmarks in the [bench
directory](https://github.com/discourse/mini_mime/bench/bench.rb)
+MiniMime is optimised to minimize memory usage. It keeps a cache of 100 mime
type lookups (and 100 misses). There are benchmarks in the [bench
directory](https://github.com/discourse/mini_mime/blob/master/bench/bench.rb)
```
Memory stats for requiring mime/types/columnar
-Total allocated: 9869358 bytes (109796 objects)
-Total retained: 3138198 bytes (31165 objects)
+Total allocated: 8712144 bytes (98242 objects)
+Total retained: 3372545 bytes (33599 objects)
Memory stats for requiring mini_mime
-Total allocated: 58898 bytes (398 objects)
-Total retained: 7784 bytes (62 objects)
+Total allocated: 42625 bytes (369 objects)
+Total retained: 8992 bytes (72 objects)
Warming up --------------------------------------
cached content_type lookup MiniMime
- 52.136k i/100ms
+ 85.109k i/100ms
content_type lookup MIME::Types
- 32.701k i/100ms
+ 17.879k i/100ms
Calculating -------------------------------------
cached content_type lookup MiniMime
- 641.305k (± 3.2%) i/s - 3.232M in 5.045630s
+ 1.105M (± 4.1%) i/s - 5.532M in 5.014895s
content_type lookup MIME::Types
- 361.041k (± 1.5%) i/s - 1.831M in 5.073290s
+ 193.528k (± 7.1%) i/s - 965.466k in 5.013925s
Warming up --------------------------------------
uncached content_type lookup MiniMime
- 3.333k i/100ms
+ 1.410k i/100ms
content_type lookup MIME::Types
- 33.177k i/100ms
+ 18.012k i/100ms
Calculating -------------------------------------
uncached content_type lookup MiniMime
- 33.660k (± 1.7%) i/s - 169.983k in 5.051415s
+ 14.689k (± 4.2%) i/s - 73.320k in 5.000779s
content_type lookup MIME::Types
- 364.931k (± 2.8%) i/s - 1.825M in 5.004112s
+ 193.459k (± 6.9%) i/s - 972.648k in 5.050731s
```
-As a general guideline, cached lookups are 2x faster than MIME::Types
equivelent. Uncached lookups are 10x slower.
+As a general guideline, cached lookups are 6x faster than MIME::Types
equivalent. Uncached lookups are 10x slower.
+Note: It was run on macOS 10.14.2, and versions of Ruby and gems are below.
+
+- Ruby 2.6.0
+- mini_mime (1.0.1)
+- mime-types (3.2.2)
+- mime-types-data (3.2018.0812)
## Development
-MiniMime uses the officially maintained list of mime types at
[mime-types-data](https://github.com/mime-types/mime-types-data)repo to build
the internal database.
+MiniMime uses the officially maintained list of mime types at
[mime-types-data](https://github.com/mime-types/mime-types-data) repo to build
the internal database.
To update the database run:
@@ -89,7 +106,6 @@
Bug reports and pull requests are welcome on GitHub at
https://github.com/discourse/mini_mime. This project is intended to be a safe,
welcoming space for collaboration, and contributors are expected to adhere to
the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
-
## License
The gem is available as open source under the terms of the [MIT
License](http://opensource.org/licenses/MIT).
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 2018-08-14 07:42:02.000000000 +0200
+++ new/lib/db/content_type_mime.db 2019-07-08 11:42:04.000000000 +0200
@@ -487,6 +487,7 @@
zir application/vnd.zul
base64
zaz application/vnd.zzazz.deck+xml
base64
vxml application/voicexml+xml
base64
+wasm application/wasm
8bit
wif application/watcherinfo+xml
base64
wgt application/widget
base64
wp5 application/wordperfect5.1
base64
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 2018-08-14 07:42:02.000000000 +0200
+++ new/lib/db/ext_mime.db 2019-07-08 11:42:04.000000000 +0200
@@ -237,6 +237,7 @@
eot application/vnd.ms-fontobject
base64
eps application/postscript
8bit
epub application/epub+zip
base64
+es application/ecmascript
base64
es3 application/vnd.eszigno3+xml
base64
esa application/vnd.osgi.subsystem
base64
esf application/vnd.epson.esf
base64
@@ -410,7 +411,7 @@
jpgv video/JPEG
base64
jpm image/jpm
base64
jpx image/jpx
base64
-js application/ecmascript
base64
+js application/javascript
8bit
json application/json
8bit
jsonml application/jsonml+json
base64
kar audio/midi
base64
@@ -507,7 +508,7 @@
mjp2 video/MJ2
base64
mjpeg video/x-motion-jpeg
base64
mjpg video/x-motion-jpeg
base64
-mjs application/ecmascript
base64
+mjs application/javascript
8bit
mk3d video/x-matroska
base64
mka audio/x-matroska
base64
mkd text/markdown
quoted-printable
@@ -1035,6 +1036,7 @@
vxml application/voicexml+xml
base64
w3d application/x-director
base64
wad application/x-doom
base64
+wasm application/wasm
8bit
wav audio/x-wav
base64
wax audio/x-ms-wax
base64
wbmp image/vnd.wap.wbmp
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 2018-08-14 07:42:02.000000000 +0200
+++ new/lib/mini_mime/version.rb 2019-07-08 11:42:04.000000000 +0200
@@ -1,3 +1,3 @@
module MiniMime
- VERSION = "1.0.1"
+ VERSION = "1.0.2"
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 2018-08-14 07:42:02.000000000 +0200
+++ new/lib/mini_mime.rb 2019-07-08 11:42:04.000000000 +0200
@@ -14,6 +14,16 @@
Db.lookup_by_content_type(mime)
end
+ module Configuration
+ class << self
+ attr_accessor :ext_db_path
+ attr_accessor :content_type_db_path
+ end
+
+ self.ext_db_path = File.expand_path("../db/ext_mime.db", __FILE__)
+ self.content_type_db_path = File.expand_path("../db/content_type_mime.db",
__FILE__)
+ end
+
class Info
BINARY_ENCODINGS = %w(base64 8bit)
@@ -83,8 +93,8 @@
class RandomAccessDb
MAX_CACHED = 100
- def initialize(name, sort_order)
- @path = File.expand_path("../db/#{name}", __FILE__)
+ def initialize(path, sort_order)
+ @path = path
@file = File.open(@path)
@row_length = @file.readline.length
@@ -141,8 +151,8 @@
end
def initialize
- @ext_db = RandomAccessDb.new("ext_mime.db", 0)
- @content_type_db = RandomAccessDb.new("content_type_mime.db", 1)
+ @ext_db = RandomAccessDb.new(Configuration.ext_db_path, 0)
+ @content_type_db =
RandomAccessDb.new(Configuration.content_type_db_path, 1)
end
def lookup_by_extension(extension)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/metadata new/metadata
--- old/metadata 2018-08-14 07:42:02.000000000 +0200
+++ new/metadata 2019-07-08 11:42:04.000000000 +0200
@@ -1,27 +1,27 @@
--- !ruby/object:Gem::Specification
name: mini_mime
version: !ruby/object:Gem::Version
- version: 1.0.1
+ version: 1.0.2
platform: ruby
authors:
- Sam Saffron
autorequire:
bindir: exe
cert_chain: []
-date: 2018-08-14 00:00:00.000000000 Z
+date: 2019-07-08 00:00:00.000000000 Z
dependencies:
- !ruby/object:Gem::Dependency
name: bundler
requirement: !ruby/object:Gem::Requirement
requirements:
- - - "~>"
+ - - ">="
- !ruby/object:Gem::Version
version: '1.13'
type: :development
prerelease: false
version_requirements: !ruby/object:Gem::Requirement
requirements:
- - - "~>"
+ - - ">="
- !ruby/object:Gem::Version
version: '1.13'
- !ruby/object:Gem::Dependency
@@ -94,8 +94,7 @@
- !ruby/object:Gem::Version
version: '0'
requirements: []
-rubyforge_project:
-rubygems_version: 2.7.6
+rubygems_version: 3.0.1
signing_key:
specification_version: 4
summary: A lightweight mime type lookup toy
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn'
'--exclude=.svnignore' old/mini_mime.gemspec new/mini_mime.gemspec
--- old/mini_mime.gemspec 2018-08-14 07:42:02.000000000 +0200
+++ new/mini_mime.gemspec 2019-07-08 11:42:04.000000000 +0200
@@ -22,7 +22,7 @@
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]
- spec.add_development_dependency "bundler", "~> 1.13"
+ spec.add_development_dependency "bundler", ">= 1.13"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency "minitest", "~> 5.0"
end