saphira 0.1.0.beta2 → 0.1.0.beta3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -14,16 +14,22 @@ Features
14
14
 
15
15
  To-Do
16
16
  -----
17
- * Link for file download
18
- * Manage authorizations
17
+ * Image manipulation
18
+ * A form helper for image cropping
19
+ * Multiple named image versions
19
20
  * WebDav access
20
21
  * Search files
21
22
 
22
23
  Requirements
23
24
  ------------
24
- * Rails 3.1.x
25
- * Some gems - check Gemfile
25
+ * [Rails 3.1.x](http://rubyonrails.org/)
26
+ * [dragonfly](https://github.com/markevans/dragonfly/): A Ruby Rack-based gem for on-the-fly processing - suitable for image uploading in Rails, Sinatra and much more!
27
+ * [awesome\_nested\_set](https://github.com/collectiveidea/awesome_nested_set): An awesome replacement for acts\_as\_nested\_set and better\_nested\_set.
28
+ * [exifr](https://github.com/remvee/exifr/): EXIF Reader
29
+ * [friendly_id](https://github.com/norman/friendly_id): It allows you to create pretty URL’s and work with human-friendly strings as if they were numeric ids for ActiveRecord models.
30
+ * [acts-as-taggable-on](https://github.com/mbleigh/acts-as-taggable-on): A tagging plugin for Rails applications that allows for custom tagging along dynamic contexts.
31
+ * _And some more gems in development mode_
26
32
 
27
33
  Installation
28
34
  ------------
29
- Add the gem to your gemfile: `gem 'saphira', :git => 'git://github.com/spieker/saphira.git'` and add `mount Saphira::Engine => "/saphira", :as => 'saphira'` to your `routes.rb` file to mount the engine. The file manager should be available at `http://localhost:3000/saphira` then.
35
+ Add the gem to your gemfile: `gem 'saphira', '~> 0.1.0.beta2'` and add `mount Saphira::Engine => "/saphira", :as => 'saphira'` to your `routes.rb` file to mount the engine. The file manager should be available at `http://localhost:3000/saphira` then.
@@ -8,7 +8,7 @@ module Saphira
8
8
 
9
9
  respond_to do |format|
10
10
  format.html # index.html.erb
11
- format.json { render json: @file_items }
11
+ format.json { render :json => @file_items }
12
12
  end
13
13
  end
14
14
 
@@ -27,7 +27,7 @@ module Saphira
27
27
  render
28
28
  end
29
29
  end
30
- format.json { render json: @file_item }
30
+ format.json { render :json => @file_item }
31
31
  end
32
32
  end
33
33
 
@@ -40,7 +40,7 @@ module Saphira
40
40
 
41
41
  respond_to do |format|
42
42
  format.html { render :action => "new_#{@file_item.item_type}" }
43
- format.json { render json: @file_item }
43
+ format.json { render :json => @file_item }
44
44
  end
45
45
  end
46
46
 
@@ -50,7 +50,7 @@ module Saphira
50
50
 
51
51
  respond_to do |format|
52
52
  format.html { render :action => "edit_#{@file_item.item_type}" }
53
- format.json { render json: @file_item }
53
+ format.json { render :json => @file_item }
54
54
  end
55
55
  end
56
56
 
@@ -61,11 +61,11 @@ module Saphira
61
61
 
62
62
  respond_to do |format|
63
63
  if @file_item.save
64
- format.html { redirect_to @file_item, notice: 'File item was successfully created.' }
65
- format.json { render json: @file_item, status: :created, location: @file_item }
64
+ format.html { redirect_to @file_item, :notice => 'File item was successfully created.' }
65
+ format.json { render :json => @file_item, :status => :created, :location => @file_item }
66
66
  else
67
- format.html { render action: "new_#{@file_item.item_type}" }
68
- format.json { render json: @file_item.errors, status: :unprocessable_entity }
67
+ format.html { render :action => "new_#{@file_item.item_type}" }
68
+ format.json { render :json => @file_item.errors, :status => :unprocessable_entity }
69
69
  end
70
70
  end
71
71
  end
@@ -77,11 +77,11 @@ module Saphira
77
77
 
78
78
  respond_to do |format|
79
79
  if @file_item.update_attributes(params[:file_item])
80
- format.html { redirect_to @file_item, notice: 'File item was successfully updated.' }
80
+ format.html { redirect_to @file_item, :notice => 'File item was successfully updated.' }
81
81
  format.json { head :ok }
82
82
  else
83
- format.html { render action: "edit_#{@file_item.item_type}" }
84
- format.json { render json: @file_item.errors, status: :unprocessable_entity }
83
+ format.html { render :action => "edit_#{@file_item.item_type}" }
84
+ format.json { render :json => @file_item.errors, :status => :unprocessable_entity }
85
85
  end
86
86
  end
87
87
  end
@@ -14,7 +14,7 @@
14
14
  <td><%= link_to image_tag('saphira/icons/32x32/'+file_item.item_type+'.png'), file_item %></td>
15
15
  <td><%= link_to file_item.name, file_item %></td>
16
16
  <td><%= file_item.file.mime_type if file_item.file %></td>
17
- <td class="actions"><%= link_to 'Destroy', file_item, confirm: 'Are you sure?', method: :delete, id: "saphira-action-destroy-#{file_item.slug}" %></td>
17
+ <td class="actions"><%= link_to 'Destroy', file_item, :confirm => 'Are you sure?', :method => :delete, :id => "saphira-action-destroy-#{file_item.slug}" %></td>
18
18
  </tr>
19
19
  <% end %>
20
20
  </table>
@@ -1,3 +1,3 @@
1
1
  module Saphira
2
- VERSION = "0.1.0.beta2"
2
+ VERSION = "0.1.0.beta3"
3
3
  end
@@ -5,7 +5,7 @@
5
5
 
6
6
  # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
7
  ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json]
8
+ wrap_parameters :format => [:json]
9
9
  end
10
10
 
11
11
  # Disable root element in JSON by default.
@@ -497,3 +497,140 @@ Started GET "/admin/saphira/files/my-first-image" for 127.0.0.1 at 2011-09-05 09
497
497
  Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."id" IS NULL LIMIT 1
498
498
  Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/show.html.erb within layouts/saphira/application (18.3ms)
499
499
  Completed 200 OK in 24ms (Views: 21.0ms | ActiveRecord: 0.9ms)
500
+
501
+
502
+ Started GET "/admin/saphira/files" for 127.0.0.1 at 2011-09-06 17:27:53 +0200
503
+ Processing by Saphira::FileItemsController#index as HTML
504
+ Saphira::FileItem Load (0.9ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL
505
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/index.html.erb within layouts/saphira/application (83.3ms)
506
+ Completed 200 OK in 171ms (Views: 154.9ms | ActiveRecord: 1.1ms)
507
+
508
+
509
+ Started GET "/admin/saphira/files/new?type=folder" for 127.0.0.1 at 2011-09-06 17:27:53 +0200
510
+ Processing by Saphira::FileItemsController#new as HTML
511
+ Parameters: {"type"=>"folder"}
512
+ ActsAsTaggableOn::Tag Load (0.6ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" IS NULL AND "taggings"."taggable_type" = 'Saphira::FileItem' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
513
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/_form.html.erb (245.0ms)
514
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/new_folder.html.erb within layouts/saphira/application (262.6ms)
515
+ Completed 200 OK in 265ms (Views: 263.4ms | ActiveRecord: 1.0ms)
516
+
517
+
518
+ Started POST "/admin/saphira/files" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
519
+ Processing by Saphira::FileItemsController#create as HTML
520
+ Parameters: {"utf8"=>"✓", "file_item"=>{"name"=>"My first folder", "tag_list"=>"", "item_type"=>"folder", "parent_id"=>""}, "commit"=>"Create"}
521
+  (0.1ms) SAVEPOINT active_record_1
522
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL AND ("slug" = 'my-first-folder' OR "slug" LIKE 'my-first-folder--%') ORDER BY LENGTH("slug") DESC, "slug" DESC LIMIT 1
523
+  (0.1ms) SELECT 1 FROM "saphira_file_items" WHERE ("saphira_file_items"."name" = 'My first folder' AND "saphira_file_items"."parent_id" IS NULL) LIMIT 1
524
+  (0.5ms) SELECT MAX("saphira_file_items"."rgt") AS max_id FROM "saphira_file_items"
525
+ SQL (9.0ms) INSERT INTO "saphira_file_items" ("created_at", "dynamic_attributes", "file_name", "file_uid", "item_type", "lft", "name", "parent_id", "path", "rgt", "slug", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["dynamic_attributes", "--- \n"], ["file_name", nil], ["file_uid", nil], ["item_type", "folder"], ["lft", 1], ["name", "My first folder"], ["parent_id", nil], ["path", "my-first-folder"], ["rgt", 2], ["slug", "my-first-folder"], ["updated_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00]]
526
+ ActsAsTaggableOn::Tag Load (0.2ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
527
+ ActsAsTaggableOn::Tagging Load (0.1ms) SELECT "taggings".* FROM "taggings" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND "taggings"."tagger_type" IS NULL AND "taggings"."tagger_id" IS NULL AND "taggings"."context" = 'tags' AND "taggings"."tag_id" IN (NULL)
528
+  (0.1ms) RELEASE SAVEPOINT active_record_1
529
+ Redirected to http://www.example.com/admin/saphira/files/my-first-folder
530
+ Completed 302 Found in 253ms
531
+
532
+
533
+ Started GET "/admin/saphira/files/my-first-folder" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
534
+ Processing by Saphira::FileItemsController#show as HTML
535
+ Parameters: {"id"=>"my-first-folder"}
536
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."path" = 'my-first-folder' LIMIT 1
537
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."id" IS NULL LIMIT 1
538
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" = 1 ORDER BY "lft"
539
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/index.html.erb within layouts/saphira/application (20.5ms)
540
+ Completed 200 OK in 23ms (Views: 21.3ms | ActiveRecord: 0.5ms)
541
+  (0.0ms) SAVEPOINT active_record_1
542
+ Saphira::FileItem Load (0.3ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL AND ("slug" = 'my-first-folder' OR "slug" LIKE 'my-first-folder--%') ORDER BY LENGTH("slug") DESC, "slug" DESC LIMIT 1
543
+  (0.1ms) SELECT 1 FROM "saphira_file_items" WHERE ("saphira_file_items"."name" = 'My first folder' AND "saphira_file_items"."parent_id" IS NULL) LIMIT 1
544
+  (0.1ms) SELECT MAX("saphira_file_items"."rgt") AS max_id FROM "saphira_file_items" 
545
+ SQL (1.2ms) INSERT INTO "saphira_file_items" ("created_at", "dynamic_attributes", "file_name", "file_uid", "item_type", "lft", "name", "parent_id", "path", "rgt", "slug", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["dynamic_attributes", "--- \n"], ["file_name", nil], ["file_uid", nil], ["item_type", "folder"], ["lft", 1], ["name", "My first folder"], ["parent_id", nil], ["path", "my-first-folder"], ["rgt", 2], ["slug", "my-first-folder"], ["updated_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00]]
546
+  (0.1ms) RELEASE SAVEPOINT active_record_1
547
+  (0.0ms) SAVEPOINT active_record_1
548
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL AND ("slug" = 'my-second-folder' OR "slug" LIKE 'my-second-folder--%') ORDER BY LENGTH("slug") DESC, "slug" DESC LIMIT 1
549
+  (0.1ms) SELECT 1 FROM "saphira_file_items" WHERE ("saphira_file_items"."name" = 'My second folder' AND "saphira_file_items"."parent_id" IS NULL) LIMIT 1
550
+  (0.1ms) SELECT MAX("saphira_file_items"."rgt") AS max_id FROM "saphira_file_items" 
551
+ SQL (0.7ms) INSERT INTO "saphira_file_items" ("created_at", "dynamic_attributes", "file_name", "file_uid", "item_type", "lft", "name", "parent_id", "path", "rgt", "slug", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["dynamic_attributes", "--- \n"], ["file_name", nil], ["file_uid", nil], ["item_type", "folder"], ["lft", 3], ["name", "My second folder"], ["parent_id", nil], ["path", "my-second-folder"], ["rgt", 4], ["slug", "my-second-folder"], ["updated_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00]]
552
+  (0.1ms) RELEASE SAVEPOINT active_record_1
553
+
554
+
555
+ Started GET "/admin/saphira/files" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
556
+ Processing by Saphira::FileItemsController#index as HTML
557
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL
558
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/index.html.erb within layouts/saphira/application (70.5ms)
559
+ Completed 200 OK in 73ms (Views: 71.7ms | ActiveRecord: 0.2ms)
560
+
561
+
562
+ Started DELETE "/admin/saphira/files/my-first-folder" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
563
+ Processing by Saphira::FileItemsController#destroy as HTML
564
+ Parameters: {"id"=>"my-first-folder"}
565
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."path" = 'my-first-folder' LIMIT 1
566
+  (0.0ms) SAVEPOINT active_record_1
567
+ SQL (0.1ms) DELETE FROM "saphira_file_items" WHERE ("lft" > 1 AND "rgt" < 2)
568
+ SQL (0.2ms) UPDATE "saphira_file_items" SET "lft" = ("lft" - 2) WHERE "saphira_file_items"."id" IN (SELECT "saphira_file_items"."id" FROM "saphira_file_items" WHERE ("lft" > 2) ORDER BY "lft")
569
+ SQL (0.1ms) UPDATE "saphira_file_items" SET "rgt" = ("rgt" - 2) WHERE "saphira_file_items"."id" IN (SELECT "saphira_file_items"."id" FROM "saphira_file_items" WHERE ("rgt" > 2) ORDER BY "lft")
570
+ ActsAsTaggableOn::Tagging Load (0.1ms) SELECT "taggings".* FROM "taggings" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem'
571
+ SQL (0.2ms) SELECT "taggings"."id" AS t0_r0, "taggings"."tag_id" AS t0_r1, "taggings"."taggable_id" AS t0_r2, "taggings"."taggable_type" AS t0_r3, "taggings"."tagger_id" AS t0_r4, "taggings"."tagger_type" AS t0_r5, "taggings"."context" AS t0_r6, "taggings"."created_at" AS t0_r7, "tags"."id" AS t1_r0, "tags"."name" AS t1_r1 FROM "taggings" LEFT OUTER JOIN "tags" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND (taggings.tag_id = tags.id AND taggings.context = 'tags')
572
+ SQL (0.2ms) DELETE FROM "saphira_file_items" WHERE "saphira_file_items"."id" = ? [["id", 1]]
573
+  (0.1ms) RELEASE SAVEPOINT active_record_1
574
+ Redirected to http://www.example.com/admin/saphira/files
575
+ Completed 302 Found in 23ms
576
+
577
+
578
+ Started GET "/admin/saphira/files" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
579
+ Processing by Saphira::FileItemsController#index as HTML
580
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL
581
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/index.html.erb within layouts/saphira/application (4.9ms)
582
+ Completed 200 OK in 7ms (Views: 6.1ms | ActiveRecord: 0.2ms)
583
+
584
+
585
+ Started GET "/admin/saphira/files" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
586
+ Processing by Saphira::FileItemsController#index as HTML
587
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL
588
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/index.html.erb within layouts/saphira/application (1.3ms)
589
+ Completed 200 OK in 4ms (Views: 2.4ms | ActiveRecord: 0.2ms)
590
+
591
+
592
+ Started GET "/admin/saphira/files/new?type=file" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
593
+ Processing by Saphira::FileItemsController#new as HTML
594
+ Parameters: {"type"=>"file"}
595
+ ActsAsTaggableOn::Tag Load (0.2ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" IS NULL AND "taggings"."taggable_type" = 'Saphira::FileItem' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
596
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/_form.html.erb (5.0ms)
597
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/new_file.html.erb within layouts/saphira/application (6.3ms)
598
+ Completed 200 OK in 9ms (Views: 7.9ms | ActiveRecord: 0.2ms)
599
+
600
+
601
+ Started POST "/admin/saphira/files" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
602
+ Processing by Saphira::FileItemsController#create as HTML
603
+ Parameters: {"utf8"=>"✓", "file_item"=>{"name"=>"My first image", "file"=>#<ActionDispatch::Http::UploadedFile:0x000001009b3218 @original_filename="eos-550d-wrong-orientation.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"file_item[file]\"; filename=\"eos-550d-wrong-orientation.jpg\"\r\nContent-Type: image/jpeg\r\nContent-Length: 77008\r\n", @tempfile=#<File:/var/folders/j5/j5YeT6owHCOVwWrGfycQx++++TI/-Tmp-/RackMultipart20110906-51442-1oocr6l>>, "tag_list"=>"Trash, Orange, Berlin", "item_type"=>"file", "parent_id"=>""}, "commit"=>"Create"}
604
+  (0.2ms) SAVEPOINT active_record_1
605
+ Saphira::FileItem Load (0.3ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."parent_id" IS NULL AND ("slug" = 'my-first-image' OR "slug" LIKE 'my-first-image--%') ORDER BY LENGTH("slug") DESC, "slug" DESC LIMIT 1
606
+  (0.1ms) SELECT 1 FROM "saphira_file_items" WHERE ("saphira_file_items"."name" = 'My first image' AND "saphira_file_items"."parent_id" IS NULL) LIMIT 1
607
+  (0.4ms) SELECT MAX("saphira_file_items"."rgt") AS max_id FROM "saphira_file_items"
608
+ SQL (1.4ms) INSERT INTO "saphira_file_items" ("created_at", "dynamic_attributes", "file_name", "file_uid", "item_type", "lft", "name", "parent_id", "path", "rgt", "slug", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["dynamic_attributes", "--- \n:field_image_capture_date: 2011-08-26 14:04:10 +02:00\n:field_image_exposure_time: !ruby/object:Rational \n denominator: 40\n numerator: 1\n:field_image_f_number: !ruby/object:Rational \n denominator: 1\n numerator: 10\n:field_image_make: Canon\n:field_image_model: Canon EOS 550D\n:field_image_orientation: 8\n:field_image_orientation_transformed: true\n"], ["file_name", "eos-550d-wrong-orientation.jpg"], ["file_uid", "2011/09/06/17_27_54_786_eos_550d_wrong_orientation.jpg"], ["item_type", "file"], ["lft", 1], ["name", "My first image"], ["parent_id", nil], ["path", "my-first-image"], ["rgt", 2], ["slug", "my-first-image"], ["updated_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00]]
609
+ ActsAsTaggableOn::Tag Load (0.2ms) SELECT "tags".* FROM "tags" WHERE (name LIKE 'Trash' OR name LIKE 'Orange' OR name LIKE 'Berlin')
610
+  (0.1ms) SELECT 1 FROM "tags" WHERE "tags"."name" = 'Trash' LIMIT 1
611
+ SQL (0.2ms) INSERT INTO "tags" ("name") VALUES (?) [["name", "Trash"]]
612
+  (0.1ms) SELECT 1 FROM "tags" WHERE "tags"."name" = 'Orange' LIMIT 1
613
+ SQL (0.0ms) INSERT INTO "tags" ("name") VALUES (?) [["name", "Orange"]]
614
+  (0.1ms) SELECT 1 FROM "tags" WHERE "tags"."name" = 'Berlin' LIMIT 1
615
+ SQL (0.0ms) INSERT INTO "tags" ("name") VALUES (?) [["name", "Berlin"]]
616
+ ActsAsTaggableOn::Tag Load (0.2ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
617
+ ActsAsTaggableOn::Tagging Load (0.1ms) SELECT "taggings".* FROM "taggings" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND "taggings"."tagger_type" IS NULL AND "taggings"."tagger_id" IS NULL AND "taggings"."context" = 'tags' AND "taggings"."tag_id" IN (NULL)
618
+  (0.2ms) SELECT 1 FROM "taggings" WHERE ("taggings"."tag_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND "taggings"."taggable_id" = 1 AND "taggings"."context" = 'tags' AND "taggings"."tagger_id" IS NULL AND "taggings"."tagger_type" IS NULL) LIMIT 1
619
+ SQL (1.0ms) INSERT INTO "taggings" ("context", "created_at", "tag_id", "taggable_id", "taggable_type", "tagger_id", "tagger_type") VALUES (?, ?, ?, ?, ?, ?, ?) [["context", "tags"], ["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["tag_id", 1], ["taggable_id", 1], ["taggable_type", "Saphira::FileItem"], ["tagger_id", nil], ["tagger_type", nil]]
620
+  (0.5ms) SELECT 1 FROM "taggings" WHERE ("taggings"."tag_id" = 2 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND "taggings"."taggable_id" = 1 AND "taggings"."context" = 'tags' AND "taggings"."tagger_id" IS NULL AND "taggings"."tagger_type" IS NULL) LIMIT 1
621
+ SQL (0.8ms) INSERT INTO "taggings" ("context", "created_at", "tag_id", "taggable_id", "taggable_type", "tagger_id", "tagger_type") VALUES (?, ?, ?, ?, ?, ?, ?) [["context", "tags"], ["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["tag_id", 2], ["taggable_id", 1], ["taggable_type", "Saphira::FileItem"], ["tagger_id", nil], ["tagger_type", nil]]
622
+  (0.2ms) SELECT 1 FROM "taggings" WHERE ("taggings"."tag_id" = 3 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND "taggings"."taggable_id" = 1 AND "taggings"."context" = 'tags' AND "taggings"."tagger_id" IS NULL AND "taggings"."tagger_type" IS NULL) LIMIT 1
623
+ SQL (1.0ms) INSERT INTO "taggings" ("context", "created_at", "tag_id", "taggable_id", "taggable_type", "tagger_id", "tagger_type") VALUES (?, ?, ?, ?, ?, ?, ?) [["context", "tags"], ["created_at", Tue, 06 Sep 2011 15:27:54 UTC +00:00], ["tag_id", 3], ["taggable_id", 1], ["taggable_type", "Saphira::FileItem"], ["tagger_id", nil], ["tagger_type", nil]]
624
+  (0.2ms) RELEASE SAVEPOINT active_record_1
625
+ Redirected to http://www.example.com/admin/saphira/files/my-first-image
626
+ Completed 302 Found in 283ms
627
+
628
+
629
+ Started GET "/admin/saphira/files/my-first-image" for 127.0.0.1 at 2011-09-06 17:27:54 +0200
630
+ Processing by Saphira::FileItemsController#show as HTML
631
+ Parameters: {"id"=>"my-first-image"}
632
+ Saphira::FileItem Load (0.3ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."path" = 'my-first-image' LIMIT 1
633
+ ActsAsTaggableOn::Tag Load (0.2ms) SELECT "tags".* FROM "tags" INNER JOIN "taggings" ON "tags"."id" = "taggings"."tag_id" WHERE "taggings"."taggable_id" = 1 AND "taggings"."taggable_type" = 'Saphira::FileItem' AND (taggings.context = 'tags' AND taggings.tagger_id IS NULL)
634
+ Saphira::FileItem Load (0.2ms) SELECT "saphira_file_items".* FROM "saphira_file_items" WHERE "saphira_file_items"."id" IS NULL LIMIT 1
635
+ Rendered /Users/spieker/Sites/gems-projects/saphira/app/views/saphira/file_items/show.html.erb within layouts/saphira/application (19.7ms)
636
+ Completed 200 OK in 25ms (Views: 22.0ms | ActiveRecord: 0.7ms)
@@ -0,0 +1 @@
1
+ {: nameI"#eos-550d-wrong-orientation.jpg:ET:model_classI"Saphira::FileItem;F:model_attachment: file
@@ -19,30 +19,30 @@ module Saphira
19
19
 
20
20
  test "should create file_item" do
21
21
  assert_difference('FileItem.count') do
22
- post :create, file_item: @file_item.attributes
22
+ post :create, :file_item => @file_item.attributes
23
23
  end
24
24
 
25
25
  assert_redirected_to file_item_path(assigns(:file_item))
26
26
  end
27
27
 
28
28
  test "should show file_item" do
29
- get :show, id: @file_item.to_param
29
+ get :show, :id => @file_item.to_param
30
30
  assert_response :success
31
31
  end
32
32
 
33
33
  test "should get edit" do
34
- get :edit, id: @file_item.to_param
34
+ get :edit, :id => @file_item.to_param
35
35
  assert_response :success
36
36
  end
37
37
 
38
38
  test "should update file_item" do
39
- put :update, id: @file_item.to_param, file_item: @file_item.attributes
39
+ put :update, :id => @file_item.to_param, :file_item => @file_item.attributes
40
40
  assert_redirected_to file_item_path(assigns(:file_item))
41
41
  end
42
42
 
43
43
  test "should destroy file_item" do
44
44
  assert_difference('FileItem.count', -1) do
45
- delete :destroy, id: @file_item.to_param
45
+ delete :destroy, :id => @file_item.to_param
46
46
  end
47
47
 
48
48
  assert_redirected_to file_items_path
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: saphira
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease: 6
5
- version: 0.1.0.beta2
5
+ version: 0.1.0.beta3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Paul Spieker
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-09-05 00:00:00 Z
13
+ date: 2011-09-06 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -363,6 +363,8 @@ files:
363
363
  - test/dummy/system/files/test/2011/09/04/20_14_52_22_eos_550d_wrong_orientation.jpg.meta
364
364
  - test/dummy/system/files/test/2011/09/05/09_42_46_972_eos_550d_wrong_orientation.jpg
365
365
  - test/dummy/system/files/test/2011/09/05/09_42_46_972_eos_550d_wrong_orientation.jpg.meta
366
+ - test/dummy/system/files/test/2011/09/06/17_27_54_786_eos_550d_wrong_orientation.jpg
367
+ - test/dummy/system/files/test/2011/09/06/17_27_54_786_eos_550d_wrong_orientation.jpg.meta
366
368
  - test/dummy/tmp/cache/assets/C54/230/sprockets%2F63597bd80af49501176a9c782c200818
367
369
  - test/dummy/tmp/cache/assets/C8A/C90/sprockets%2Fb0034d98e259fe21084231df778476e5
368
370
  - test/dummy/tmp/cache/assets/CBB/220/sprockets%2Fe50398a56291b292932098dbaf6f60e7
@@ -476,6 +478,8 @@ test_files:
476
478
  - test/dummy/system/files/test/2011/09/04/20_14_52_22_eos_550d_wrong_orientation.jpg.meta
477
479
  - test/dummy/system/files/test/2011/09/05/09_42_46_972_eos_550d_wrong_orientation.jpg
478
480
  - test/dummy/system/files/test/2011/09/05/09_42_46_972_eos_550d_wrong_orientation.jpg.meta
481
+ - test/dummy/system/files/test/2011/09/06/17_27_54_786_eos_550d_wrong_orientation.jpg
482
+ - test/dummy/system/files/test/2011/09/06/17_27_54_786_eos_550d_wrong_orientation.jpg.meta
479
483
  - test/dummy/tmp/cache/assets/C54/230/sprockets%2F63597bd80af49501176a9c782c200818
480
484
  - test/dummy/tmp/cache/assets/C8A/C90/sprockets%2Fb0034d98e259fe21084231df778476e5
481
485
  - test/dummy/tmp/cache/assets/CBB/220/sprockets%2Fe50398a56291b292932098dbaf6f60e7