multi_mime 1.0.1 → 1.1.0

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: 283efbc22a54d1e6c7966a912d6dc10ef5a18bb3
4
- data.tar.gz: 0b56e2dfae1e0811531ac0d65da3850c4328be3e
3
+ metadata.gz: 5ec0a5ecd4328f4de0d1e40a814f7e6c689db537
4
+ data.tar.gz: b2db5aaeb94cd0bd807401ae5d9dfcde7618d91c
5
5
  SHA512:
6
- metadata.gz: 91ffaa1e34ddaee7b6b981e30ed06fbc47c2046415371ff8e60b8e4044cc1d68769780c49a53792d4a6900881bc844a7739d2fcda2891879521f07129e8d4e05
7
- data.tar.gz: a86a627ab130712773aa5949800ed4b9aa4b4233e7362c5bd4fae34c180df652b976fa8ea533d9dd4a5691f86265bc043f11d3c3daea0ddede68a1adb9dcf06f
6
+ metadata.gz: 156c300fe64d39a89705efce2bcefa4b7d9d475d86018dd9460107c0249838c2c81806833d837c027d52e16c36b8dfa0b2cada721afbc4bd733ea08ea56288fa
7
+ data.tar.gz: 6c542553a68a03a6d76381d68f20dd0ec4f0df27041baf4f90c4777fc4c39f938d98fc2e054c95f8946e459dff4b296cb7c64c1b05376722c970f46077a57fbc
@@ -6,6 +6,8 @@ rvm:
6
6
  - ruby
7
7
  - jruby-head
8
8
  - jruby
9
+ - 2.3.0
10
+ - 2.2.0
9
11
  - 2.1.0
10
12
  - 2.0.0
11
13
  - 1.9.3
@@ -19,4 +21,6 @@ matrix:
19
21
  - rvm: jruby
20
22
  - rvm: rbx-2
21
23
  notifications:
