model_attachment 0.0.9 → 0.0.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. data/lib/model_attachment.rb +4 -2
  2. metadata +3 -3
@@ -14,7 +14,7 @@ require 'model_attachment/amazon'
14
14
 
15
15
  # The base module that gets included in ActiveRecord::Base.
16
16
  module ModelAttachment
17
- VERSION = "0.0.9"
17
+ VERSION = "0.0.10"
18
18
 
19
19
  class << self
20
20
 
@@ -129,6 +129,8 @@ module ModelAttachment
129
129
  server_name = options[:server_name] || "localhost"
130
130
  url_path = options[:path] || "/#{self.class.to_s.downcase.pluralize}/deliver/"
131
131
  type = options[:type]
132
+ version = options[:version]
133
+
132
134
  server_name += ":" + port.to_s if port
133
135
  type_string = "?type=#{type}" if type
134
136
 
@@ -144,7 +146,7 @@ module ModelAttachment
144
146
  url = "#{proto}://#{server_name}#{url_path}#{basename}#{type_string}#{extension}"
145
147
  elsif bucket.nil?
146
148
  # otherwise use private url with deliver
147
- url = "#{proto}://#{server_name}#{url_path}#{id}#{type_string}"
149
+ url = "#{proto}://#{server_name}#{url_path}#{id}#{type_string}?v=#{version}"
148
150
  else
149
151
  # if bucket is set, then use aws url
150
152
  url = aws_url(type)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 9
9
- version: 0.0.9
8
+ - 10
9
+ version: 0.0.10
10
10
  platform: ruby
11
11
  authors:
12
12
  - Steve Walker
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-05-10 00:00:00 -04:00
17
+ date: 2010-05-18 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency