rails-uploader 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- data/app/views/uploader/default/_container.html.erb +3 -1
- data/app/views/uploader/default/_download.html.erb +1 -1
- data/app/views/uploader/default/_upload.html.erb +1 -1
- data/config/locales/en.yml +1 -1
- data/config/locales/ru.yml +1 -1
- data/config/locales/uk.yml +1 -1
- data/lib/uploader/version.rb +1 -1
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/dummy/log/test.log +69 -0
- data/spec/dummy/public/uploads/picture/data/1/thumb_rails.png +0 -0
- metadata +4 -2
@@ -34,7 +34,9 @@
|
|
34
34
|
paramName: "asset[data]",
|
35
35
|
formData: function(form){ return []; },
|
36
36
|
filesContainer: container,
|
37
|
-
namespace: 'uploader'
|
37
|
+
namespace: 'uploader',
|
38
|
+
uploadTemplateId: 'template-upload-<%= field.klass %>',
|
39
|
+
downloadTemplateId: 'template-download-<%= field.klass %>'
|
38
40
|
});
|
39
41
|
|
40
42
|
<% if field.exists? -%>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<!-- The template to display files available for download -->
|
2
|
-
<script id="template-download" type="text/x-tmpl">
|
2
|
+
<script id="template-download-<%= field.klass %>" type="text/x-tmpl">
|
3
3
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
4
4
|
<div class="attach_item template-download">
|
5
5
|
<div class="delete">
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<!-- The template to display files available for upload -->
|
2
|
-
<script id="template-upload" type="text/x-tmpl">
|
2
|
+
<script id="template-upload-<%= field.klass %>" type="text/x-tmpl">
|
3
3
|
{% for (var i=0, file; file=o.files[i]; i++) { %}
|
4
4
|
<div class="attach_item loading template-upload">
|
5
5
|
<div class="cancel"><a href="#" class="del_btn"></a></div>
|
data/config/locales/en.yml
CHANGED
data/config/locales/ru.yml
CHANGED
data/config/locales/uk.yml
CHANGED
data/lib/uploader/version.rb
CHANGED
Binary file
|
data/spec/dummy/log/test.log
CHANGED
@@ -205,3 +205,72 @@ Started POST "/uploader/attachments" for 127.0.0.1 at 2012-07-08 11:43:37 +0300
|
|
205
205
|
[1m[35m (90.6ms)[0m DELETE FROM sqlite_sequence where name = 'assets';
|
206
206
|
[1m[36m (79.4ms)[0m [1mDELETE FROM "articles";[0m
|
207
207
|
[1m[35m (79.4ms)[0m DELETE FROM sqlite_sequence where name = 'articles';
|
208
|
+
Connecting to database specified by database.yml
|
209
|
+
[1m[36m (0.2ms)[0m [1mselect sqlite_version(*)[0m
|
210
|
+
[1m[35m (125.1ms)[0m CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
|
211
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_list("schema_migrations")[0m
|
212
|
+
[1m[35m (101.3ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
213
|
+
[1m[36m (0.1ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
214
|
+
Migrating to CreateAssets (20120508093416)
|
215
|
+
[1m[35m (0.1ms)[0m begin transaction
|
216
|
+
[1m[36m (0.7ms)[0m [1mCREATE TABLE "assets" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "data_file_name" varchar(255) NOT NULL, "data_content_type" varchar(255), "data_file_size" integer, "assetable_id" integer NOT NULL, "assetable_type" varchar(25) NOT NULL, "type" varchar(25), "guid" varchar(10), "user_id" integer, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL) [0m
|
217
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("assets")
|
218
|
+
[1m[36m (0.3ms)[0m [1mCREATE INDEX "index_assets_on_assetable_type_and_assetable_id" ON "assets" ("assetable_type", "assetable_id")[0m
|
219
|
+
[1m[35m (0.1ms)[0m PRAGMA index_list("assets")
|
220
|
+
[1m[36m (0.1ms)[0m [1mPRAGMA index_info('index_assets_on_assetable_type_and_assetable_id')[0m
|
221
|
+
[1m[35m (0.3ms)[0m CREATE INDEX "index_assets_on_user_id" ON "assets" ("user_id")
|
222
|
+
[1m[36m (0.1ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20120508093416')[0m
|
223
|
+
[1m[35m (747.5ms)[0m commit transaction
|
224
|
+
Migrating to CreateArticles (20120508093830)
|
225
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
226
|
+
[1m[35m (0.6ms)[0m CREATE TABLE "articles" ("id" INTEGER PRIMARY KEY AUTOINCREMENT NOT NULL, "title" varchar(255), "content" text, "created_at" datetime NOT NULL, "updated_at" datetime NOT NULL)
|
227
|
+
[1m[36m (0.2ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('20120508093830')[0m
|
228
|
+
[1m[35m (97.0ms)[0m commit transaction
|
229
|
+
[1m[36m (85.8ms)[0m [1mDELETE FROM "assets";[0m
|
230
|
+
[1m[35m (0.2ms)[0m DELETE FROM sqlite_sequence where name = 'assets';
|
231
|
+
[1m[36m (79.2ms)[0m [1mDELETE FROM "articles";[0m
|
232
|
+
[1m[35m (0.2ms)[0m DELETE FROM sqlite_sequence where name = 'articles';
|
233
|
+
|
234
|
+
|
235
|
+
Started POST "/uploader/attachments" for 127.0.0.1 at 2012-09-12 16:41:06 +0300
|
236
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
237
|
+
[1m[35mSQL (2.8ms)[0m INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Wed, 12 Sep 2012 13:41:07 UTC +00:00], ["data_content_type", nil], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", "SOMESTRING"], ["type", "Picture"], ["updated_at", Wed, 12 Sep 2012 13:41:07 UTC +00:00], ["user_id", nil]]
|
238
|
+
[1m[36m (90.6ms)[0m [1mcommit transaction[0m
|
239
|
+
[1m[35m (0.1ms)[0m begin transaction
|
240
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "MyText"], ["created_at", Wed, 12 Sep 2012 13:41:07 UTC +00:00], ["title", "MyString"], ["updated_at", Wed, 12 Sep 2012 13:41:07 UTC +00:00]]
|
241
|
+
[1m[35m (88.2ms)[0m commit transaction
|
242
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
243
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Wed, 12 Sep 2012 13:41:07 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["type", "Picture"], ["updated_at", Wed, 12 Sep 2012 13:41:07 UTC +00:00], ["user_id", nil]]
|
244
|
+
[1m[36m (123.4ms)[0m [1mcommit transaction[0m
|
245
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')
|
246
|
+
|
247
|
+
|
248
|
+
Started DELETE "/uploader/attachments/2" for 127.0.0.1 at 2012-09-12 16:41:07 +0300
|
249
|
+
[1m[36mPicture Load (0.4ms)[0m [1mSELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? LIMIT 1[0m [["id", "2"]]
|
250
|
+
[1m[35m (0.1ms)[0m begin transaction
|
251
|
+
[1m[36mSQL (0.4ms)[0m [1mDELETE FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ?[0m [["id", 2]]
|
252
|
+
[1m[35m (96.7ms)[0m commit transaction
|
253
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')[0m
|
254
|
+
|
255
|
+
|
256
|
+
Started POST "/uploader/attachments" for 127.0.0.1 at 2012-09-12 16:41:07 +0300
|
257
|
+
[1m[35m (132.3ms)[0m DELETE FROM "assets";
|
258
|
+
[1m[36m (201.2ms)[0m [1mDELETE FROM sqlite_sequence where name = 'assets';[0m
|
259
|
+
[1m[35m (79.4ms)[0m DELETE FROM "articles";
|
260
|
+
[1m[36m (79.6ms)[0m [1mDELETE FROM sqlite_sequence where name = 'articles';[0m
|
261
|
+
[1m[35m (0.2ms)[0m begin transaction
|
262
|
+
[1m[36mSQL (0.7ms)[0m [1mINSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?)[0m [["content", "MyText"], ["created_at", Wed, 12 Sep 2012 13:41:08 UTC +00:00], ["title", "MyString"], ["updated_at", Wed, 12 Sep 2012 13:41:08 UTC +00:00]]
|
263
|
+
[1m[35m (99.2ms)[0m commit transaction
|
264
|
+
[1m[36m (0.2ms)[0m [1mbegin transaction[0m
|
265
|
+
[1m[35mSQL (0.6ms)[0m INSERT INTO "assets" ("assetable_id", "assetable_type", "created_at", "data_content_type", "data_file_name", "data_file_size", "guid", "type", "updated_at", "user_id") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["assetable_id", 1], ["assetable_type", "Article"], ["created_at", Wed, 12 Sep 2012 13:41:08 UTC +00:00], ["data_content_type", "image/png"], ["data_file_name", "rails.png"], ["data_file_size", nil], ["guid", nil], ["type", "Picture"], ["updated_at", Wed, 12 Sep 2012 13:41:08 UTC +00:00], ["user_id", nil]]
|
266
|
+
[1m[36m (96.2ms)[0m [1mcommit transaction[0m
|
267
|
+
[1m[35mPicture Load (0.4ms)[0m SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL LIMIT 1
|
268
|
+
[1m[36mSQL (97.4ms)[0m [1mUPDATE "assets" SET "assetable_id" = 1000, "guid" = NULL WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL AND "assets"."assetable_type" = 'Article'[0m
|
269
|
+
[1m[35mPicture Load (0.2ms)[0m SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? LIMIT 1 [["id", 1]]
|
270
|
+
[1m[36mPicture Load (0.4ms)[0m [1mSELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" = 'KUq7GeHyu9' LIMIT 1[0m
|
271
|
+
[1m[35m (0.1ms)[0m begin transaction
|
272
|
+
[1m[36m (0.1ms)[0m [1mcommit transaction[0m
|
273
|
+
[1m[35m (81.7ms)[0m DELETE FROM "assets";
|
274
|
+
[1m[36m (79.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'assets';[0m
|
275
|
+
[1m[35m (79.6ms)[0m DELETE FROM "articles";
|
276
|
+
[1m[36m (79.3ms)[0m [1mDELETE FROM sqlite_sequence where name = 'articles';[0m
|
Binary file
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-uploader
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2012-09-
|
13
|
+
date: 2012-09-12 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: sqlite3
|
@@ -127,6 +127,7 @@ files:
|
|
127
127
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
128
128
|
- spec/dummy/config/initializers/session_store.rb
|
129
129
|
- spec/dummy/config/initializers/mime_types.rb
|
130
|
+
- spec/dummy/db/test.sqlite3
|
130
131
|
- spec/dummy/db/migrate/20120508093830_create_articles.rb
|
131
132
|
- spec/dummy/db/migrate/20120508093416_create_assets.rb
|
132
133
|
- spec/dummy/README.rdoc
|
@@ -196,6 +197,7 @@ test_files:
|
|
196
197
|
- spec/dummy/config/initializers/wrap_parameters.rb
|
197
198
|
- spec/dummy/config/initializers/session_store.rb
|
198
199
|
- spec/dummy/config/initializers/mime_types.rb
|
200
|
+
- spec/dummy/db/test.sqlite3
|
199
201
|
- spec/dummy/db/migrate/20120508093830_create_articles.rb
|
200
202
|
- spec/dummy/db/migrate/20120508093416_create_assets.rb
|
201
203
|
- spec/dummy/README.rdoc
|