roachclip 0.2.2 → 0.2.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/lib/roachclip.rb +6 -2
  3. data/roachclip.gemspec +2 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.2
1
+ 0.2.3
data/lib/roachclip.rb CHANGED
@@ -38,12 +38,16 @@ module Roachclip
38
38
  before_save :destroy_nil_roaches
39
39
 
40
40
  self.send(:define_method, "#{name}_path") do
41
- (path % [self.send(name).id.to_s, Time.now.to_i]).chomp('-')
41
+ time = self.attributes['updated_at'] || Time.now
42
+ time = time.to_i
43
+ (path % [self.send(name).id.to_s, time]).chomp('-')
42
44
  end
43
45
 
44
46
  options[:styles].each do |k,v|
45
47
  self.send(:define_method, "#{name}_#{k}_path") do
46
- (path % [self.send(name).id.to_s, Time.now.to_i]).chomp('-')
48
+ time = self.attributes['updated_at'] || Time.now
49
+ time = time.to_i
50
+ (path % [self.send(name).id.to_s, time]).chomp('-')
47
51
  end
48
52
  end
49
53
  end
data/roachclip.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{roachclip}
8
- s.version = "0.2.2"
8
+ s.version = "0.2.3"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Angilly"]
12
- s.date = %q{2010-09-17}
12
+ s.date = %q{2010-09-26}
13
13
  s.description = %q{Let you upload images and have use paperclip's hotness to post process them}
14
14
  s.email = %q{ryan@angilly.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 2
9
- version: 0.2.2
8
+ - 3
9
+ version: 0.2.3
10
10
  platform: ruby
11
11
  authors:
12
12
  - Ryan Angilly
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-17 00:00:00 -06:00
17
+ date: 2010-09-26 00:00:00 -06:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency