kuhsaft 1.8.5 → 1.8.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: be19a1e69db6da33e282fd0383df06e5dd8c580b
4
- data.tar.gz: 297b4a9777c3fc4a54388120d6c23866d82f609d
3
+ metadata.gz: 48c854f81cbe7f88f0a9512cd2f5cc2c2ba080a2
4
+ data.tar.gz: 4027155e3d1457db220d0eb760f52532861b2f36
5
5
  SHA512:
6
- metadata.gz: 961c2c7d9ce91ae7e9e073fcbde35077d73563c30a9b07540c3aedf52eb579976969bc2237058ea5129007ccdb1c5413475e09b84e4866dc5d4d87b6fed9918b
7
- data.tar.gz: 0864fce84b06eff31ba5bbecac5e8682a3c70eb674f4f55dd57650b10b7e38208d48531e21da98ac8ab9a6514b171be787c132b93475cb7aab11f0e0b98316e4
6
+ metadata.gz: bb2ec761d28e18fc45c9859e42b40a19d34f5796638f2ad6856ae3371944fae906e5d61f256336771dafdad1a78e6a03b6c68005612da74024749cd88cd65483
7
+ data.tar.gz: cf2f3963a64c2e27e3d6701c58274d379060d92187d8967c21b105d19938290a5092b4fa6e973aae67d25c9181bd3bc2729668d970618a4cfa81bc25c32530f9
@@ -13,7 +13,7 @@ class Kuhsaft::AssetBrickAssetUploader < CarrierWave::Uploader::Base
13
13
  # Override the directory where uploaded files will be stored.
14
14
  # This is a sensible default for uploaders that are meant to be mounted:
15
15
  def store_dir
16
- "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
16
+ "uploads/#{model.class.name.underscore.gsub(/^kuhsaft/,'cms')}/#{mounted_as}/#{model.id}"
17
17
  end
18
18
 
19
19
  # Provide a default URL as a default if there hasn't been a file uploaded:
@@ -12,7 +12,7 @@ module Kuhsaft
12
12
  # Override the directory where uploaded files will be stored.
13
13
  # This is a sensible default for uploaders that are meant to be mounted:
14
14
  def store_dir
15
- "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
15
+ "uploads/#{model.class.name.underscore.gsub(/^kuhsaft/,'cms')}/#{mounted_as}/#{model.id}"
16
16
  end
17
17
 
18
18
  # Provide a default URL as a default if there hasn't been a file uploaded:
@@ -0,0 +1,22 @@
1
+ class MoveKuhsaftAssets < ActiveRecord::Migration
2
+ def old_kuhsaft_assets_dir
3
+ File.join(Rails.root,'public/uploads/kuhsaft')
4
+ end
5
+
6
+ def new_kuhsaft_assets_dir
7
+ File.join(Rails.root,'public/uploads/cms')
8
+ end
9
+
10
+ def up
11
+ if File.exists? old_kuhsaft_assets_dir
12
+ puts "Moving Kuhsaft Assets from #{old_kuhsaft_assets_dir} to #{new_kuhsaft_assets_dir}"
13
+ File.rename old_kuhsaft_assets_dir, new_kuhsaft_assets_dir
14
+ end
15
+ end
16
+
17
+ def down
18
+ if File.exists? new_kuhsaft_assets_dir
19
+ File.rename new_kuhsaft_assets_dir, old_kuhsaft_assets_dir
20
+ end
21
+ end
22
+ end
@@ -1,3 +1,3 @@
1
1
  module Kuhsaft
2
- VERSION = "1.8.5"
2
+ VERSION = "1.8.6"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kuhsaft
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.8.5
4
+ version: 1.8.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Immanuel Häussermann
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2013-07-23 00:00:00.000000000 Z
15
+ date: 2013-08-20 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rspec
@@ -450,6 +450,7 @@ files:
450
450
  - db/migrate/11_update_url_and_redirect_url_value.rb
451
451
  - db/migrate/12_regenerate_fulltext.rb
452
452
  - db/migrate/13_add_page_title_to_pages.rb
453
+ - db/migrate/14_move_kuhsaft_assets.rb
453
454
  - db/seeds.rb
454
455
  - lib/generators/kuhsaft/assets/install_generator.rb
455
456
  - lib/generators/kuhsaft/translations/add_generator.rb