avatars_for_rails 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/avatars_for_rails/avatarable.rb +9 -3
- data/lib/avatars_for_rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95e211e0006a3dbbf2339b1ad5a19cee7227d0cb
|
4
|
+
data.tar.gz: 25713072caae387232a6fc0d1d8e71fb94b32046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c8a9c962f822dda08f978b7ae11694b9b912a7511641ac6f4ad08c4e73c2f2da8c3edab64585cafcd6b4dc31b44447ac306f93829318156bbe719718b5324570
|
7
|
+
data.tar.gz: 9aee6308778d687a5b2cf2f98a4cf9eb3ccba45e7dee5826513be0c70677a2dc19992038fc5b70e3fbbc8f59aca682de0d7a7a5c2dced039489ab4f32cf28004
|
@@ -32,9 +32,7 @@ module AvatarsForRails
|
|
32
32
|
def check_avatar_aspect_ratio
|
33
33
|
return if logo.queued_for_write[:original].blank?
|
34
34
|
|
35
|
-
|
36
|
-
|
37
|
-
@avatar_tmp_basename = File.basename(logo.queued_for_write[:original].path)
|
35
|
+
cp_avatar_to_tmp_path
|
38
36
|
|
39
37
|
dimensions = avatar_tmp_file_dimensions
|
40
38
|
|
@@ -89,5 +87,13 @@ module AvatarsForRails
|
|
89
87
|
@avatar_magick_image ||=
|
90
88
|
Magick::Image.read(avatar_tmp_full_path).first
|
91
89
|
end
|
90
|
+
|
91
|
+
def cp_avatar_to_tmp_path
|
92
|
+
FileUtils.cp logo.queued_for_write[:original].path, AvatarsForRails.tmp_path
|
93
|
+
|
94
|
+
@avatar_tmp_basename = File.basename(logo.queued_for_write[:original].path)
|
95
|
+
|
96
|
+
FileUtils.chmod(0644, avatar_tmp_full_path)
|
97
|
+
end
|
92
98
|
end
|
93
99
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avatars_for_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jaime Castro Montero
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: jquery-rails
|