pothoven-attachment_fu 3.2.7 → 3.2.8
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.
data/CHANGELOG
CHANGED
@@ -13,7 +13,7 @@ module Technoweenie # :nodoc:
|
|
13
13
|
#
|
14
14
|
# == Configuration
|
15
15
|
#
|
16
|
-
# Configuration is done via <tt>Rails.root.to_s/config/rackspace_cloudfiles.yml</tt> and is loaded according to the <tt
|
16
|
+
# Configuration is done via <tt>Rails.root.to_s/config/rackspace_cloudfiles.yml</tt> and is loaded according to the <tt>#{Rails.env}</tt>.
|
17
17
|
# The minimum connection options that you must specify are a container name, your Mosso login name and your Mosso API key.
|
18
18
|
# You can sign up for Cloud Files and get access keys by visiting https://www.mosso.com/buy.htm
|
19
19
|
#
|
@@ -117,7 +117,7 @@ module Technoweenie # :nodoc:
|
|
117
117
|
|
118
118
|
begin
|
119
119
|
@@cloudfiles_config_path = base.attachment_options[:cloudfiles_config_path] || (Rails.root.to_s + '/config/rackspace_cloudfiles.yml')
|
120
|
-
@@cloudfiles_config = @@cloudfiles_config = YAML.load(ERB.new(File.read(@@cloudfiles_config_path)).result)[
|
120
|
+
@@cloudfiles_config = @@cloudfiles_config = YAML.load(ERB.new(File.read(@@cloudfiles_config_path)).result)[Rails.env].symbolize_keys
|
121
121
|
rescue
|
122
122
|
#raise ConfigFileNotFoundError.new('File %s not found' % @@cloudfiles_config_path)
|
123
123
|
end
|
@@ -20,12 +20,12 @@ module Technoweenie # :nodoc:
|
|
20
20
|
# The optional thumbnail argument will output the thumbnail's filename.
|
21
21
|
def full_filename(thumbnail = nil)
|
22
22
|
file_system_path = (thumbnail ? thumbnail_class : self).attachment_options[:path_prefix].to_s
|
23
|
-
Rails.root
|
23
|
+
File.join(Rails.root, file_system_path, *partitioned_path(thumbnail_name_for(thumbnail)))
|
24
24
|
end
|
25
25
|
|
26
26
|
# Used as the base path that #public_filename strips off full_filename to create the public path
|
27
27
|
def base_path
|
28
|
-
@base_path ||= Rails.root
|
28
|
+
@base_path ||= File.join(Rails.root, 'public')
|
29
29
|
end
|
30
30
|
|
31
31
|
# The attachment ID used in the full path of a file
|
@@ -12,7 +12,7 @@ module Technoweenie # :nodoc:
|
|
12
12
|
#
|
13
13
|
# == Configuration
|
14
14
|
#
|
15
|
-
# Configuration is done via <tt>#{Rails.root}/config/amazon_s3.yml</tt> and is loaded according to the <tt
|
15
|
+
# Configuration is done via <tt>#{Rails.root}/config/amazon_s3.yml</tt> and is loaded according to the <tt>#{Rails.env}</tt>.
|
16
16
|
# The minimum connection options that you must specify are a bucket name, your access key id and your secret access key.
|
17
17
|
# If you don't already have your access keys, all you need to sign up for the S3 service is an account at Amazon.
|
18
18
|
# You can sign up for S3 and get access keys by visiting http://aws.amazon.com/s3.
|
@@ -184,7 +184,7 @@ module Technoweenie # :nodoc:
|
|
184
184
|
|
185
185
|
begin
|
186
186
|
@@s3_config_path = base.attachment_options[:s3_config_path] || (Rails.root.to_s + '/config/amazon_s3.yml')
|
187
|
-
@@s3_config = @@s3_config = YAML.load(ERB.new(File.read(@@s3_config_path)).result)[
|
187
|
+
@@s3_config = @@s3_config = YAML.load(ERB.new(File.read(@@s3_config_path)).result)[Rails.env].symbolize_keys
|
188
188
|
#rescue
|
189
189
|
# raise ConfigFileNotFoundError.new('File %s not found' % @@s3_config_path)
|
190
190
|
end
|
@@ -286,7 +286,7 @@ module Technoweenie # :nodoc:
|
|
286
286
|
#
|
287
287
|
# The optional thumbnail argument will output the thumbnail's filename (if any).
|
288
288
|
def cloudfront_url(thumbnail = nil)
|
289
|
-
|
289
|
+
s3_protocol + cloudfront_distribution_domain + "/" + full_filename(thumbnail)
|
290
290
|
end
|
291
291
|
|
292
292
|
def public_filename(*args)
|
@@ -1,7 +1,7 @@
|
|
1
1
|
module Technoweenie # :nodoc:
|
2
2
|
module AttachmentFu # :nodoc:
|
3
3
|
@@default_processors = %w(ImageScience Rmagick MiniMagick Gd2 CoreImage)
|
4
|
-
@@tempfile_path = Rails.root
|
4
|
+
@@tempfile_path = File.join(Rails.root, 'tmp', 'attachment_fu')
|
5
5
|
@@content_types = [
|
6
6
|
'image/jpeg',
|
7
7
|
'image/pjpeg',
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pothoven-attachment_fu
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.2.
|
4
|
+
version: 3.2.8
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ bindir: bin
|
|
12
12
|
cert_chain: []
|
13
13
|
date: 2013-04-10 00:00:00.000000000 Z
|
14
14
|
dependencies: []
|
15
|
-
description: This is a fork of Rick Olson
|
15
|
+
description: This is a fork of Rick Olson's attachment_fu adding Ruby 1.9 and Rails
|
16
16
|
3.2 support as well as some other enhancements.
|
17
17
|
email: steven@pothoven.net
|
18
18
|
executables: []
|