photofy 0.1.2 → 0.1.3

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.
Files changed (3) hide show
  1. data/lib/photofy.rb +1 -1
  2. metadata +18 -17
  3. checksums.yaml +0 -7
data/lib/photofy.rb CHANGED
@@ -33,7 +33,7 @@ module Photofy
33
33
 
34
34
  define_method "#{photo_field}_path" do
35
35
  directoy_path = FileUtils.mkdir_p File.join(self.class.photo_repository, self.class.photo_field.to_s)
36
- File.join(directoy_path, "#{photo_field}.jpg")
36
+ File.join(directoy_path, "#{photo_field}_#{self.send(self.class.primary_key)}.jpg")
37
37
  end
38
38
 
39
39
  define_method "process_n_save_#{photo_field}" do
metadata CHANGED
@@ -1,25 +1,25 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: photofy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - Praveen Kumar Sinha
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2012-03-15 00:00:00.000000000 Z
12
+ date: 2012-04-07 00:00:00.000000000Z
12
13
  dependencies: []
13
- description: |-
14
- A gem to provide simple method to do file upload of pictures and provides getter setter methods of it and save on model object commit.
15
- #Generates photo filed from photo_field arguments and provides methods like
16
- #if photo_filed is "collage" then it provides methods on top of it as
17
- #collage >> Getter,
18
- #collage = >> Setter. Accepted inputs are file upload(ActionDispatch::Http::UploadedFile), filer handle and String(no format validation is ignored),
19
- #collage_path >> Getter of filepath,
20
- #collage_persisted? >> true if provided file/data is stored on disk,
21
- #collage_store! >> to store provided file/data on disk,
22
- #collage_destroy! >> to store destroy stored file/data from disk
14
+ description: ! "A gem to provide simple method to do file upload of pictures and provides
15
+ getter setter methods of it and save on model object commit.\n #Generates photo
16
+ filed from photo_field arguments and provides methods like\n #if photo_filed
17
+ is \"collage\" then it provides methods on top of it as\n #collage >> Getter,\n
18
+ \ #collage = >> Setter. Accepted inputs are file upload(ActionDispatch::Http::UploadedFile),
19
+ filer handle and String(no format validation is ignored),\n #collage_path >>
20
+ Getter of filepath,\n #collage_persisted? >> true if provided file/data is stored
21
+ on disk,\n #collage_store! >> to store provided file/data on disk,\n #collage_destroy!
22
+ >> to store destroy stored file/data from disk"
23
23
  email: praveen.kumar.sinha@gmail.com
24
24
  executables: []
25
25
  extensions: []
@@ -28,25 +28,26 @@ files:
28
28
  - lib/photofy.rb
29
29
  homepage: https://github.com/praveenkumarsinha/Photofy
30
30
  licenses: []
31
- metadata: {}
32
31
  post_install_message:
33
32
  rdoc_options: []
34
33
  require_paths:
35
34
  - lib
36
35
  required_ruby_version: !ruby/object:Gem::Requirement
36
+ none: false
37
37
  requirements:
38
- - - '>='
38
+ - - ! '>='
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  required_rubygems_version: !ruby/object:Gem::Requirement
42
+ none: false
42
43
  requirements:
43
- - - '>='
44
+ - - ! '>='
44
45
  - !ruby/object:Gem::Version
45
46
  version: '0'
46
47
  requirements: []
47
48
  rubyforge_project:
48
- rubygems_version: 2.0.0.rc.2
49
+ rubygems_version: 1.8.10
49
50
  signing_key:
50
- specification_version: 4
51
+ specification_version: 3
51
52
  summary: Photofy
52
53
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: ec1560ea85ea9034a20b8a76dd3ceb0c9d5198d4
4
- data.tar.gz: 84bb74cf0fdee32a3af2bdbc9977e1921473a4be
5
- SHA512:
6
- metadata.gz: 4eb138ccebf70a8ff9dc724b5ed5e8b426f0f57a3a430caa285c50688a0c16c3758fe39debd9bec688c708d331710ea25a5c6e583d83e80eb04481aec96e5304
7
- data.tar.gz: 98662d31c2e5d0ee89245997eb76ffd22a914230daa6303d8fef8c61d9bcfc8733a343e00175f3348d4582fcca1fa7a072f441ac237abf957250c036fec22ddd