avatars_for_rails 0.1.1 → 0.1.2

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/app/models/avatar.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'RMagick'
2
2
 
3
3
  class Avatar < ActiveRecord::Base
4
-
4
+
5
5
  #Paperclip configuration.
6
6
  has_attached_file :logo,
7
7
  :styles => AvatarsForRails.avatarable_styles,
@@ -19,7 +19,7 @@ class Avatar < ActiveRecord::Base
19
19
 
20
20
  before_create :make_active
21
21
  after_create :disable_old
22
-
22
+
23
23
  #This method helps when changing the active logo for a user.
24
24
  def make_active
25
25
  self.updating_logo = true
@@ -57,11 +57,9 @@ class Avatar < ActiveRecord::Base
57
57
 
58
58
  #Returns the avatars_for_rails temp directory.
59
59
  def self.images_tmp_path
60
- images_path = File.join(Rails.root, "public", "images")
61
- #tmp_path = FileUtils.mkdir_p(File.join(images_path, "tmp"))
62
- tmp_path = File.join(images_path, "tmp")
60
+ tmp_path = File.join(Rails.root, AvatarsForRails.tmp_path)
63
61
  FileUtils.mkdir_p(tmp_path)
64
- return tmp_path
62
+ tmp_path
65
63
  end
66
64
 
67
65
  #This method copies a file to the avatars_for_rails temp directory.
@@ -2,7 +2,7 @@
2
2
  # project in your rails apps through git.
3
3
  Gem::Specification.new do |s|
4
4
  s.name = "avatars_for_rails"
5
- s.version = "0.1.1"
5
+ s.version = "0.1.2"
6
6
  s.authors = ["Jaime Castro Montero"]
7
7
  s.summary = "Avatar manager for rails apps."
8
8
  s.description = "A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options. Adapted to rails 3.1.0"
@@ -10,11 +10,15 @@ module AvatarsForRails
10
10
  mattr_accessor :current_avatarable_object
11
11
  mattr_accessor :avatarable_filters
12
12
  mattr_accessor :avatarable_styles
13
+ mattr_accessor :tmp_path
14
+ @@tmp_path = File.join('public', 'images', 'tmp')
13
15
 
14
16
  class << self
15
17
  def setup
16
18
  yield self
17
19
  end
20
+
21
+
18
22
  end
19
23
 
20
24
  class Engine < Rails::Engine
@@ -28,4 +32,4 @@ module AvatarsForRails
28
32
  =end
29
33
  end
30
34
 
31
- end
35
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: avatars_for_rails
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 31
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 1
10
- version: 0.1.1
9
+ - 2
10
+ version: 0.1.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jaime Castro Montero
@@ -15,11 +15,12 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-07-01 00:00:00 Z
18
+ date: 2011-07-06 00:00:00 +02:00
19
+ default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
- name: foreigner
22
22
  prerelease: false
23
+ type: :runtime
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
24
25
  none: false
25
26
  requirements:
@@ -31,11 +32,11 @@ dependencies:
31
32
  - 9
32
33
  - 1
33
34
  version: 0.9.1
34
- type: :runtime
35
+ name: foreigner
35
36
  version_requirements: *id001
36
37
  - !ruby/object:Gem::Dependency
37
- name: paperclip
38
38
  prerelease: false
39
+ type: :runtime
39
40
  requirement: &id002 !ruby/object:Gem::Requirement
40
41
  none: false
41
42
  requirements:
@@ -47,11 +48,11 @@ dependencies:
47
48
  - 3
48
49
  - 4
49
50
  version: 2.3.4
50
- type: :runtime
51
+ name: paperclip
51
52
  version_requirements: *id002
52
53
  - !ruby/object:Gem::Dependency
53
- name: rmagick
54
54
  prerelease: false
55
+ type: :runtime
55
56
  requirement: &id003 !ruby/object:Gem::Requirement
56
57
  none: false
57
58
  requirements:
@@ -63,11 +64,11 @@ dependencies:
63
64
  - 13
64
65
  - 1
65
66
  version: 2.13.1
66
- type: :runtime
67
+ name: rmagick
67
68
  version_requirements: *id003
68
69
  - !ruby/object:Gem::Dependency
