papermill 1.3.0 → 1.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -17,7 +17,7 @@
17
17
  * Formtastic # use :as => :[image|asset](s)_upload
18
18
  * JGrowl # for notifications (included)
19
19
  * FaceBox # for popups (included)
20
- * Stringex # (or any String#to_url) for asset filename/url generation
20
+ * Stringex # (or any String#to_url) for filename generation
21
21
 
22
22
  === Navigator minimal requirements:
23
23
 
@@ -33,7 +33,7 @@ Check your audience.
33
33
  * Rails 2.3.4 min (rail's I18n, engine. older 2.3.x have issues with CRSF or try to check for CRSF stamp against AJAX request, useless with AJAX same origin policy, fixed with 2.3.4)
34
34
  * Paperclip 2.3 branch (installed by default as a gem dependency, will be loaded internally if needed => You can require your own version of Paperclip if you want to)
35
35
  * Front web server serving static assets if present, and forwarding demand to rails if not. (Usually a no-brainer on any classic installation. Works with Webrick)
36
-
36
+
37
37
  == Features
38
38
 
39
39
  === Ajax uploading form helpers through SWFUpload => [image|asset](s)_upload
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.3.0
1
+ 1.3.1
@@ -18,13 +18,13 @@ class <%= migration_name %> < ActiveRecord::Migration
18
18
 
19
19
  # Example additionals fields (configure :mass_editable_fields/:editable_fields accordingly)
20
20
  t.string :alt
21
- t.string :copyright
21
+ t.string :copyright # Content can be used to add copyright on thumbnails
22
22
  t.text :description
23
23
  t.timestamps
24
24
  end
25
25
 
26
26
  change_table :papermill_assets do |t|
27
- t.index [:assetable_type, :assetable_id, :assetable_key, :position]
27
+ t.index [:assetable_type, :assetable_id, :assetable_key, :position], { :name => "papermill_index" }
28
28
  t.index [:assetable_key, :position] # for non assetable assets
29
29
  end
30
30
  end
@@ -124,7 +124,8 @@ class PapermillAsset < ActiveRecord::Base
124
124
  destroy_thumbnails if style_name.to_s == "original"
125
125
  style = self.class.compute_style(style_name) unless style.is_a?(Hash)
126
126
  FileUtils.mkdir_p File.dirname(file.path(style_name))
127
- FileUtils.mv(Paperclip::PapermillPaperclipProcessor.make(file, style).path, file.path(style_name))
127
+ FileUtils.cp((tmp_path = Paperclip::PapermillPaperclipProcessor.make(file, style).path), file.path(style_name))
128
+ File.delete(tmp_path)
128
129
  end
129
130
 
130
131
  def destroy_thumbnails
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: papermill
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Benoit B\xC3\xA9n\xC3\xA9zech"
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-15 00:00:00 +01:00
12
+ date: 2009-12-16 00:00:00 +01:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency