model_attachment 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/model_attachment.rb +4 -4
  2. metadata +8 -4
@@ -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.12"
17
+ VERSION = "0.0.13"
18
18
 
19
19
  class << self
20
20
 
@@ -49,7 +49,7 @@ module ModelAttachment
49
49
  end
50
50
 
51
51
  if options[:aws] == :default
52
- config_file = File.join(RAILS_ROOT, "config", "amazon.yml")
52
+ config_file = File.join(Rails.root, "config", "amazon.yml")
53
53
  if File.exist?(config_file)
54
54
  options[:aws] = config_file
55
55
  include AmazonInstanceMethods
@@ -170,7 +170,7 @@ module ModelAttachment
170
170
 
171
171
  # returns the full system path of the file
172
172
  def full_path
173
- RAILS_ROOT + path
173
+ File.join(Rails.root, path)
174
174
  end
175
175
 
176
176
  # returns the filename, including any type modifier
@@ -249,7 +249,7 @@ module ModelAttachment
249
249
  return if @temp_file.nil? or @temp_file == ""
250
250
  options = self.class.attachment_options
251
251
 
252
- log("Path: #{path} Basename: #{basename} Extension: #{extension}")
252
+ log("Path: #{full_path} Basename: #{basename} Extension: #{extension}")
253
253
 
254
254
  # copy image to correct path
255
255
  FileUtils.mkdir_p(full_path)
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 12
9
- version: 0.0.12
8
+ - 13
9
+ version: 0.0.13
10
10
  platform: ruby
11
11
  authors:
12
12
  - Steve Walker
@@ -14,13 +14,14 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-06-02 00:00:00 -04:00
17
+ date: 2010-06-14 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: sqlite3-ruby
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
24
25
  requirements:
25
26
  - - ">="
26
27
  - !ruby/object:Gem::Version
@@ -33,6 +34,7 @@ dependencies:
33
34
  name: activerecord
34
35
  prerelease: false
35
36
  requirement: &id002 !ruby/object:Gem::Requirement
37
+ none: false
36
38
  requirements:
37
39
  - - ">="
38
40
  - !ruby/object:Gem::Version
@@ -71,6 +73,7 @@ rdoc_options:
71
73
  require_paths:
72
74
  - lib
73
75
  required_ruby_version: !ruby/object:Gem::Requirement
76
+ none: false
74
77
  requirements:
75
78
  - - ">="
76
79
  - !ruby/object:Gem::Version
@@ -78,6 +81,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
78
81
  - 0
79
82
  version: "0"
80
83
  required_rubygems_version: !ruby/object:Gem::Requirement
84
+ none: false
81
85
  requirements:
82
86
  - - ">="
83
87
  - !ruby/object:Gem::Version
@@ -87,7 +91,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
87
91
  requirements:
88
92
  - ImageMagick
89
93
  rubyforge_project: model_attachment
90
- rubygems_version: 1.3.6
94
+ rubygems_version: 1.3.7
91
95
  signing_key:
92
96
  specification_version: 3
93
97
  summary: Attach files to ActiveRecord models and run commands on images