modulate 0.0.6 → 0.0.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/app/controllers/modulate/documents_controller.rb +15 -0
- data/app/views/modulate/documents/show.html.haml +0 -0
- data/config/routes.rb +3 -1
- data/db/migrate/20130320174022_add_modulate_document_table.rb +1 -1
- data/lib/modulate/version.rb +1 -1
- data/spec/dummy/log/development.log +64 -0
- data/spec/dummy/log/test.log +61 -0
- metadata +6 -4
@@ -0,0 +1,15 @@
|
|
1
|
+
class Modulate::DocumentsController < Modulate::ApplicationController
|
2
|
+
|
3
|
+
def destroy
|
4
|
+
@doc = Modulate::Document.find(params[:id])
|
5
|
+
if @doc.destroy
|
6
|
+
redirect_to :back
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
def show
|
11
|
+
@doc = Modulate::Document.find(params[:id])
|
12
|
+
@file = Modulate::DocumentUploader.new.retrieve_from_store!(@doc.key)
|
13
|
+
redirect_to :back
|
14
|
+
end
|
15
|
+
end
|
File without changes
|
data/config/routes.rb
CHANGED
data/lib/modulate/version.rb
CHANGED
@@ -3876,3 +3876,67 @@ Connecting to database specified by database.yml
|
|
3876
3876
|
Connecting to database specified by database.yml
|
3877
3877
|
Connecting to database specified by database.yml
|
3878
3878
|
Connecting to database specified by database.yml
|
3879
|
+
Connecting to database specified by database.yml
|
3880
|
+
Connecting to database specified by database.yml
|
3881
|
+
Connecting to database specified by database.yml
|
3882
|
+
Connecting to database specified by database.yml
|
3883
|
+
Connecting to database specified by database.yml
|
3884
|
+
Connecting to database specified by database.yml
|
3885
|
+
Connecting to database specified by database.yml
|
3886
|
+
|
3887
|
+
|
3888
|
+
Started GET "/accounts/1" for 127.0.0.1 at 2013-03-28 14:10:01 -0400
|
3889
|
+
Processing by AccountsController#show as HTML
|
3890
|
+
Parameters: {"id"=>"1"}
|
3891
|
+
[1m[36mAccount Load (0.3ms)[0m [1mSELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 1 LIMIT 1[0m
|
3892
|
+
[1m[35m (0.4ms)[0m SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 1 AND `modulate_documents`.`attachable_type` = 'Account'
|
3893
|
+
[1m[36mModulate::Document Load (0.3ms)[0m [1mSELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 1 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
3894
|
+
Rendered accounts/_modulate_account_documents.html.haml (266.0ms)
|
3895
|
+
Rendered accounts/_modulate_attachments.html.haml (378.0ms)
|
3896
|
+
Rendered accounts/show.html.erb within layouts/application (387.7ms)
|
3897
|
+
Completed 200 OK in 536ms (Views: 414.7ms | ActiveRecord: 74.9ms)
|
3898
|
+
|
3899
|
+
|
3900
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-03-28 14:10:02 -0400
|
3901
|
+
Served asset /application.css - 304 Not Modified (8ms)
|
3902
|
+
|
3903
|
+
|
3904
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-03-28 14:10:02 -0400
|
3905
|
+
Served asset /application.js - 304 Not Modified (9ms)
|
3906
|
+
|
3907
|
+
|
3908
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2013-03-28 14:10:02 -0400
|
3909
|
+
Served asset /jquery.js - 304 Not Modified (7ms)
|
3910
|
+
|
3911
|
+
|
3912
|
+
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2013-03-28 14:10:02 -0400
|
3913
|
+
Served asset /jquery_ujs.js - 304 Not Modified (7ms)
|
3914
|
+
Connecting to database specified by database.yml
|
3915
|
+
|
3916
|
+
|
3917
|
+
Started GET "/accounts/1" for 127.0.0.1 at 2013-04-01 08:51:39 -0400
|
3918
|
+
Processing by AccountsController#show as HTML
|
3919
|
+
Parameters: {"id"=>"1"}
|
3920
|
+
[1m[36mAccount Load (0.4ms)[0m [1mSELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 1 LIMIT 1[0m
|
3921
|
+
[1m[35m (0.3ms)[0m SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 1 AND `modulate_documents`.`attachable_type` = 'Account'
|
3922
|
+
[1m[36mModulate::Document Load (0.3ms)[0m [1mSELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 1 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
3923
|
+
Rendered accounts/_modulate_account_documents.html.haml (303.9ms)
|
3924
|
+
Rendered accounts/_modulate_attachments.html.haml (446.2ms)
|
3925
|
+
Rendered accounts/show.html.erb within layouts/application (481.7ms)
|
3926
|
+
Completed 200 OK in 764ms (Views: 577.8ms | ActiveRecord: 81.3ms)
|
3927
|
+
|
3928
|
+
|
3929
|
+
Started GET "/assets/application.css?body=1" for 127.0.0.1 at 2013-04-01 08:51:40 -0400
|
3930
|
+
Served asset /application.css - 200 OK (3ms)
|
3931
|
+
|
3932
|
+
|
3933
|
+
Started GET "/assets/jquery.js?body=1" for 127.0.0.1 at 2013-04-01 08:51:40 -0400
|
3934
|
+
Served asset /jquery.js - 200 OK (16ms)
|
3935
|
+
|
3936
|
+
|
3937
|
+
Started GET "/assets/jquery_ujs.js?body=1" for 127.0.0.1 at 2013-04-01 08:51:41 -0400
|
3938
|
+
|
3939
|
+
|
3940
|
+
Started GET "/assets/application.js?body=1" for 127.0.0.1 at 2013-04-01 08:51:41 -0400
|
3941
|
+
Served asset /jquery_ujs.js - 200 OK (7ms)
|
3942
|
+
Served asset /application.js - 200 OK (9ms)
|
data/spec/dummy/log/test.log
CHANGED
@@ -454,3 +454,64 @@ Processing by AccountsController#index as HTML
|
|
454
454
|
[1m[36mAccount Load (0.5ms)[0m [1mSELECT `accounts`.* FROM `accounts` [0m
|
455
455
|
Rendered accounts/index.html.haml within layouts/application (1.2ms)
|
456
456
|
Completed 200 OK in 12ms (Views: 4.8ms | ActiveRecord: 0.5ms)
|
457
|
+
Connecting to database specified by database.yml
|
458
|
+
Connecting to database specified by database.yml
|
459
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
460
|
+
[1m[35mSQL (2.7ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-28 13:00:33', 'test_account', '2013-03-28 13:00:33')
|
461
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
462
|
+
Started GET "/accounts/43" for 127.0.0.1 at 2013-03-28 09:00:33 -0400
|
463
|
+
Processing by AccountsController#show as HTML
|
464
|
+
Parameters: {"id"=>"43"}
|
465
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 43 LIMIT 1
|
466
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 43 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
467
|
+
Rendered accounts/_modulate_account_documents.html.haml (59.3ms)
|
468
|
+
Rendered accounts/_modulate_attachments.html.haml (324.1ms)
|
469
|
+
Rendered accounts/show.html.erb within layouts/application (333.0ms)
|
470
|
+
Completed 200 OK in 410ms (Views: 399.7ms | ActiveRecord: 3.0ms)
|
471
|
+
Started PUT "/accounts/43" for 127.0.0.1 at 2013-03-28 09:00:34 -0400
|
472
|
+
Processing by AccountsController#update as HTML
|
473
|
+
Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>[{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007fc5a3ce9918 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130328-1289-18uob9e>>}]}, "button"=>"", "id"=>"43"}
|
474
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 43 LIMIT 1
|
475
|
+
[1m[36mModulate::Document Load (0.3ms)[0m [1mSELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 43 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
476
|
+
[1m[35m (0.1ms)[0m BEGIN
|
477
|
+
[1m[36mCACHE (0.0ms)[0m [1mSELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 43 LIMIT 1[0m
|
478
|
+
[1m[35mModulate::Document Exists (0.4ms)[0m SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '43-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
|
479
|
+
[1m[36mSQL (0.3ms)[0m [1mINSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (43, 'Account', 1, '43-test.txt', 'Dummy::Account', 'text/plain', '2013-03-28 13:00:34', 'test.txt', '43-test.txt', NULL, 0, '2013-03-28 13:00:34')[0m
|
480
|
+
[1m[35m (0.5ms)[0m COMMIT
|
481
|
+
Redirected to http://www.example.com/accounts
|
482
|
+
Completed 302 Found in 152ms (ActiveRecord: 1.8ms)
|
483
|
+
Started GET "/accounts" for 127.0.0.1 at 2013-03-28 09:00:34 -0400
|
484
|
+
Processing by AccountsController#index as HTML
|
485
|
+
[1m[36mAccount Load (0.3ms)[0m [1mSELECT `accounts`.* FROM `accounts` [0m
|
486
|
+
Rendered accounts/index.html.haml within layouts/application (1.2ms)
|
487
|
+
Completed 200 OK in 12ms (Views: 4.8ms | ActiveRecord: 0.3ms)
|
488
|
+
Connecting to database specified by database.yml
|
489
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
490
|
+
[1m[35mSQL (2.7ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-28 15:19:55', 'test_account', '2013-03-28 15:19:55')
|
491
|
+
[1m[36m (0.3ms)[0m [1mCOMMIT[0m
|
492
|
+
Started GET "/accounts/44" for 127.0.0.1 at 2013-03-28 11:19:56 -0400
|
493
|
+
Processing by AccountsController#show as HTML
|
494
|
+
Parameters: {"id"=>"44"}
|
495
|
+
[1m[35mAccount Load (0.4ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 44 LIMIT 1
|
496
|
+
[1m[36m (0.3ms)[0m [1mSELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 44 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
497
|
+
Rendered accounts/_modulate_account_documents.html.haml (210.8ms)
|
498
|
+
Rendered accounts/_modulate_attachments.html.haml (532.5ms)
|
499
|
+
Rendered accounts/show.html.erb within layouts/application (560.1ms)
|
500
|
+
Completed 200 OK in 634ms (Views: 586.1ms | ActiveRecord: 31.3ms)
|
501
|
+
Started PUT "/accounts/44" for 127.0.0.1 at 2013-03-28 11:19:57 -0400
|
502
|
+
Processing by AccountsController#update as HTML
|
503
|
+
Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>[{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007f9d1b745670 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130328-3766-p3ojnh>>}]}, "button"=>"", "id"=>"44"}
|
504
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 44 LIMIT 1
|
505
|
+
[1m[36mModulate::Document Load (0.4ms)[0m [1mSELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 44 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
506
|
+
[1m[35m (0.1ms)[0m BEGIN
|
507
|
+
[1m[36mCACHE (0.0ms)[0m [1mSELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 44 LIMIT 1[0m
|
508
|
+
[1m[35mModulate::Document Exists (0.4ms)[0m SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '44-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
|
509
|
+
[1m[36mSQL (0.4ms)[0m [1mINSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (44, 'Account', 1, '44-test.txt', 'Dummy::Account', 'text/plain', '2013-03-28 15:19:57', 'test.txt', '44-test.txt', NULL, 0, '2013-03-28 15:19:57')[0m
|
510
|
+
[1m[35m (0.5ms)[0m COMMIT
|
511
|
+
Redirected to http://www.example.com/accounts
|
512
|
+
Completed 302 Found in 162ms (ActiveRecord: 2.1ms)
|
513
|
+
Started GET "/accounts" for 127.0.0.1 at 2013-03-28 11:19:57 -0400
|
514
|
+
Processing by AccountsController#index as HTML
|
515
|
+
[1m[36mAccount Load (0.4ms)[0m [1mSELECT `accounts`.* FROM `accounts` [0m
|
516
|
+
Rendered accounts/index.html.haml within layouts/application (1.4ms)
|
517
|
+
Completed 200 OK in 14ms (Views: 5.6ms | ActiveRecord: 0.4ms)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: modulate
|
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:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-01 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: carrierwave-riak
|
@@ -163,8 +163,10 @@ extensions: []
|
|
163
163
|
extra_rdoc_files: []
|
164
164
|
files:
|
165
165
|
- app/controllers/modulate/application_controller.rb
|
166
|
+
- app/controllers/modulate/documents_controller.rb
|
166
167
|
- app/models/modulate/document.rb
|
167
168
|
- app/uploaders/modulate/document_uploader.rb
|
169
|
+
- app/views/modulate/documents/show.html.haml
|
168
170
|
- config/routes.rb
|
169
171
|
- db/migrate/20130320174022_add_modulate_document_table.rb
|
170
172
|
- lib/generators/modulate/modulate_generator.rb
|
@@ -288,7 +290,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
288
290
|
version: '0'
|
289
291
|
segments:
|
290
292
|
- 0
|
291
|
-
hash:
|
293
|
+
hash: 3555518139713941680
|
292
294
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
293
295
|
none: false
|
294
296
|
requirements:
|
@@ -297,7 +299,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
297
299
|
version: '0'
|
298
300
|
segments:
|
299
301
|
- 0
|
300
|
-
hash:
|
302
|
+
hash: 3555518139713941680
|
301
303
|
requirements: []
|
302
304
|
rubyforge_project:
|
303
305
|
rubygems_version: 1.8.24
|