file_column_with_s3 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/file_column.rb +8 -0
- metadata +7 -20
data/lib/file_column.rb
CHANGED
@@ -739,6 +739,14 @@ module FileColumn # :nodoc:
|
|
739
739
|
store.copy(relative_path, local_path)
|
740
740
|
end
|
741
741
|
|
742
|
+
define_method "#{attr}_exists?" do
|
743
|
+
state = send(state_method)
|
744
|
+
relative_path = state.relative_path
|
745
|
+
return false unless relative_path
|
746
|
+
store = state.store
|
747
|
+
store.exists?(relative_path)
|
748
|
+
end
|
749
|
+
|
742
750
|
private after_save_method, after_destroy_method
|
743
751
|
|
744
752
|
FileColumn::MagickExtension::file_column(self, attr, my_options) if options[:magick]
|
metadata
CHANGED
@@ -1,13 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: file_column_with_s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
4
|
+
prerelease: false
|
6
5
|
segments:
|
7
6
|
- 0
|
8
7
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
8
|
+
- 4
|
9
|
+
version: 0.1.4
|
11
10
|
platform: ruby
|
12
11
|
authors:
|
13
12
|
- Mingle SaaS team
|
@@ -15,17 +14,16 @@ autorequire:
|
|
15
14
|
bindir: bin
|
16
15
|
cert_chain: []
|
17
16
|
|
18
|
-
date:
|
17
|
+
date: 2014-02-04 00:00:00 -08:00
|
18
|
+
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: mingle-storage
|
22
22
|
prerelease: false
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
-
none: false
|
25
24
|
requirements:
|
26
25
|
- - ~>
|
27
26
|
- !ruby/object:Gem::Version
|
28
|
-
hash: 29
|
29
27
|
segments:
|
30
28
|
- 0
|
31
29
|
- 0
|
@@ -37,11 +35,9 @@ dependencies:
|
|
37
35
|
name: rails
|
38
36
|
prerelease: false
|
39
37
|
requirement: &id002 !ruby/object:Gem::Requirement
|
40
|
-
none: false
|
41
38
|
requirements:
|
42
39
|
- - ~>
|
43
40
|
- !ruby/object:Gem::Version
|
44
|
-
hash: 19
|
45
41
|
segments:
|
46
42
|
- 2
|
47
43
|
- 3
|
@@ -53,11 +49,9 @@ dependencies:
|
|
53
49
|
name: sqlite3
|
54
50
|
prerelease: false
|
55
51
|
requirement: &id003 !ruby/object:Gem::Requirement
|
56
|
-
none: false
|
57
52
|
requirements:
|
58
53
|
- - ">="
|
59
54
|
- !ruby/object:Gem::Version
|
60
|
-
hash: 3
|
61
55
|
segments:
|
62
56
|
- 0
|
63
57
|
version: "0"
|
@@ -67,11 +61,9 @@ dependencies:
|
|
67
61
|
name: rmagick
|
68
62
|
prerelease: false
|
69
63
|
requirement: &id004 !ruby/object:Gem::Requirement
|
70
|
-
none: false
|
71
64
|
requirements:
|
72
65
|
- - ">="
|
73
66
|
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
67
|
segments:
|
76
68
|
- 0
|
77
69
|
version: "0"
|
@@ -81,11 +73,9 @@ dependencies:
|
|
81
73
|
name: aws-sdk
|
82
74
|
prerelease: false
|
83
75
|
requirement: &id005 !ruby/object:Gem::Requirement
|
84
|
-
none: false
|
85
76
|
requirements:
|
86
77
|
- - ">="
|
87
78
|
- !ruby/object:Gem::Version
|
88
|
-
hash: 3
|
89
79
|
segments:
|
90
80
|
- 0
|
91
81
|
version: "0"
|
@@ -123,6 +113,7 @@ files:
|
|
123
113
|
- README
|
124
114
|
- CHANGELOG
|
125
115
|
- s3_env.example
|
116
|
+
has_rdoc: true
|
126
117
|
homepage: https://github.com/ThoughtWorksStudios/file_column
|
127
118
|
licenses: []
|
128
119
|
|
@@ -132,27 +123,23 @@ rdoc_options: []
|
|
132
123
|
require_paths:
|
133
124
|
- lib
|
134
125
|
required_ruby_version: !ruby/object:Gem::Requirement
|
135
|
-
none: false
|
136
126
|
requirements:
|
137
127
|
- - ">="
|
138
128
|
- !ruby/object:Gem::Version
|
139
|
-
hash: 3
|
140
129
|
segments:
|
141
130
|
- 0
|
142
131
|
version: "0"
|
143
132
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
144
|
-
none: false
|
145
133
|
requirements:
|
146
134
|
- - ">="
|
147
135
|
- !ruby/object:Gem::Version
|
148
|
-
hash: 3
|
149
136
|
segments:
|
150
137
|
- 0
|
151
138
|
version: "0"
|
152
139
|
requirements: []
|
153
140
|
|
154
141
|
rubyforge_project:
|
155
|
-
rubygems_version: 1.
|
142
|
+
rubygems_version: 1.3.6
|
156
143
|
signing_key:
|
157
144
|
specification_version: 3
|
158
145
|
summary: File attachment library for ruby
|