mirror of
https://github.com/kemko/paperclip.git
synced 2026-01-06 18:35:41 +03:00
fixes
This commit is contained in:
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
Gemfile.lock
|
||||
.ruby-version
|
||||
6
Gemfile
Normal file
6
Gemfile
Normal file
@@ -0,0 +1,6 @@
|
||||
# coding: utf-8
|
||||
source 'http://rubygems.org'
|
||||
|
||||
gem 'fastimage'
|
||||
|
||||
gemspec
|
||||
10
Rakefile
10
Rakefile
@@ -1,10 +1,12 @@
|
||||
require 'rake'
|
||||
require 'rake/testtask'
|
||||
require 'rake/rdoctask'
|
||||
require 'rdoc/task'
|
||||
|
||||
$LOAD_PATH << File.join(File.dirname(__FILE__), 'lib')
|
||||
require 'paperclip'
|
||||
|
||||
import 'lib/tasks/paperclip_tasks.rake'
|
||||
|
||||
desc 'Default: run unit tests.'
|
||||
task :default => [:clean, :test]
|
||||
|
||||
@@ -59,7 +61,7 @@ exclude_file_globs = ["test/s3.yml",
|
||||
"test/pkg/*",
|
||||
"test/tmp",
|
||||
"test/tmp/*"]
|
||||
spec = Gem::Specification.new do |s|
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.name = "paperclip"
|
||||
s.version = Paperclip::VERSION
|
||||
s.author = "Jon Yurek"
|
||||
@@ -85,13 +87,13 @@ task :manifest => :clean do
|
||||
puts file
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
desc "Generate a gemspec file for GitHub"
|
||||
task :gemspec => :clean do
|
||||
File.open("#{spec.name}.gemspec", 'w') do |f|
|
||||
f.write spec.to_ruby
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
desc "Build the gem into the current directory"
|
||||
task :gem => :gemspec do
|
||||
|
||||
@@ -27,6 +27,7 @@
|
||||
|
||||
require 'tempfile'
|
||||
require 'fastimage'
|
||||
require 'sidekiq'
|
||||
require 'paperclip/upfile'
|
||||
require 'paperclip/iostream'
|
||||
require 'paperclip/geometry'
|
||||
|
||||
@@ -106,7 +106,7 @@ module Paperclip
|
||||
|
||||
class UploadWorker
|
||||
include ::Sidekiq::Worker
|
||||
sidekiq_options queue: ::IMAGE_UPLOAD_QUEUE
|
||||
sidekiq_options queue: :paperclip
|
||||
|
||||
def perform(class_name, name, id)
|
||||
file = class_name.constantize.find_by_id(id)
|
||||
|
||||
@@ -18,6 +18,8 @@ Gem::Specification.new do |s|
|
||||
s.rubygems_version = %q{1.3.1}
|
||||
s.summary = %q{File attachments as attributes for ActiveRecord}
|
||||
|
||||
s.add_dependency('sidekiq', ["~> 2.0"])
|
||||
|
||||
if s.respond_to? :specification_version then
|
||||
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
||||
s.specification_version = 2
|
||||
|
||||
Reference in New Issue
Block a user