carrierwave-roz 0.3.1 → 0.3.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: 44e6526a68ea136cd459fe8cf3ed620abeb40261
4
- data.tar.gz: abab58648f7c0a08ab4d58ecd55cff948eeb17ea
3
+ metadata.gz: d3ec3a0388baa39783f30de6e8585e67ed91fcd9
4
+ data.tar.gz: fcd82850422ddbf883bc4deef4d7bd2c7db561a0
5
5
  SHA512:
6
- metadata.gz: 8eb3efecf9fe8ef4743d72985fecce9e6528538634da9e5908733ec960ddf7a768322496fb2adf1b8e7526c07441036bdcc05136ff231f94bda1162ed4fb7d1e
7
- data.tar.gz: 780287042f08a77cba1c60299d353cbdbdfee10520c124cdb383d80149bd6bd0ebe2ee946d20d142cc748f96f2f927458b978e29c4fda3aba7351a90070bf765
6
+ metadata.gz: 6e43144f24a1fbd94f7fb30f03f96147b8893c73528a45c14ebeefd173cfee197cef5c795e1acf859853f4fab7235a4cad77f7a7498cf13ad8f38d30b614c97b
7
+ data.tar.gz: af60c2ea45e9fd4c858a182a4cf56175b9b2adb3381781769ff329d855ec76f7e27043ad3d6259b3a06156a03f410f178dbd370c96d8c775fba35e35bc301504
@@ -5,7 +5,8 @@ module CarrierWave
5
5
  module Storage
6
6
  class Roz < Abstract
7
7
  def identifier
8
- ::File.join(*[uploader.access_id, uploader.store_dir, uploader.filename].map(&:to_s))
8
+ full_filename = [uploader.version_name, uploader.filename].compact.join('_')
9
+ ::File.join(*[uploader.access_id, uploader.store_dir, full_filename].map(&:to_s))
9
10
  end
10
11
 
11
12
  def store!(file)
@@ -43,7 +44,9 @@ module CarrierWave
43
44
  # Backwards compatibility for when we were storing only the filename
44
45
  URI.join(uploader.files_base_url, "#{uploader.access_id.to_s}/", "#{uploader.store_dir}/", path).to_s
45
46
  else
46
- URI.join(uploader.files_base_url, path).to_s
47
+ dirname = ::File.dirname(path)
48
+ basename = [uploader.version_name, ::File.basename(path)].compact.join('_')
49
+ URI.join(uploader.files_base_url, "#{dirname}/", basename).to_s
47
50
  end
48
51
  end
49
52
 
@@ -1,3 +1,3 @@
1
1
  module CarrierwaveRoz
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: carrierwave-roz
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam Crownoble