mini_mime 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 29fa488976dc79f0fb56e06c67ba6bf35bafb827
4
- data.tar.gz: 1eeb58e612b54db1e0afd64c6482fbf907ad53fe
3
+ metadata.gz: 1a46bf265494380ebc5d3bc4918b999e8e1b635a
4
+ data.tar.gz: ead5c22a9b72e8cc4f8afdb22563427d5211ed80
5
5
  SHA512:
6
- metadata.gz: 1536aebde61795c374f7734347fcc0f41c9772c2cf2994006c0af7f5e4836f587fe61101c27e3658e7a8a5577ec099e819fe70cf1a223c8691b838c5ba88e41f
7
- data.tar.gz: 3776428c96d2584faeb2a811628269a41f9e4ab0818f9a156a58b48a5c51ee0ad59e1d1ad7f0b313d26473dab5de92ccab890ab1ecac3b9118931903df383f8c
6
+ metadata.gz: 603449f958807de86bc2097ab82afe78a0e67f237e0fac9fd73fec9abee13550c0f3a4dcd18518ddce48bc228a0030a57e07f537196949bbe9d2681a63d5eb23
7
+ data.tar.gz: d617bc1422d36bde0dab45e44eb5823d2ba003260e3c1bb8f1e606bde22d533ad25b6ee7b778f9c2fd14945dc7a9092a0bec79c172bfe070a2a18c486763ee99
@@ -1,5 +1,29 @@
1
- sudo: false
2
1
  language: ruby
3
- rvm:
4
- - 2.3.2
2
+ sudo: false
3
+ cache: bundler
4
+
5
5
  before_install: gem install bundler -v 1.13.6
6
+
7
+ rvm:
8
+ - 1.8.7
9
+ - 1.9.2
10
+ - 1.9.3
11
+ - 2.0.0
12
+ - 2.1.10
13
+ - 2.2.6
14
+ - 2.3.3
15
+ - ruby-head
16
+ - jruby
17
+ - jruby-9.0.5.0
18
+ - jruby-9.1.6.0
19
+ - jruby-head
20
+ - rbx-2
21
+
22
+ matrix:
23
+ allow_failures:
24
+ - rvm: ruby-head
25
+ - rvm: jruby-9.0.5.0
26
+ - rvm: jruby-9.1.6.0
27
+ - rvm: jruby-head
28
+ - rvm: rbx-2
29
+ fast_finish: true
data/CHANGELOG CHANGED
@@ -1,3 +1,8 @@
1
+ 14-12-2016
2
+
3
+ - Version 0.1.2
4
+ - Backwards compat with ancient Ruby to match mail gem
5
+
1
6
  14-12-2016
2
7
 
3
8
  - Version 0.1.1
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in mini_mime.gemspec
4
4
  gemspec
5
+
6
+ gem "mime-types", "~> 3" if RUBY_VERSION > '2'
data/README.md CHANGED
@@ -36,7 +36,7 @@ MiniMime.lookup_by_content_type("text/plain").binary?
36
36
 
37
37
  ## Performance
38
38
 
39
- 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]
39
+ 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)
40
40
 
41
41
  ```
42
42
  Memory stats for requiring mime/types/columnar
@@ -73,7 +73,7 @@ As a general guideline, cached lookups are 2x faster than MIME::Types equivelent
73
73
 
74
74
  ## Development
75
75
 
76
- 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.
76
+ 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.
77
77
 
78
78
  To update the database run:
79
79
 
@@ -89,7 +89,7 @@ module MiniMime
89
89
  @file = File.open(@path)
90
90
 
91
91
  @row_length = @file.readline.length
92
- @file_length = @file.size
92
+ @file_length = File.size(@path)
93
93
  @rows = @file_length / @row_length
94
94
 
95
95
  @hit_cache = Cache.new(MAX_CACHED)
@@ -1,3 +1,3 @@
1
1
  module MiniMime
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
@@ -25,5 +25,4 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency "bundler", "~> 1.13"
26
26
  spec.add_development_dependency "rake", "~> 10.0"
27
27
  spec.add_development_dependency "minitest", "~> 5.0"
28
- spec.add_development_dependency "mime-types", "~> 3"
29
28
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mini_mime
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
@@ -52,20 +52,6 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '5.0'
55
- - !ruby/object:Gem::Dependency
56
- name: mime-types
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: '3'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: '3'
69
55
  description: A lightweight mime type lookup toy
70
56
  email:
71
57
  - sam.saffron@gmail.com