delayed_paperclip 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.textile +2 -8
- data/Rakefile +0 -1
- data/VERSION +1 -1
- data/delayed_paperclip.gemspec +3 -5
- data/rails/init.rb +1 -0
- data/test/delayed_paperclip_test.rb +9 -0
- metadata +3 -12
data/README.textile
CHANGED
@@ -1,7 +1,5 @@
|
|
1
1
|
h1. Delayed::Paperclip
|
2
2
|
|
3
|
-
*Warning: ATM this is alpha software and has not been tested in a production environment*
|
4
|
-
|
5
3
|
Delayed_paperclip lets you process your "Paperclip":http://github.com/thoughtbot/paperclip attachments in a background task with "delayed_job":http://github.com/tobi/delayed_job.
|
6
4
|
|
7
5
|
h2. Why?
|
@@ -23,7 +21,7 @@ Add it to your environment.rb:
|
|
23
21
|
Or, even better, to your Gemfile:
|
24
22
|
|
25
23
|
<pre><code>source "http://gemcutter.org"
|
26
|
-
|
24
|
+
gem 'delayed_paperclip'
|
27
25
|
</code></pre>
|
28
26
|
|
29
27
|
Dependencies:
|
@@ -52,8 +50,4 @@ AFAIK this library should work no matter what kind of post-processing you are do
|
|
52
50
|
|
53
51
|
h2. Does it work with s3?
|
54
52
|
|
55
|
-
Yes.
|
56
|
-
|
57
|
-
h2. Inspirations
|
58
|
-
|
59
|
-
"http://blog.madeofcode.com/post/201282903/paperclip-s3-delayed-job-in-rails":http://blog.madeofcode.com/post/201282903/paperclip-s3-delayed-job-in-rails
|
53
|
+
Yes.
|
data/Rakefile
CHANGED
@@ -44,7 +44,6 @@ begin
|
|
44
44
|
gemspec.homepage = "http://github.com/jstorimer/delayed_paperclip"
|
45
45
|
gemspec.authors = ["Jesse Storimer"]
|
46
46
|
gemspec.add_dependency('paperclip', '>= 2.3.0')
|
47
|
-
gemspec.add_dependency('delayed_job', '>= 1.8.0')
|
48
47
|
end
|
49
48
|
Jeweler::GemcutterTasks.new
|
50
49
|
rescue LoadError
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/delayed_paperclip.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{delayed_paperclip}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jesse Storimer"]
|
12
|
-
s.date = %q{2010-
|
12
|
+
s.date = %q{2010-02-03}
|
13
13
|
s.description = %q{Process your Paperclip attachments in the background with delayed_job.}
|
14
14
|
s.email = %q{jesse@jstorimer.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -26,6 +26,7 @@ Gem::Specification.new do |s|
|
|
26
26
|
"lib/delayed/paperclip.rb",
|
27
27
|
"lib/delayed/paperclip_job.rb",
|
28
28
|
"lib/delayed_paperclip.rb",
|
29
|
+
"rails/init.rb",
|
29
30
|
"test/database.yml",
|
30
31
|
"test/delayed_paperclip_test.rb",
|
31
32
|
"test/fixtures/12k.png",
|
@@ -47,14 +48,11 @@ Gem::Specification.new do |s|
|
|
47
48
|
|
48
49
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
49
50
|
s.add_runtime_dependency(%q<paperclip>, [">= 2.3.0"])
|
50
|
-
s.add_runtime_dependency(%q<delayed_job>, [">= 1.8.0"])
|
51
51
|
else
|
52
52
|
s.add_dependency(%q<paperclip>, [">= 2.3.0"])
|
53
|
-
s.add_dependency(%q<delayed_job>, [">= 1.8.0"])
|
54
53
|
end
|
55
54
|
else
|
56
55
|
s.add_dependency(%q<paperclip>, [">= 2.3.0"])
|
57
|
-
s.add_dependency(%q<delayed_job>, [">= 1.8.0"])
|
58
56
|
end
|
59
57
|
end
|
60
58
|
|
data/rails/init.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require 'delayed_paperclip'
|
@@ -55,6 +55,15 @@ class DelayedPaperclipTest < Test::Unit::TestCase
|
|
55
55
|
DelayedPaperclipJob.new(@dummy.id, @dummy.class.name, :image).perform
|
56
56
|
end
|
57
57
|
|
58
|
+
def test_after_callback_is_functional
|
59
|
+
@dummy_class.send(:define_method, :done_processing) { puts 'done' }
|
60
|
+
@dummy_class.after_image_post_process :done_processing
|
61
|
+
Dummy.any_instance.expects(:done_processing)
|
62
|
+
|
63
|
+
@dummy.save!
|
64
|
+
DelayedPaperclipJob.new(@dummy.id, @dummy.class.name, :image).perform
|
65
|
+
end
|
66
|
+
|
58
67
|
private
|
59
68
|
def reset_dummy
|
60
69
|
reset_table("dummies") do |d|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: delayed_paperclip
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jesse Storimer
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2010-
|
12
|
+
date: 2010-02-03 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -22,16 +22,6 @@ dependencies:
|
|
22
22
|
- !ruby/object:Gem::Version
|
23
23
|
version: 2.3.0
|
24
24
|
version:
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: delayed_job
|
27
|
-
type: :runtime
|
28
|
-
version_requirement:
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
30
|
-
requirements:
|
31
|
-
- - ">="
|
32
|
-
- !ruby/object:Gem::Version
|
33
|
-
version: 1.8.0
|
34
|
-
version:
|
35
25
|
description: Process your Paperclip attachments in the background with delayed_job.
|
36
26
|
email: jesse@jstorimer.com
|
37
27
|
executables: []
|
@@ -51,6 +41,7 @@ files:
|
|
51
41
|
- lib/delayed/paperclip.rb
|
52
42
|
- lib/delayed/paperclip_job.rb
|
53
43
|
- lib/delayed_paperclip.rb
|
44
|
+
- rails/init.rb
|
54
45
|
- test/database.yml
|
55
46
|
- test/delayed_paperclip_test.rb
|
56
47
|
- test/fixtures/12k.png
|