mime_version 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/mime_version.rb +3 -7
  2. metadata +3 -3
data/lib/mime_version.rb CHANGED
@@ -4,18 +4,14 @@ class MimeVersion
4
4
  end
5
5
 
6
6
  def self.parse_version(content_type)
7
- tag = "version="
8
- @version = @default_version
9
- @hash = Hash[content_type.split(';').map { |i| i.split('=') }]
10
- @version = @hash["version"]
7
+ hash = Hash[content_type.split(';').map { |i| i.split('=') }]
8
+ version = hash["version"]
11
9
  end
12
10
 
13
11
  def call(env)
14
-
15
12
  ENV['version'] = ""
16
13
  if env.has_key? "CONTENT_TYPE"
17
- @version = MimeVersion.parse_version(env["CONTENT_TYPE"])
18
- ENV['version'] = @version
14
+ ENV['version'] = MimeVersion.parse_version(env["CONTENT_TYPE"])
19
15
  end
20
16
  @app.call(env)
21
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mime_version
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -20,7 +20,7 @@ extensions: []
20
20
  extra_rdoc_files: []
21
21
  files:
22
22
  - lib/mime_version.rb
23
- homepage: http://rubygems.org/gems/mimeversion
23
+ homepage: https://github.com/amaabca/mime_version
24
24
  licenses: []
25
25
  post_install_message:
26
26
  rdoc_options: []
@@ -40,7 +40,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
40
40
  version: '0'
41
41
  requirements: []
42
42
  rubyforge_project:
43
- rubygems_version: 1.8.23
43
+ rubygems_version: 1.8.24
44
44
  signing_key:
45
45
  specification_version: 3
46
46
  summary: Mime version