summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
| * mime-types 3.0Austin Ziegler2015-11-2170-50166/+1574
|/ | | | | | | | | | | | | | | - Require Ruby 2.0 or later. Resolves #97. - Remove deprecated methods. - Update known registries when a MIME type extension changes. Resolves #84. - Relicensed mime-types 3.0 as MIT only. Resolves #95. - Extracted data from this gem to mime-types-data; removed deprecated data. - Rewrote tests to better understand what is being tested—some of the tests were almost ten years old and didn’t make a lot of sense with this version. I have switched to minitest/spec with assertions. - Columnar data is now the default registry store. Because JSON is not required by default, this change resolves #85. - MIME::Types containers are now implemented with Set instead of Array to prevent data duplication. Resolves #79.
* Really protect against Ruby 2.0 gemsAustin Ziegler2015-11-112-8/+14
|
* Fix coverage report for Ruby 2.0 or higherAustin Ziegler2015-11-102-23/+28
|
* Add a code of conductAustin Ziegler2015-11-103-0/+51
|
* Change to fivemat outputAustin Ziegler2015-11-103-2/+11
|
* Finalizing for release of 2.6.2.v2.6.2Austin Ziegler2015-09-135-21/+43
|
* Updated MIME type definitions for 2.6.2.Austin Ziegler2015-09-1317-40/+464
|
* IANA parser: Do not include xref data when missingAustin Ziegler2015-09-131-0/+2
|
* Merge pull request #105 from JuanitoFatas/doc/readmeAustin Ziegler2015-09-131-5/+5
|\ | | | | Fix a section link in README.rdoc [ci skip]
| * Correct anchor for rdoc [ci skip]Juanito Fatas2015-05-281-1/+1
| |
| * Fix a section link in README.rdoc [ci skip]Juanito Fatas2015-05-271-5/+5
| |
* | Merge pull request #109 from mattbeedle/fix-typoAustin Ziegler2015-09-021-1/+1
|\ \ | | | | | | Fix typo in MIME::Type::Columnar
| * | Fix typo in MIME::Type::Columnarmattbeedle2015-09-011-1/+1
|/ /
* | Merge pull request #108 from losadaem/107-each-with-objectAustin Ziegler2015-08-241-1/+1
|\ \ | |/ |/| 'each_with_object' passes the given object as last argument.
| * 'each_with_object' passes the given object as last argument.losadaem2015-08-241-1/+1
|/ | | | Fixes #107.
* Final 2.6.1 release activity.v2.6.1Austin Ziegler2015-05-251-1/+1
|
* Merge pull request #104 from jeremyevans/261Austin Ziegler2015-05-253-2/+8
|\ | | | | Bump version to 2.6.1
| * Bump version to 2.6.1Jeremy Evans2015-05-253-2/+8
|/
* Merge pull request #103 from jeremyevans/fix_columnar_extAustin Ziegler2015-05-251-1/+1
|\ | | | | Record all extensions when using the columnar store
| * Record all extensions when using the columnar storeJeremy Evans2015-05-251-1/+1
| |
* | Merge pull request #102 from jeremyevans/no_circ_reqAustin Ziegler2015-05-251-1/+1
|\ \ | |/ |/| Avoid circular require when you do require 'mime/types/columnar'
| * Avoid circular require when you do require 'mime/types/columnar'Jeremy Evans2015-05-251-1/+1
|/
* Merge pull request #101 from mime-types/2.6-workv2.6Austin Ziegler2015-05-2550-641/+22532
|\ | | | | | | | | | | | | Release 2.6 Fixes #83 (Decrease Memory Usage). Fixes #84 (Requiring mime/types accounts for 2% of all application RAM). Based on and Fixes #96.
| * mime-types 2.6 release ready code.Austin Ziegler2015-05-2542-1463/+1831
| | | | | | | | | | | | | | - Extend documentation. - Add a logger and logger configuration. - Add more tests to Travis. - Update MIME registry.
| * Make column format optional, JSON is default.Austin Ziegler2015-05-2533-2403/+2682
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - For mime-types 2.6, columnar support is opt-in and will not be changed to default until mime-types 3.0. Restore JSON by default with mime/types/columnar for enabling it. - Rename from .txt to .column; fix some of the type errors in conversion caused by previously undetected bad data. - Keep the PATH protocol even though none of the Linux distributions are using it now. - Fix up the conversion method and benchmarking.
| * Deprecations are noisy, now.Austin Ziegler2015-05-251-17/+11
| |
| * Fix duplicate content types and type errors.Austin Ziegler2015-05-255-45/+5
| |
| * Use text-based columnar storageJeremy Evans2015-05-2519-5/+21295
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This changes the default data for mime-types from a JSON file to a set of text files, with one line per mime type, and one file per mime type attribute. This only loads the content_type and extensions for mime-types by default, reducing default memory usage of mime-types from over 22MB to just over 2MB. Additionally, it speeds up requiring from 0.38 seconds to about 0.10 seconds. Even when loading all of the attributes for the mime types, the memory usage of mime-types stays under 11MB, though load time increases to 0.52 seconds. I think that is an acceptable trade off. If the txt files are shipped instead of the json file, there is also a disk space savings of 167KB (392KB instead of 560KB). rake convert:yaml:txt has been added for converting the yaml files to the necessary txt files. In order to get the conversion to work, I had to make convert.rb turn on lazy loading for mime types. This should be completely backwards compatible if a path is given containing the types. The only current backwards compatibility difference is for the "text/directory - DEPRECATED by RFC6350" mime type, which looks to me like an invalid mime type anyway, and probably should be removed. * Pool encoding strings. Use a single string for each encoding. This decreases the number of encoding strings stored by default from 1909 to 4, saving about 700KB of memory by default on 64-bit MRI. * While here, reduce object allocations while loading data from the mime type txt files. * Clear cache file in lazy test. This was causing the test-order dependent bug on JRuby. The clear_cache_file code was taken from the cache test.
* Merge pull request #100 from blanquer/avoid_mime_gem_conflictAustin Ziegler2015-05-233-2/+2
|\ | | | | Avoid conflict with existing `mime` gem
| * Avoid conflict with existing `mime` gemJosep M. Blanquer2015-05-233-2/+2
|/ | | | | * Moved lib/mime.rb away from top-level (otherwise the loading paths would use the file instead of the existing gem’s). * Still apply the compatibility patch on the `MIME` module.
* Merge pull request #99 from stevenmichaelthomas/feature_add-woff2-to-typesAustin Ziegler2015-05-121-0/+1
|\ | | | | Add woff2 to application/font-woff extensions
| * Add woff2 to application/font-woff extensionsSteven Thomas2015-05-121-0/+1
|/
* Fixing a missed conversion in documentation.Austin Ziegler2015-04-261-1/+1
|
* --amendv2.5Austin Ziegler2015-04-251-1/+1
|
* Release mime-types 2.5.Austin Ziegler2015-04-258-115/+180
| | | | | | | | - The home for mime-types has changed. It is no longer https://github.com/halostatue/mime-types, but instead https://github.com/mime-types/ruby-mime-types. - Updated the documentation to point to the new home.
* Convert MIME::Type#use_instead to a single entry.Austin Ziegler2015-04-257-119/+59
| | | | - Fixes #91.
* Updated MIME types from IANA.Austin Ziegler2015-04-258-43/+648
|
* Fix an incomplete IANA registry import change.Austin Ziegler2015-04-251-24/+29
| | | | | | - Handle text-based obsoletions. - Add a new `xref` type, 'notes'. - Remove some workarounds for broken links that are no longer broken.
* Fix a bug with importing Apache Mime Types.Austin Ziegler2015-04-251-0/+4
|
* Ruby 2.2 has a slightly different YAML serialization.Austin Ziegler2015-04-258-2606/+2606
|
* Add an allocations benchmark.Austin Ziegler2015-04-252-32/+59
|
* Improve the manifest & autotest support.Austin Ziegler2015-04-246-21/+48
|
* Making a better hoerc exclusion.Austin Ziegler2015-04-241-1/+19
|
* Clarify MIME::Type stringification documentationAustin Ziegler2015-04-245-35/+33
| | | | | | Fixes #80. Worked out the wording with @kenips.
* Merge pull request #87 from JuanitoFatas/patch/travis-new-build-envAustin Ziegler2015-04-141-0/+1
|\ | | | | Use the new build env on Travis.
| * Use the new build env on Travis.Juanito Fatas2014-12-191-0/+1
| |
* | Merge pull request #90 from eavgerinos/mime/x-ms-bmpAustin Ziegler2015-04-142-1/+10
|\ \ | | | | | | Add support for x-ms-bmp
| * | Add support for x-ms-bmpAggelos Avgerinos2015-02-122-1/+10
| | |
* | | Merge pull request #93 from schneems/schneems/i18n-allocationsAustin Ziegler2015-04-012-8/+42
|\ \ \ | |/ / |/| | Drop tens of thousands of object allocations on require
| * | Drop tens of thousands of object allocations on requireschneems2015-04-012-8/+42
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch utilizes a few techniques to cut down object allocations.and speed up requiring `mime/types` - Use frozen strings and in place string manipulation - Use self modifying operators when possible i.e. gsub! - Avoiding assigning multiple variables using the splat operator (i.e. `a, b = *[1,2]`) as this allocates an extra un-needed array. The call to `self.friendly({})` does nothing, it only serves to set the instance variable. The method call here merges an empty hash with an empty hash we can get rid of it. To benchmark: ``` require 'allocation_tracer' $LOAD_PATH << "/Users/schneems/Documents/projects/mime-types/lib" ObjectSpace::AllocationTracer.trace do require 'mime/types' end puts :TOTAL => ObjectSpace::AllocationTracer.allocated_count_table.values.inject(:+) ``` Run without patch: ``` {:TOTAL=>195692} ``` Run with patch: ``` {:TOTAL=>158240} ```