attachinary 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -64,7 +64,6 @@ If you're using [SimpleForm](https://github.com/plataformatec/simple_form), you
64
64
  Finally, you have to include `attachinary` into your asset pipeline. In your `application.js`, add following line:
65
65
 
66
66
  ...
67
- //= require cloudinary
68
67
  //= require attachinary
69
68
  ...
70
69
 
@@ -23,11 +23,16 @@ module Attachinary
23
23
  attr_writer :"#{scope}"
24
24
 
25
25
  # def photo
26
- # @photo ||= photo_attachment_file
26
+ # unless defined?(@photo)
27
+ # @photo = photo_attachment_file
28
+ # end
29
+ # @photo
27
30
  # end
28
31
  define_method :"#{scope}" do
29
- instance_variable_set :"@#{scope}",
30
- (instance_variable_get(:"@#{scope}") || send(:"#{scope}_attachment_file"))
32
+ unless instance_variable_defined? :"@#{scope}"
33
+ instance_variable_set :"@#{scope}", send(:"#{scope}_attachment_file")
34
+ end
35
+ instance_variable_get :"@#{scope}"
31
36
  end
32
37
 
33
38
  # def photo_id=(id)
@@ -104,11 +109,16 @@ module Attachinary
104
109
  attr_writer :"#{scope}"
105
110
 
106
111
  # def images
107
- # @images ||= image_attachment_files
112
+ # unless defined?(@images)
113
+ # @images = image_attachment_files
114
+ # end
115
+ # @images
108
116
  # end
109
117
  define_method :"#{scope}" do
110
- instance_variable_set :"@#{scope}",
111
- (instance_variable_get(:"@#{scope}") || send(:"#{singular}_attachment_files"))
118
+ unless instance_variable_defined? :"@#{scope}"
119
+ instance_variable_set :"@#{scope}", send(:"#{singular}_attachment_files")
120
+ end
121
+ instance_variable_get :"@#{scope}"
112
122
  end
113
123
 
114
124
  # def image_ids=(ids)
@@ -1,3 +1,3 @@
1
1
  module Attachinary
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attachinary
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-07-10 00:00:00.000000000Z
12
+ date: 2012-07-12 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &70349861908400 !ruby/object:Gem::Requirement
16
+ requirement: &70182590731520 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '3.2'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70349861908400
24
+ version_requirements: *70182590731520
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: cloudinary
27
- requirement: &70349861907900 !ruby/object:Gem::Requirement
27
+ requirement: &70182590731020 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 1.0.29
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70349861907900
35
+ version_requirements: *70182590731020
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: sqlite3
38
- requirement: &70349861907520 !ruby/object:Gem::Requirement
38
+ requirement: &70182590816380 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :development
45
45
  prerelease: false
46
- version_requirements: *70349861907520
46
+ version_requirements: *70182590816380
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec-rails
49
- requirement: &70349861906980 !ruby/object:Gem::Requirement
49
+ requirement: &70182590815840 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '2.5'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70349861906980
57
+ version_requirements: *70182590815840
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: valid_attribute
60
- requirement: &70349861906560 !ruby/object:Gem::Requirement
60
+ requirement: &70182590815420 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70349861906560
68
+ version_requirements: *70182590815420
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: capybara
71
- requirement: &70349861906100 !ruby/object:Gem::Requirement
71
+ requirement: &70182590814960 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70349861906100
79
+ version_requirements: *70182590814960
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: factory_girl_rails
82
- requirement: &70349861905600 !ruby/object:Gem::Requirement
82
+ requirement: &70182590814460 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '3.0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70349861905600
90
+ version_requirements: *70182590814460
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: webmock
93
- requirement: &70349861905180 !ruby/object:Gem::Requirement
93
+ requirement: &70182590814040 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70349861905180
101
+ version_requirements: *70182590814040
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: launchy
104
- requirement: &70349861990720 !ruby/object:Gem::Requirement
104
+ requirement: &70182590813580 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70349861990720
112
+ version_requirements: *70182590813580
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: guard-rspec
115
- requirement: &70349861990300 !ruby/object:Gem::Requirement
115
+ requirement: &70182590813160 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,7 +120,7 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *70349861990300
123
+ version_requirements: *70182590813160
124
124
  description: Attachments handler for Rails that uses Cloudinary for storage.
125
125
  email:
126
126
  - milovan.zogovic@gmail.com
@@ -159,7 +159,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
159
159
  version: '0'
160
160
  segments:
161
161
  - 0
162
- hash: -2112842538813240156
162
+ hash: -338977511801249803
163
163
  required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  none: false
165
165
  requirements:
@@ -168,11 +168,11 @@ required_rubygems_version: !ruby/object:Gem::Requirement
168
168
  version: '0'
169
169
  segments:
170
170
  - 0
171
- hash: -2112842538813240156
171
+ hash: -338977511801249803
172
172
  requirements: []
173
173
  rubyforge_project:
174
174
  rubygems_version: 1.8.10
175
175
  signing_key:
176
176
  specification_version: 3
177
- summary: attachinary-0.0.6
177
+ summary: attachinary-0.0.7
178
178
  test_files: []