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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 11f07bb05b28accc6bb36da36d7dfbf2a6291261
4
- data.tar.gz: 517ffc53d9770a6d2ee3172cde3fe71374cc32c8
3
+ metadata.gz: 2af25d28a99d0d19b8f1315ec8095f1ce4e07f37
4
+ data.tar.gz: b742aec9c37a08fff972f86e409babaff1c537ca
5
5
  SHA512:
6
- metadata.gz: 5dddafce7f27c1c4e7947ed9edea3ac0d0c4acc580485d0eb2d18ff213a61f6c8ec109d4d254c85aacf163f95452de5aa38d6a61db5a5e56cfe64e16e637596e
7
- data.tar.gz: 4cf17e83da1725b477a6866c4fa2b10da84a3bbe9f4f12e21abe164d3c9e0fbd4f144b7b7bc792f068d188596a7604d08c84c4189ed6ce52ac58a8b0b93eaead
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
 
@@ -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
 
@@ -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| File.open(f.avatar.path( :original )) }
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?
@@ -3,7 +3,7 @@ class Paperclip
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 1
6
- PATCH = 0
6
+ PATCH = 2
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
@@ -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.0 ruby lib
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.0"
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"
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.0
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-14 00:00:00.000000000 Z
11
+ date: 2014-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paperclip