paperclip_database 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +5 -0
- data/Appraisals +23 -0
- data/README.md +3 -4
- data/features/basic_integration.feature +1 -1
- data/gemfiles/rails32_paperclip40.gemfile +9 -0
- data/gemfiles/rails32_paperclip4x.gemfile +9 -0
- data/gemfiles/rails40_paperclip40.gemfile +9 -0
- data/gemfiles/rails40_paperclip4x.gemfile +9 -0
- data/lib/paperclip/storage/database.rb +1 -1
- data/lib/paperclip_database/version.rb +1 -1
- data/test/namespaced_models_test.rb +1 -0
- metadata +43 -71
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 654fa1e438f9fadcf44928b5647042234f6c6579
|
4
|
+
data.tar.gz: 63ac11d032c0c8cf77ebcc2dfb0353c4fbd71cbc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e790ed0d73796a74a802b9ccdd412065ba4f2d8fc1b9b5b35ad09197821a4ce612959a736745777e1276b0fb86ff1e77c09e780d4642d024fcaeefa0c86c39e8
|
7
|
+
data.tar.gz: 92a5835976253d91dc37424c85f016e522617882bb8edc11f6a954fc6c923769dd30e3c7704f1ba35b18fdce1455d55a63f0fd54a66f9248b5fac548fe0612a0
|
data/.travis.yml
CHANGED
@@ -2,6 +2,7 @@ language: ruby
|
|
2
2
|
rvm:
|
3
3
|
- 1.9.3
|
4
4
|
- 2.0.0
|
5
|
+
- 2.1.1
|
5
6
|
gemfile:
|
6
7
|
- gemfiles/rails30_paperclip23.gemfile
|
7
8
|
- gemfiles/rails30_paperclip2x.gemfile
|
@@ -15,5 +16,9 @@ gemfile:
|
|
15
16
|
- gemfiles/rails32_paperclip2x.gemfile
|
16
17
|
- gemfiles/rails32_paperclip30.gemfile
|
17
18
|
- gemfiles/rails32_paperclip3x.gemfile
|
19
|
+
- gemfiles/rails32_paperclip40.gemfile
|
20
|
+
- gemfiles/rails32_paperclip4x.gemfile
|
18
21
|
- gemfiles/rails40_paperclip34.gemfile
|
19
22
|
- gemfiles/rails40_paperclip3x.gemfile
|
23
|
+
- gemfiles/rails40_paperclip40.gemfile
|
24
|
+
- gemfiles/rails40_paperclip4x.gemfile
|
data/Appraisals
CHANGED
@@ -77,6 +77,18 @@ appraise "rails32_paperclip3x" do
|
|
77
77
|
gem "paperclip_database", :path => "../"
|
78
78
|
end
|
79
79
|
|
80
|
+
appraise "rails32_paperclip40" do
|
81
|
+
gem "rails", "~> 3.2.0"
|
82
|
+
gem "paperclip", "~> 4.0.0"
|
83
|
+
gem "paperclip_database", :path => "../"
|
84
|
+
end
|
85
|
+
|
86
|
+
appraise "rails32_paperclip4x" do
|
87
|
+
gem "rails", "~> 3.2.0"
|
88
|
+
gem "paperclip", "~> 4.0"
|
89
|
+
gem "paperclip_database", :path => "../"
|
90
|
+
end
|
91
|
+
|
80
92
|
## Rails 4.0
|
81
93
|
|
82
94
|
appraise "rails40_paperclip34" do
|
@@ -91,3 +103,14 @@ appraise "rails40_paperclip3x" do
|
|
91
103
|
gem "paperclip_database", :path => "../"
|
92
104
|
end
|
93
105
|
|
106
|
+
appraise "rails40_paperclip40" do
|
107
|
+
gem "rails", "~> 4.0.0"
|
108
|
+
gem "paperclip", "~> 4.0.0"
|
109
|
+
gem "paperclip_database", :path => "../"
|
110
|
+
end
|
111
|
+
|
112
|
+
appraise "rails40_paperclip4x" do
|
113
|
+
gem "rails", "~> 4.0.0"
|
114
|
+
gem "paperclip", "~> 4.0"
|
115
|
+
gem "paperclip_database", :path => "../"
|
116
|
+
end
|
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Paperclip Database Storage
|
2
2
|
==========================
|
3
3
|
|
4
|
-
[![Build Status](https://
|
4
|
+
[![Build Status](https://travis-ci.org/softace/paperclip_database.png)](http://travis-ci.org/softace/paperclip_database)
|
5
5
|
[![Dependency Status](https://gemnasium.com/softace/paperclip_database.png)](https://gemnasium.com/softace/paperclip_database)
|
6
6
|
[![Code Climate](https://codeclimate.com/github/softace/paperclip_database.png)](https://codeclimate.com/github/softace/paperclip_database)
|
7
7
|
|
@@ -32,7 +32,7 @@ Or, if you want to get the latest, you can get master from the main
|
|
32
32
|
paperclip repository:
|
33
33
|
|
34
34
|
gem "paperclip_database", :git => "git://github.com/softace/paperclip_database.git"
|
35
|
-
|
35
|
+
|
36
36
|
If you're trying to use features that don't seem to be in the latest
|
37
37
|
released gem, but are mentioned in this README, then you probably need
|
38
38
|
to specify the master branch if you want to use them. This README is
|
@@ -61,7 +61,7 @@ table.
|
|
61
61
|
In your model:
|
62
62
|
|
63
63
|
class User < ActiveRecord::Base
|
64
|
-
has_attached_file :avatar,
|
64
|
+
has_attached_file :avatar,
|
65
65
|
:storage => :database ## This is the essence
|
66
66
|
:styles => { :medium => "300x300>", :thumb => "100x100>" }
|
67
67
|
end
|
@@ -117,4 +117,3 @@ Copyright
|
|
117
117
|
|
118
118
|
Copyright (c) 2012 Jarl Friis. See LICENSE.txt for
|
119
119
|
further details.
|
120
|
-
|
@@ -15,6 +15,7 @@ Feature: Rails integration
|
|
15
15
|
has_attached_file :avatar,
|
16
16
|
:storage => :database,
|
17
17
|
:url => '/avatar_views/:id?style=:style'
|
18
|
+
validates_attachment_content_type :avatar, :content_type => /\Aimage\/.*\Z/
|
18
19
|
"""
|
19
20
|
And I run a "scaffold" generator to generate a "AvatarView" scaffold with ""
|
20
21
|
Given I replace /^ def show$.*?^ end$/ with this snippet in the "avatar_views" controller:
|
@@ -42,4 +43,3 @@ Feature: Rails integration
|
|
42
43
|
Then I should see "Name: something"
|
43
44
|
And I should see an image with a path of "/avatar_views/1?style=original"
|
44
45
|
And the file at "/avatar_views/1?style=original" should be the same as "test/fixtures/5k.png"
|
45
|
-
|
@@ -9,6 +9,7 @@ class NamespacedModelsTest < Test::Unit::TestCase
|
|
9
9
|
klass.table_name = 'namespace_models'
|
10
10
|
klass.has_attached_file :avatar, :storage => :database,
|
11
11
|
:database_table => :namespace_model_avatars
|
12
|
+
klass.validates_attachment_content_type :avatar, :content_type => /\Aimage\/.*\Z/
|
12
13
|
end
|
13
14
|
|
14
15
|
ActiveRecord::Base.connection.create_table :namespace_models, :force => true do |table|
|
metadata
CHANGED
@@ -1,226 +1,201 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: paperclip_database
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jarl Friis
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: rails
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - ">="
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: 3.0.0
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - ">="
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: 3.0.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: paperclip
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- -
|
31
|
+
- - ">="
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: 2.3.0
|
38
34
|
type: :runtime
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- -
|
38
|
+
- - ">="
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: 2.3.0
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: appraisal
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- - ~>
|
45
|
+
- - "~>"
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0.4'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- - ~>
|
52
|
+
- - "~>"
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0.4'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: mocha
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - ">="
|
68
60
|
- !ruby/object:Gem::Version
|
69
61
|
version: '0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - ">="
|
76
67
|
- !ruby/object:Gem::Version
|
77
68
|
version: '0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: sqlite3
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- - ~>
|
73
|
+
- - "~>"
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '1.3'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- - ~>
|
80
|
+
- - "~>"
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '1.3'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: cucumber
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- - ~>
|
87
|
+
- - "~>"
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '1.1'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- - ~>
|
94
|
+
- - "~>"
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '1.1'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: launchy
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- - ~>
|
101
|
+
- - "~>"
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '2.1'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- - ~>
|
108
|
+
- - "~>"
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '2.1'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: aruba
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: capybara
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- - ~>
|
129
|
+
- - "~>"
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: 2.0.0
|
150
|
-
- - <
|
132
|
+
- - "<"
|
151
133
|
- !ruby/object:Gem::Version
|
152
134
|
version: 2.1.0
|
153
135
|
type: :development
|
154
136
|
prerelease: false
|
155
137
|
version_requirements: !ruby/object:Gem::Requirement
|
156
|
-
none: false
|
157
138
|
requirements:
|
158
|
-
- - ~>
|
139
|
+
- - "~>"
|
159
140
|
- !ruby/object:Gem::Version
|
160
141
|
version: 2.0.0
|
161
|
-
- - <
|
142
|
+
- - "<"
|
162
143
|
- !ruby/object:Gem::Version
|
163
144
|
version: 2.1.0
|
164
145
|
- !ruby/object:Gem::Dependency
|
165
146
|
name: bundler
|
166
147
|
requirement: !ruby/object:Gem::Requirement
|
167
|
-
none: false
|
168
148
|
requirements:
|
169
|
-
- -
|
149
|
+
- - ">="
|
170
150
|
- !ruby/object:Gem::Version
|
171
151
|
version: '0'
|
172
152
|
type: :development
|
173
153
|
prerelease: false
|
174
154
|
version_requirements: !ruby/object:Gem::Requirement
|
175
|
-
none: false
|
176
155
|
requirements:
|
177
|
-
- -
|
156
|
+
- - ">="
|
178
157
|
- !ruby/object:Gem::Version
|
179
158
|
version: '0'
|
180
159
|
- !ruby/object:Gem::Dependency
|
181
160
|
name: rake
|
182
161
|
requirement: !ruby/object:Gem::Requirement
|
183
|
-
none: false
|
184
162
|
requirements:
|
185
|
-
- -
|
163
|
+
- - ">="
|
186
164
|
- !ruby/object:Gem::Version
|
187
165
|
version: '0'
|
188
166
|
type: :development
|
189
167
|
prerelease: false
|
190
168
|
version_requirements: !ruby/object:Gem::Requirement
|
191
|
-
none: false
|
192
169
|
requirements:
|
193
|
-
- -
|
170
|
+
- - ">="
|
194
171
|
- !ruby/object:Gem::Version
|
195
172
|
version: '0'
|
196
173
|
- !ruby/object:Gem::Dependency
|
197
174
|
name: fakeweb
|
198
175
|
requirement: !ruby/object:Gem::Requirement
|
199
|
-
none: false
|
200
176
|
requirements:
|
201
|
-
- -
|
177
|
+
- - ">="
|
202
178
|
- !ruby/object:Gem::Version
|
203
179
|
version: '0'
|
204
180
|
type: :development
|
205
181
|
prerelease: false
|
206
182
|
version_requirements: !ruby/object:Gem::Requirement
|
207
|
-
none: false
|
208
183
|
requirements:
|
209
|
-
- -
|
184
|
+
- - ">="
|
210
185
|
- !ruby/object:Gem::Version
|
211
186
|
version: '0'
|
212
|
-
description:
|
187
|
+
description: 'To have all your data in one place: the database'
|
213
188
|
email:
|
214
189
|
- jarl@softace.dk
|
215
190
|
executables: []
|
216
191
|
extensions: []
|
217
192
|
extra_rdoc_files: []
|
218
193
|
files:
|
219
|
-
- .document
|
220
|
-
- .gitignore
|
221
|
-
- .rspec
|
222
|
-
- .ruby-version
|
223
|
-
- .travis.yml
|
194
|
+
- ".document"
|
195
|
+
- ".gitignore"
|
196
|
+
- ".rspec"
|
197
|
+
- ".ruby-version"
|
198
|
+
- ".travis.yml"
|
224
199
|
- Appraisals
|
225
200
|
- Gemfile
|
226
201
|
- LICENSE.txt
|
@@ -248,8 +223,12 @@ files:
|
|
248
223
|
- gemfiles/rails32_paperclip2x.gemfile
|
249
224
|
- gemfiles/rails32_paperclip30.gemfile
|
250
225
|
- gemfiles/rails32_paperclip3x.gemfile
|
226
|
+
- gemfiles/rails32_paperclip40.gemfile
|
227
|
+
- gemfiles/rails32_paperclip4x.gemfile
|
251
228
|
- gemfiles/rails40_paperclip34.gemfile
|
252
229
|
- gemfiles/rails40_paperclip3x.gemfile
|
230
|
+
- gemfiles/rails40_paperclip40.gemfile
|
231
|
+
- gemfiles/rails40_paperclip4x.gemfile
|
253
232
|
- lib/generators/paperclip_database/migration/USAGE
|
254
233
|
- lib/generators/paperclip_database/migration/migration_generator.rb
|
255
234
|
- lib/generators/paperclip_database/migration/templates/migration.rb.erb
|
@@ -268,33 +247,26 @@ files:
|
|
268
247
|
homepage: https://github.com/softace/paperclip_database
|
269
248
|
licenses:
|
270
249
|
- MIT
|
250
|
+
metadata: {}
|
271
251
|
post_install_message:
|
272
252
|
rdoc_options: []
|
273
253
|
require_paths:
|
274
254
|
- lib
|
275
255
|
required_ruby_version: !ruby/object:Gem::Requirement
|
276
|
-
none: false
|
277
256
|
requirements:
|
278
|
-
- -
|
257
|
+
- - ">="
|
279
258
|
- !ruby/object:Gem::Version
|
280
259
|
version: '0'
|
281
|
-
segments:
|
282
|
-
- 0
|
283
|
-
hash: -2980498353163651834
|
284
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
285
|
-
none: false
|
286
261
|
requirements:
|
287
|
-
- -
|
262
|
+
- - ">="
|
288
263
|
- !ruby/object:Gem::Version
|
289
264
|
version: '0'
|
290
|
-
segments:
|
291
|
-
- 0
|
292
|
-
hash: -2980498353163651834
|
293
265
|
requirements:
|
294
266
|
- ImageMagick
|
295
267
|
rubyforge_project:
|
296
|
-
rubygems_version:
|
268
|
+
rubygems_version: 2.2.2
|
297
269
|
signing_key:
|
298
|
-
specification_version:
|
270
|
+
specification_version: 4
|
299
271
|
summary: Database storage for paperclip
|
300
272
|
test_files: []
|