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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a2fa0780408718ec13f606cd2f172b455b4e915
4
- data.tar.gz: 19c06be33392b14480b2d77a8a169b5b1413224c
3
+ metadata.gz: 95e211e0006a3dbbf2339b1ad5a19cee7227d0cb
4
+ data.tar.gz: 25713072caae387232a6fc0d1d8e71fb94b32046
5
5
  SHA512:
6
- metadata.gz: c12079f591d50892d39a3eeb6ee37af2dbd2c48034b6ad8e55f551a068371e88394e2981d14ea531108bbcd98b6dd7e296c3107aed452e4840b6ef504779750e
7
- data.tar.gz: 49e1aee7f5d7a1e99ae1edaae7e0168406a45b8dd51934396e357a1c883af76ad36e89e534f5cdc8cb8abcb072af180f0fd8b8712122e130ed4e3ce7bdbae600
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
- FileUtils.cp logo.queued_for_write[:original].path, AvatarsForRails.tmp_path
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
@@ -1,3 +1,3 @@
1
1
  module AvatarsForRails
2
- VERSION = "1.1.0"
2
+ VERSION = "1.1.1"
3
3
  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.0
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-05-29 00:00:00.000000000 Z
12
+ date: 2013-06-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: jquery-rails