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.
@@ -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>
@@ -1,5 +1,5 @@
1
1
  en:
2
2
  uploader:
3
3
  button: "Choose file"
4
- drop: "Drag&Drop photos here"
4
+ drop: "Drag&Drop files here"
5
5
  or: "or"
@@ -1,5 +1,5 @@
1
1
  ru:
2
2
  uploader:
3
3
  button: "Выберите файл на компьютере"
4
- drop: "Перетащите фотографию сюда"
4
+ drop: "Перетащите файл сюда"
5
5
  or: "или"
@@ -1,5 +1,5 @@
1
1
  uk:
2
2
  uploader:
3
3
  button: "Виберіть файл на комп'ютері"
4
- drop: "Перетягніть фотографію сюди"
4
+ drop: "Перетягніть файл сюди"
5
5
  or: "або"
@@ -1,3 +1,3 @@
1
1
  module Uploader
2
- VERSION = "0.0.6".freeze
2
+ VERSION = "0.0.7".freeze
3
3
  end
Binary file
@@ -205,3 +205,72 @@ Started POST "/uploader/attachments" for 127.0.0.1 at 2012-07-08 11:43:37 +0300
205
205
   (90.6ms) DELETE FROM sqlite_sequence where name = 'assets';
206
206
   (79.4ms) DELETE FROM "articles";
207
207
   (79.4ms) DELETE FROM sqlite_sequence where name = 'articles';
208
+ Connecting to database specified by database.yml
209
+  (0.2ms) select sqlite_version(*)
210
+  (125.1ms) CREATE TABLE "schema_migrations" ("version" varchar(255) NOT NULL)
211
+  (0.1ms) PRAGMA index_list("schema_migrations")
212
+  (101.3ms) CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
213
+  (0.1ms) SELECT "schema_migrations"."version" FROM "schema_migrations" 
214
+ Migrating to CreateAssets (20120508093416)
215
+  (0.1ms) begin transaction
216
+  (0.7ms) CREATE 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) 
217
+  (0.1ms) PRAGMA index_list("assets")
218
+  (0.3ms) CREATE INDEX "index_assets_on_assetable_type_and_assetable_id" ON "assets" ("assetable_type", "assetable_id")
219
+  (0.1ms) PRAGMA index_list("assets")
220
+  (0.1ms) PRAGMA index_info('index_assets_on_assetable_type_and_assetable_id')
221
+  (0.3ms) CREATE INDEX "index_assets_on_user_id" ON "assets" ("user_id")
222
+  (0.1ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120508093416')
223
+  (747.5ms) commit transaction
224
+ Migrating to CreateArticles (20120508093830)
225
+  (0.1ms) begin transaction
226
+  (0.6ms) 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
+  (0.2ms) INSERT INTO "schema_migrations" ("version") VALUES ('20120508093830')
228
+  (97.0ms) commit transaction
229
+  (85.8ms) DELETE FROM "assets";
230
+  (0.2ms) DELETE FROM sqlite_sequence where name = 'assets';
231
+  (79.2ms) DELETE FROM "articles";
232
+  (0.2ms) 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
+  (0.1ms) begin transaction
237
+ SQL (2.8ms) 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
+  (90.6ms) commit transaction
239
+  (0.1ms) begin transaction
240
+ SQL (0.7ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["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
+  (88.2ms) commit transaction
242
+  (0.1ms) begin transaction
243
+ SQL (0.6ms) 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
+  (123.4ms) commit transaction
245
+  (0.4ms) 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
+ Picture Load (0.4ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? LIMIT 1 [["id", "2"]]
250
+  (0.1ms) begin transaction
251
+ SQL (0.4ms) DELETE FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? [["id", 2]]
252
+  (96.7ms) commit transaction
253
+  (0.3ms) SELECT COUNT(*) FROM "assets" WHERE "assets"."type" IN ('Picture')
254
+
255
+
256
+ Started POST "/uploader/attachments" for 127.0.0.1 at 2012-09-12 16:41:07 +0300
257
+  (132.3ms) DELETE FROM "assets";
258
+  (201.2ms) DELETE FROM sqlite_sequence where name = 'assets';
259
+  (79.4ms) DELETE FROM "articles";
260
+  (79.6ms) DELETE FROM sqlite_sequence where name = 'articles';
261
+  (0.2ms) begin transaction
262
+ SQL (0.7ms) INSERT INTO "articles" ("content", "created_at", "title", "updated_at") VALUES (?, ?, ?, ?) [["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
+  (99.2ms) commit transaction
264
+  (0.2ms) begin transaction
265
+ SQL (0.6ms) 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
+  (96.2ms) commit transaction
267
+ Picture Load (0.4ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL LIMIT 1
268
+ SQL (97.4ms) UPDATE "assets" SET "assetable_id" = 1000, "guid" = NULL WHERE "assets"."type" IN ('Picture') AND "assets"."guid" IS NULL AND "assets"."assetable_type" = 'Article'
269
+ Picture Load (0.2ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."id" = ? LIMIT 1 [["id", 1]]
270
+ Picture Load (0.4ms) SELECT "assets".* FROM "assets" WHERE "assets"."type" IN ('Picture') AND "assets"."guid" = 'KUq7GeHyu9' LIMIT 1
271
+  (0.1ms) begin transaction
272
+  (0.1ms) commit transaction
273
+  (81.7ms) DELETE FROM "assets";
274
+  (79.3ms) DELETE FROM sqlite_sequence where name = 'assets';
275
+  (79.6ms) DELETE FROM "articles";
276
+  (79.3ms) DELETE FROM sqlite_sequence where name = 'articles';
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.6
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-10 00:00:00.000000000 Z
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