carrierwave-audio 1.0.5 → 1.0.6

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: cf4938a0ba17aec10068fac1cc876c87f102fa2c
4
- data.tar.gz: 0bd35be4c177378ec20c730c1e6f16f0cdab9bac
3
+ metadata.gz: fc52f0f740d2c0e991b05cd320ae11ecd943c989
4
+ data.tar.gz: efa91bef6f74e088b95f56cef3f9651e46cf521c
5
5
  SHA512:
6
- metadata.gz: 45f567e93f83eaeca79474ff966a635d4b98605f65dae4324503ecda41035dbc31b3ac38137211087f24a1fc3b2a4b284614689bdf0dbdbc916722e9ebad8c43
7
- data.tar.gz: 50e3130e4270da25bbcd374bb6a3c83cfce090490f84db0347f2194a06e51b548bf0882296138ce21c9b7590e73420518681eff66b7003c425169016c98c5e67
6
+ metadata.gz: bcf72a9e54478c4b81a16efd96695324191c14df2b9ad0127d579cbb054b98a815347137ebfa421900cb987ad107e9462d99b3873b33a6d9cfe0bb6a1b5de4c0
7
+ data.tar.gz: a60c7674dd03e62b1c1894bbc5a7e9b533c21e775ba949111918661ae7015328f7b14398e44dee963276ca52c2d29d44510ebe86e03e2f2b52e690143c26ea22
@@ -21,7 +21,7 @@ module CarrierWave
21
21
  audio_filename = Processor.convert(current_path, options)
22
22
  extension = File.extname(audio_filename).gsub(/\./, '')
23
23
  File.rename audio_filename, current_path
24
- set_content_type extension
24
+ self.file.instance_variable_set(:@content_type, content_type_for_extension(extension))
25
25
  end
26
26
 
27
27
  def watermark options={}
@@ -30,15 +30,15 @@ module CarrierWave
30
30
  audio_filename = Processor.watermark(current_path, options)
31
31
  extension = File.extname(audio_filename).gsub(/\./, '')
32
32
  File.rename audio_filename, current_path
33
- set_content_type extension
33
+ self.file.instance_variable_set(:@content_type, content_type_for_extension(extension))
34
34
  end
35
35
 
36
36
  private
37
37
 
38
- def set_content_type extension
38
+ def content_type_for_extension extension
39
39
  case extension.to_sym
40
40
  when :mp3
41
- self.file.instance_variable_set(:@content_type, "audio/mpeg3")
41
+ "audio/mpeg3"
42
42
  end
43
43
  end
44
44
  end
@@ -1,5 +1,5 @@
1
1
  module CarrierWave
2
2
  module Audio
3
- VERSION = '1.0.5'
3
+ VERSION = '1.0.6'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-audio
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Trevor Hinesley