paperclip_montage 0.1.0 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +2 -0
- data/config/Guardfile +2 -0
- data/lib/paperclip/montage.rb +8 -1
- data/lib/paperclip/myversion.rb +1 -1
- data/paperclip_montage.gemspec +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2af25d28a99d0d19b8f1315ec8095f1ce4e07f37
|
4
|
+
data.tar.gz: b742aec9c37a08fff972f86e409babaff1c537ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7ce4dfd71c4657fc3e25394ffc42034961c184936c6ce1fc4bef5919a9944a3f93cd5945c4f8daea2d613aa9a1bcaf7ed52ac0fffe6f25ac9fb558a4f2f0cdd
|
7
|
+
data.tar.gz: 20908f72b1e3ade97324cb99bb534db2b8416b46518df2bff65172fa7ea99b48792c8b43734c697e70d10a7b631796f05e4701a4a1585ef61fd7b2a8810ccf17
|
data/Guardfile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
require 'fileutils'
|
1
2
|
|
2
3
|
guard :rspec, cmd: 'bundle exec rspec' do
|
3
4
|
watch(%r{^spec/.+_spec\.rb$})
|
4
5
|
watch(%r{^lib/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
|
6
|
+
watch(%r{^lib/(.+)\.rb}) { FileUtils.touch('spec/rails-app/spec/spec_helper.rb') }
|
5
7
|
watch('spec/spec_helper.rb') { "spec" }
|
6
8
|
watch ("config/Guardfile") { UI.info "Exiting guard because config changed"; exit 0 }
|
7
9
|
|
data/config/Guardfile
CHANGED
@@ -1,7 +1,9 @@
|
|
1
|
+
require 'fileutils'
|
1
2
|
|
2
3
|
guard :rspec, cmd: 'bundle exec rspec' do
|
3
4
|
watch(%r{^spec/.+_spec\.rb$})
|
4
5
|
watch(%r{^lib/(.+)\.rb}) { |m| "spec/#{m[1]}_spec.rb" }
|
6
|
+
watch(%r{^lib/(.+)\.rb}) { FileUtils.touch('spec/rails-app/spec/spec_helper.rb') }
|
5
7
|
watch('spec/spec_helper.rb') { "spec" }
|
6
8
|
watch ("config/Guardfile") { UI.info "Exiting guard because config changed"; exit 0 }
|
7
9
|
|
data/lib/paperclip/montage.rb
CHANGED
@@ -26,7 +26,14 @@ module Paperclip
|
|
26
26
|
|
27
27
|
if source.is_a?(Symbol)
|
28
28
|
return if @attachment.instance.nil?
|
29
|
-
source = @attachment.instance.send(source).map { |f|
|
29
|
+
source = @attachment.instance.send(source).map { |f|
|
30
|
+
if f.avatar.options[:storage] == :filesystem
|
31
|
+
File.open(f.avatar.path( :original ))
|
32
|
+
else
|
33
|
+
file_name = "tmp/#{f.id}-montage.png" #Dir::Tmpname.create(['montage', '.png']) { }
|
34
|
+
f.avatar.copy_to_local_file( :original, file_name )
|
35
|
+
end
|
36
|
+
}
|
30
37
|
end
|
31
38
|
|
32
39
|
return if source.nil? || source.empty?
|
data/lib/paperclip/myversion.rb
CHANGED
data/paperclip_montage.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: paperclip_montage 0.1.
|
5
|
+
# stub: paperclip_montage 0.1.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "paperclip_montage"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
13
13
|
s.authors = ["Daniel W. Crompton"]
|
14
|
-
s.date = "2014-12-
|
14
|
+
s.date = "2014-12-16"
|
15
15
|
s.description = "This module stores the image files in Redis"
|
16
16
|
s.email = ["paperclip+montage@specialbrands.net"]
|
17
17
|
s.extra_rdoc_files = [
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip_montage
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel W. Crompton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-12-
|
11
|
+
date: 2014-12-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: paperclip
|