22
- email: false
24
+ email: false
25
+ env:
26
+ - CODECLIMATE_REPO_TOKEN=2e219060d1f426aa912dc1de5f8573c45575edd9320befc7e7cad43f63c3a4ec
@@ -0,0 +1,12 @@
1
+ Next Release
2
+ ============
3
+ * Your contribution here.
4
+
5
+ 1.0.1 (31/03/2014)
6
+ ==================
7
+ * [Ensure loading an adaptor is Thread.exclusive](https://github.com/karlfreeman/multi_mime/commit/4c39deeb98f8b6fa86d49c50c6c3eec0c626d22a) - [@karlfreeman](https://github.com/karlfreeman).
8
+ * [Add MultiMime::AdapterError for failing adapter errors](https://github.com/karlfreeman/multi_mime/commit/d72ae4fac711364c5042991aba7f0001b969a528) - [@karlfreeman](https://github.com/karlfreeman).
9
+
10
+ 1.0.0 (03/03/2014)
11
+ ==================
12
+ * Initial public release - [@karlfreeman](https://github.com/karlfreeman).
data/Gemfile CHANGED
@@ -12,4 +12,5 @@ group :test do
12
12
  gem 'fakefs', '~> 0.4.3'
13
13
  gem 'rspec'
14
14
  gem 'timecop'
15
+ gem 'codeclimate-test-reporter'
15
16
  end
data/README.md CHANGED
@@ -9,7 +9,7 @@ eg [MultiJson](https://github.com/intridea/multi_json) for MIME types.
9
9
  ## Installation
10
10
 
11
11
  ```ruby
12
- gem 'multi_mime', '~> 1.0'
12
+ gem 'multi_mime', '~> 1.1'
13
13
  ```
14
14
 
15
15
  ```ruby
@@ -61,6 +61,7 @@ When MultiMime fails to load the specified adapter, it'll throw `MultiMime::Adap
61
61
  [![Gem Version](http://img.shields.io/gem/v/multi_mime.svg)][gem]
62
62
  [![Build Status](http://img.shields.io/travis/karlfreeman/multi_mime.svg)][travis]
63
63
  [![Code Quality](http://img.shields.io/codeclimate/github/karlfreeman/multi_mime.svg)][codeclimate]
64
+ [![Code Coverage](http://img.shields.io/codeclimate/coverage/github/karlfreeman/multi_mime.svg)][codeclimate]
64
65
  [![Gittip](http://img.shields.io/gittip/karlfreeman.svg)][gittip]
65
66
 
66
67
  ## Supported MIME Engines
@@ -75,6 +76,8 @@ When MultiMime fails to load the specified adapter, it'll throw `MultiMime::Adap
75
76
  This library aims to support and is [tested against][travis] the following Ruby
76
77
  implementations:
77
78
 
79
+ - Ruby 2.3.0
80
+ - Ruby 2.2.0
78
81
  - Ruby 2.1.0
79
82
  - Ruby 2.0.0
80
83
  - Ruby 1.9.3
@@ -96,6 +99,6 @@ Cribbed:
96
99
  [gem]: https://rubygems.org/gems/multi_mime
97
100
  [travis]: http://travis-ci.org/karlfreeman/multi_mime
98
101
  [codeclimate]: https://codeclimate.com/github/karlfreeman/multi_mime
99
- [gittip]: https://www.gittip.com/karlfreeman/
102
+ [gittip]: https://www.gittip.com/karlfreeman
100
103
  [jruby]: http://www.jruby.org
101
104
  [rubinius]: http://rubini.us
data/Rakefile CHANGED
@@ -15,7 +15,7 @@ end
15
15
  begin
16
16
  require 'rubocop/rake_task'
17
17
  desc 'Run rubocop'
18
- Rubocop::RakeTask.new(:rubocop)
18
+ RuboCop::RakeTask.new(:rubocop)
19
19
  rescue LoadError
20
20
  end
21
21
 
@@ -10,6 +10,8 @@ module MultiMime
10
10
  [:rack_mime, 'rack/mime', :Rack].freeze
11
11
  ]
12
12
 
13
+ SEMAPHORE = Mutex.new
14
+
13
15
  # The default adapter based on what you currently
14
16
  # have loaded and installed. First checks to see
15
17
  # if any adapters are already loaded, then checks
@@ -46,7 +48,7 @@ module MultiMime
46
48
  # * mime_type
47
49
  # * rack_mime
48
50
  def use(new_adapter)
49
- Thread.exclusive do
51
+ SEMAPHORE.synchronize do
50
52
  @adapter = load_adapter(new_adapter)
51
53
  end
52
54
  end
@@ -1,3 +1,3 @@
1
1
  module MultiMime
2
- VERSION = '1.0.1' unless defined?(MultiMime::VERSION)
2
+ VERSION = '1.1.0' unless defined?(MultiMime::VERSION)
3
3
  end
@@ -0,0 +1,2 @@
1
+ require 'codeclimate-test-reporter'
2
+ CodeClimate::TestReporter.start
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multi_mime
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Karl Freeman
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-31 00:00:00.000000000 Z
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -124,6 +124,7 @@ files:
124
124
  - multi_mime.gemspec
125
125
  - spec/shared/adapter.rb
126
126
  - spec/spec_helper.rb
127
+ - spec/support/codeclimate.rb
127
128
  - spec/support/fakefs.rb
128
129
  - spec/support/pry.rb
129
130
  - spec/support/timecop.rb
@@ -148,13 +149,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
148
149
  version: '0'
149
150
  requirements: []
150
151
  rubyforge_project:
151
- rubygems_version: 2.2.0
152
+ rubygems_version: 2.5.1
152
153
  signing_key:
153
154
  specification_version: 4
154
155
  summary: A generic swappable back-end for MIME type detection
155
156
  test_files:
156
157
  - spec/shared/adapter.rb
157
158
  - spec/spec_helper.rb
159
+ - spec/support/codeclimate.rb
158
160
  - spec/support/fakefs.rb
159
161
  - spec/support/pry.rb
160
162
  - spec/support/timecop.rb