stash-magic 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -263,6 +263,7 @@ The project is speced with
263
263
  - 0.0.3 Fix image destruction when there is nothing to destroy
264
264
  - 0.0.5 Remove ERB dependency
265
265
  - 0.0.7 Make it possible to overwrite the original image with another style in after_stash
266
+ - 0.0.8 Default thumb does not break when file name has signs in the name
266
267
 
267
268
  == Copyright
268
269
 
data/spec.rb CHANGED
@@ -192,10 +192,10 @@ describe ::StashMagic do
192
192
 
193
193
  it "Should not raise when updating the entry with blank string - which means the attachment is untouched" do
194
194
  @t = Treasure.create(:instructions => @pdf)
195
- @t.instructions.should=={:type=>"application/pdf", :name=>"instructions.pdf", :size=>20956}
195
+ before = @t.instructions
196
196
  F.exists?(Treasure::PUBLIC+'/stash/Treasure/'+@t.id.to_s+'/instructions.pdf').should==true
197
197
  @t.update(:instructions=>"")
198
- @t.instructions.should=={:type=>"application/pdf", :name=>"instructions.pdf", :size=>20956}
198
+ @t.instructions.should==before
199
199
  F.exists?(Treasure::PUBLIC+'/stash/Treasure/'+@t.id.to_s+'/instructions.pdf').should==true
200
200
  end
201
201
 
data/stash_magic.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'stash-magic'
3
- s.version = "0.0.7"
3
+ s.version = "0.0.8"
4
4
  s.platform = Gem::Platform::RUBY
5
5
  s.summary = "File Attachment Made Simple"
6
6
  s.description = "A simple attachment system that also handles thumbnails or other styles via ImageMagick. Originaly tested on Sequel ORM but purposedly easy to plug to something else."
data/stash_magic.rb CHANGED
@@ -154,7 +154,7 @@ module StashMagic
154
154
 
155
155
  def after_stash(attachment_name)
156
156
  current = self.send(attachment_name)
157
- convert(attachment_name, "-resize 100x75^ -gravity center -extent 100x75", 'stash_thumb.gif') if !current.nil? && current[:type][/^image\//]
157
+ convert(attachment_name, "-resize '100x75^' -gravity center -extent 100x75", 'stash_thumb.gif') if !current.nil? && current[:type][/^image\//]
158
158
  end
159
159
 
160
160
  def destroy_files_for(attachment_name, url=nil)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stash-magic
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease: false
4
+ hash: 15
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Mickael Riga
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-04-11 00:00:00 +01:00
18
+ date: 2011-06-02 00:00:00 +01:00
19
19
  default_executable:
20
20
  dependencies: []
21
21
 
@@ -64,7 +64,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
64
64
  requirements: []
65
65
 
66
66
  rubyforge_project:
67
- rubygems_version: 1.3.7
67
+ rubygems_version: 1.4.2
68
68
  signing_key:
69
69
  specification_version: 3
70
70
  summary: File Attachment Made Simple