69
- name: rails
70
70
  prerelease: false
71
+ type: :development
71
72
  requirement: &id004 !ruby/object:Gem::Requirement
72
73
  none: false
73
74
  requirements:
@@ -81,11 +82,11 @@ dependencies:
81
82
  - rc
82
83
  - 4
83
84
  version: 3.1.0.rc4
84
- type: :development
85
+ name: rails
85
86
  version_requirements: *id004
86
87
  - !ruby/object:Gem::Dependency
87
- name: sqlite3-ruby
88
88
  prerelease: false
89
+ type: :development
89
90
  requirement: &id005 !ruby/object:Gem::Requirement
90
91
  none: false
91
92
  requirements:
@@ -95,11 +96,11 @@ dependencies:
95
96
  segments:
96
97
  - 0
97
98
  version: "0"
98
- type: :development
99
+ name: sqlite3-ruby
99
100
  version_requirements: *id005
100
101
  - !ruby/object:Gem::Dependency
101
- name: ruby-debug
102
102
  prerelease: false
103
+ type: :development
103
104
  requirement: &id006 !ruby/object:Gem::Requirement
104
105
  none: false
105
106
  requirements:
@@ -111,11 +112,11 @@ dependencies:
111
112
  - 10
112
113
  - 3
113
114
  version: 0.10.3
114
- type: :development
115
+ name: ruby-debug
115
116
  version_requirements: *id006
116
117
  - !ruby/object:Gem::Dependency
117
- name: rspec-rails
118
118
  prerelease: false
119
+ type: :development
119
120
  requirement: &id007 !ruby/object:Gem::Requirement
120
121
  none: false
121
122
  requirements:
@@ -127,11 +128,11 @@ dependencies:
127
128
  - 5
128
129
  - 0
129
130
  version: 2.5.0
130
- type: :development
131
+ name: rspec-rails
131
132
  version_requirements: *id007
132
133
  - !ruby/object:Gem::Dependency
133
- name: factory_girl
134
134
  prerelease: false
135
+ type: :development
135
136
  requirement: &id008 !ruby/object:Gem::Requirement
136
137
  none: false
137
138
  requirements:
@@ -143,11 +144,11 @@ dependencies:
143
144
  - 3
144
145
  - 2
145
146
  version: 1.3.2
146
- type: :development
147
+ name: factory_girl
147
148
  version_requirements: *id008
148
149
  - !ruby/object:Gem::Dependency
149
- name: forgery
150
150
  prerelease: false
151
+ type: :development
151
152
  requirement: &id009 !ruby/object:Gem::Requirement
152
153
  none: false
153
154
  requirements:
@@ -159,11 +160,11 @@ dependencies:
159
160
  - 3
160
161
  - 6
161
162
  version: 0.3.6
162
- type: :development
163
+ name: forgery
163
164
  version_requirements: *id009
164
165
  - !ruby/object:Gem::Dependency
165
- name: capybara
166
166
  prerelease: false
167
+ type: :development
167
168
  requirement: &id010 !ruby/object:Gem::Requirement
168
169
  none: false
169
170
  requirements:
@@ -175,7 +176,7 @@ dependencies:
175
176
  - 3
176
177
  - 9
177
178
  version: 0.3.9
178
- type: :development
179
+ name: capybara
179
180
  version_requirements: *id010
180
181
  description: A Rails engine that allows any model to act as avatarable, permitting it to have a complete avatar manager with a few options. Adapted to rails 3.1.0
181
182
  email: jaime1988@gmail.com
@@ -306,6 +307,7 @@ files:
306
307
  - spec/dummy/script/rails
307
308
  - spec/integration/navigation_spec.rb
308
309
  - spec/spec_helper.rb
310
+ has_rdoc: true
309
311
  homepage: http://github.com/ging/avatars_for_rails
310
312
  licenses: []
311
313
 
@@ -335,7 +337,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
335
337
  requirements: []
336
338
 
337
339
  rubyforge_project:
338
- rubygems_version: 1.7.2
340
+ rubygems_version: 1.6.2
339
341
  signing_key:
340
342
  specification_version: 3
341
343
  summary: Avatar manager for rails apps.