modulate 0.0.1

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.
Files changed (114) hide show
  1. data/app/controllers/modulate/application_controller.rb +3 -0
  2. data/app/models/modulate/document.rb +39 -0
  3. data/app/uploaders/modulate/document_uploader.rb +5 -0
  4. data/config/routes.rb +5 -0
  5. data/db/migrate/20130320174022_add_modulate_document_table.rb +27 -0
  6. data/lib/generators/modulate/USAGE +8 -0
  7. data/lib/generators/modulate/modulate_generator.rb +33 -0
  8. data/lib/generators/modulate/templates/_carrierwave.rb +5 -0
  9. data/lib/generators/modulate/templates/_modulate_attachments.html.haml +11 -0
  10. data/lib/generators/modulate/templates/_modulate_documents.html.haml +31 -0
  11. data/lib/modulate.rb +20 -0
  12. data/lib/modulate/configuration.rb +10 -0
  13. data/lib/modulate/engine.rb +21 -0
  14. data/lib/modulate/relation.rb +10 -0
  15. data/lib/modulate/version.rb +3 -0
  16. data/lib/tasks/modulate_tasks.rake +4 -0
  17. data/spec/dummy/README.rdoc +261 -0
  18. data/spec/dummy/Rakefile +7 -0
  19. data/spec/dummy/app/assets/javascripts/application.js +15 -0
  20. data/spec/dummy/app/assets/stylesheets/application.css +13 -0
  21. data/spec/dummy/app/controllers/accounts_controller.rb +23 -0
  22. data/spec/dummy/app/controllers/application_controller.rb +3 -0
  23. data/spec/dummy/app/helpers/application_helper.rb +2 -0
  24. data/spec/dummy/app/models/account.rb +5 -0
  25. data/spec/dummy/app/views/accounts/_modulate_account_documents.html.haml +31 -0
  26. data/spec/dummy/app/views/accounts/_modulate_attachments.html.haml +11 -0
  27. data/spec/dummy/app/views/accounts/index.html.haml +0 -0
  28. data/spec/dummy/app/views/accounts/show.html.erb +1 -0
  29. data/spec/dummy/app/views/layouts/application.html.erb +16 -0
  30. data/spec/dummy/config.ru +4 -0
  31. data/spec/dummy/config/application.rb +59 -0
  32. data/spec/dummy/config/boot.rb +10 -0
  33. data/spec/dummy/config/carrierwave.rb +5 -0
  34. data/spec/dummy/config/database.yml +19 -0
  35. data/spec/dummy/config/database.yml.example +19 -0
  36. data/spec/dummy/config/environment.rb +5 -0
  37. data/spec/dummy/config/environments/development.rb +37 -0
  38. data/spec/dummy/config/environments/production.rb +67 -0
  39. data/spec/dummy/config/environments/test.rb +37 -0
  40. data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  41. data/spec/dummy/config/initializers/carrierwave.rb +5 -0
  42. data/spec/dummy/config/initializers/inflections.rb +15 -0
  43. data/spec/dummy/config/initializers/mime_types.rb +5 -0
  44. data/spec/dummy/config/initializers/secret_token.rb +7 -0
  45. data/spec/dummy/config/initializers/session_store.rb +8 -0
  46. data/spec/dummy/config/initializers/wrap_parameters.rb +14 -0
  47. data/spec/dummy/config/locales/en.yml +5 -0
  48. data/spec/dummy/config/routes.rb +6 -0
  49. data/spec/dummy/config/setup_load_paths.rb +13 -0
  50. data/spec/dummy/db/migrate/20130325151020_create_account_table.rb +13 -0
  51. data/spec/dummy/db/migrate/20130326150838_add_modulate_document_table.modulate_engine.rb +28 -0
  52. data/spec/dummy/db/schema.rb +39 -0
  53. data/spec/dummy/log/development.log +3082 -0
  54. data/spec/dummy/log/test.log +158 -0
  55. data/spec/dummy/public/404.html +26 -0
  56. data/spec/dummy/public/422.html +26 -0
  57. data/spec/dummy/public/500.html +25 -0
  58. data/spec/dummy/public/favicon.ico +0 -0
  59. data/spec/dummy/public/uploads/tmp/20130325-1326-99529-7743/test.txt +1 -0
  60. data/spec/dummy/public/uploads/tmp/20130325-1339-356-7432/test.txt +1 -0
  61. data/spec/dummy/public/uploads/tmp/20130325-1346-523-3336/test.txt +1 -0
  62. data/spec/dummy/public/uploads/tmp/20130325-1356-749-8446/test.txt +1 -0
  63. data/spec/dummy/public/uploads/tmp/20130325-1400-850-1252/test.txt +1 -0
  64. data/spec/dummy/public/uploads/tmp/20130325-1415-1419-1757/test.txt +1 -0
  65. data/spec/dummy/public/uploads/tmp/20130325-1907-5106-0607/test.txt +1 -0
  66. data/spec/dummy/public/uploads/tmp/20130325-1911-5106-7321/test.txt +1 -0
  67. data/spec/dummy/public/uploads/tmp/20130325-1912-5106-9847/test.txt +1 -0
  68. data/spec/dummy/public/uploads/tmp/20130325-1921-5966-2686/test.txt +1 -0
  69. data/spec/dummy/public/uploads/tmp/20130325-1921-5993-4088/test.txt +1 -0
  70. data/spec/dummy/public/uploads/tmp/20130325-1925-6117-8582/test.txt +1 -0
  71. data/spec/dummy/public/uploads/tmp/20130325-1925-6144-5138/test.txt +1 -0
  72. data/spec/dummy/public/uploads/tmp/20130325-1927-6226-6892/cheat_sheet.txt +45 -0
  73. data/spec/dummy/public/uploads/tmp/20130325-1929-6226-5235/cheat_sheet.txt +45 -0
  74. data/spec/dummy/public/uploads/tmp/20130325-1929-6229-8925/cheat_sheet.txt +45 -0
  75. data/spec/dummy/public/uploads/tmp/20130325-1929-6258-0126/cheat_sheet.txt +45 -0
  76. data/spec/dummy/public/uploads/tmp/20130325-1930-6203-2358/cheat_sheet.txt +45 -0
  77. data/spec/dummy/public/uploads/tmp/20130325-1930-6226-1942/cheat_sheet.txt +45 -0
  78. data/spec/dummy/public/uploads/tmp/20130325-1930-6226-6311/cheat_sheet.txt +45 -0
  79. data/spec/dummy/public/uploads/tmp/20130325-1931-6258-4650/cheat_sheet.txt +45 -0
  80. data/spec/dummy/public/uploads/tmp/20130325-1932-6229-3505/cheat_sheet.txt +45 -0
  81. data/spec/dummy/public/uploads/tmp/20130325-1959-6759-5643/test.txt +1 -0
  82. data/spec/dummy/public/uploads/tmp/20130325-2000-6796-5968/test.txt +1 -0
  83. data/spec/dummy/public/uploads/tmp/20130325-2011-7688-7128/cheat_sheet.txt +45 -0
  84. data/spec/dummy/public/uploads/tmp/20130326-1409-11412-4323/test.txt +1 -0
  85. data/spec/dummy/public/uploads/tmp/20130326-1410-11453-4835/test.txt +1 -0
  86. data/spec/dummy/public/uploads/tmp/20130326-1411-11541-3107/test.txt +1 -0
  87. data/spec/dummy/script/rails +6 -0
  88. data/spec/dummy/tmp/cache/assets/CD8/370/sprockets%2F357970feca3ac29060c1e3861e2c0953 +0 -0
  89. data/spec/dummy/tmp/cache/assets/CE1/F20/sprockets%2F27802e706f9b4a4cb47f23279b8ef112 +0 -0
  90. data/spec/dummy/tmp/cache/assets/D32/A10/sprockets%2F13fe41fee1fe35b49d145bcc06610705 +0 -0
  91. data/spec/dummy/tmp/cache/assets/D4E/1B0/sprockets%2Ff7cbd26ba1d28d48de824f0e94586655 +0 -0
  92. data/spec/dummy/tmp/cache/assets/D5A/EA0/sprockets%2Fd771ace226fc8215a3572e0aa35bb0d6 +0 -0
  93. data/spec/dummy/tmp/cache/assets/D8B/5A0/sprockets%2Fd3f389f822beaa012aea0e1608a7a72c +0 -0
  94. data/spec/dummy/tmp/cache/assets/D9F/9E0/sprockets%2Ffa7ea1d234b86f62fd44bcd872e804f0 +0 -0
  95. data/spec/dummy/tmp/cache/assets/DDC/400/sprockets%2Fcffd775d018f68ce5dba1ee0d951a994 +0 -0
  96. data/spec/dummy/tmp/cache/assets/E04/890/sprockets%2F2f5173deea6c795b8fdde723bb4b63af +0 -0
  97. data/spec/dummy/tmp/cache/assets/E46/F00/sprockets%2Fef28af54ec693affaad6788eac6597af +0 -0
  98. data/spec/dummy/tmp/capybara/capybara-20130325113329863132478.html +15 -0
  99. data/spec/dummy/tmp/capybara/capybara-201303251136086016711973.html +43 -0
  100. data/spec/dummy/tmp/capybara/capybara-2013032511414321142326.html +43 -0
  101. data/spec/dummy/tmp/capybara/capybara-20130325114349437448737.html +43 -0
  102. data/spec/dummy/tmp/capybara/capybara-201303251145079289531432.html +43 -0
  103. data/spec/dummy/tmp/capybara/capybara-201303251146231982487841.html +43 -0
  104. data/spec/dummy/tmp/capybara/capybara-201303251501229219755210.html +43 -0
  105. data/spec/dummy/tmp/capybara/capybara-201303251504055386888420.html +43 -0
  106. data/spec/dummy/tmp/restart.txt +0 -0
  107. data/spec/factories/account_factory.rb +6 -0
  108. data/spec/features/modulate_spec.rb +14 -0
  109. data/spec/fixtures/test.txt +1 -0
  110. data/spec/modulate/configuration_spec.rb +34 -0
  111. data/spec/modulate/relation_spec.rb +40 -0
  112. data/spec/modulate_spec.rb +55 -0
  113. data/spec/spec_helper.rb +22 -0
  114. metadata +405 -0
@@ -0,0 +1,158 @@
1
+ Connecting to database specified by database.yml
2
+  (0.1ms) BEGIN
3
+ SQL (2.2ms) INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-26 17:26:18', 'test_account', '2013-03-26 17:26:18')
4
+  (0.4ms) COMMIT
5
+ Started GET "/accounts/23" for 127.0.0.1 at 2013-03-26 13:26:18 -0400
6
+ Processing by AccountsController#show as HTML
7
+ Parameters: {"id"=>"23"}
8
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 23 LIMIT 1
9
+  (0.2ms) SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 23 AND `modulate_documents`.`attachable_type` = 'Account'
10
+ Rendered accounts/_modulate_account_documents.html.haml (53.3ms)
11
+ Rendered accounts/_modulate_attachments.html.haml (268.8ms)
12
+ Rendered accounts/show.html.erb within layouts/application (278.1ms)
13
+ Completed 200 OK in 350ms (Views: 341.1ms | ActiveRecord: 3.2ms)
14
+ Started PUT "/accounts/23" for 127.0.0.1 at 2013-03-26 13:26:19 -0400
15
+ Processing by AccountsController#update as HTML
16
+ Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>{"0"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007fa763e79228 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][0][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130326-17537-nlw9bh>>}}}, "button"=>"", "id"=>"23"}
17
+ Account Load (0.4ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 23 LIMIT 1
18
+ Modulate::Document Load (0.4ms) SELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 23 AND `modulate_documents`.`attachable_type` = 'Account'
19
+  (0.1ms) BEGIN
20
+ CACHE (0.0ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 23 LIMIT 1
21
+ Modulate::Document Exists (0.4ms) SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '23-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
22
+ SQL (0.3ms) INSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (23, 'Account', 1, '23-test.txt', 'Dummy::Account', 'text/plain', '2013-03-26 17:26:19', 'test.txt', '23-test.txt', NULL, 0, '2013-03-26 17:26:19')
23
+  (0.4ms) COMMIT
24
+ Redirected to http://www.example.com/accounts
25
+ Completed 302 Found in 63ms (ActiveRecord: 2.0ms)
26
+ Started GET "/accounts" for 127.0.0.1 at 2013-03-26 13:26:19 -0400
27
+ Processing by AccountsController#index as HTML
28
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` 
29
+ Rendered accounts/index.html.haml within layouts/application (1.2ms)
30
+ Completed 200 OK in 9ms (Views: 4.6ms | ActiveRecord: 0.3ms)
31
+ Connecting to database specified by database.yml
32
+  (0.1ms) BEGIN
33
+ SQL (2.2ms) INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-26 17:38:44', 'test_account', '2013-03-26 17:38:44')
34
+  (0.4ms) COMMIT
35
+ Started GET "/accounts/24" for 127.0.0.1 at 2013-03-26 13:38:44 -0400
36
+ Processing by AccountsController#show as HTML
37
+ Parameters: {"id"=>"24"}
38
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 24 LIMIT 1
39
+  (0.2ms) SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 24 AND `modulate_documents`.`attachable_type` = 'Account'
40
+ Rendered accounts/_modulate_account_documents.html.haml (52.0ms)
41
+ Rendered accounts/_modulate_attachments.html.haml (267.5ms)
42
+ Rendered accounts/show.html.erb within layouts/application (322.4ms)
43
+ Completed 200 OK in 347ms (Views: 338.1ms | ActiveRecord: 3.0ms)
44
+ Started PUT "/accounts/24" for 127.0.0.1 at 2013-03-26 13:38:45 -0400
45
+ Processing by AccountsController#update as HTML
46
+ Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>{"0"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007fd9432789f8 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][0][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130326-17989-1c6i14c>>}}}, "button"=>"", "id"=>"24"}
47
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 24 LIMIT 1
48
+ Modulate::Document Load (0.3ms) SELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 24 AND `modulate_documents`.`attachable_type` = 'Account'
49
+  (0.1ms) BEGIN
50
+ CACHE (0.0ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 24 LIMIT 1
51
+ Modulate::Document Exists (0.3ms) SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '24-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
52
+ SQL (0.3ms) INSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (24, 'Account', 1, '24-test.txt', 'Dummy::Account', 'text/plain', '2013-03-26 17:38:45', 'test.txt', '24-test.txt', NULL, 0, '2013-03-26 17:38:45')
53
+  (0.5ms) COMMIT
54
+ Redirected to http://www.example.com/accounts
55
+ Completed 302 Found in 61ms (ActiveRecord: 1.8ms)
56
+ Started GET "/accounts" for 127.0.0.1 at 2013-03-26 13:38:45 -0400
57
+ Processing by AccountsController#index as HTML
58
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` 
59
+ Rendered accounts/index.html.haml within layouts/application (1.2ms)
60
+ Completed 200 OK in 9ms (Views: 4.5ms | ActiveRecord: 0.3ms)
61
+ Connecting to database specified by database.yml
62
+  (0.7ms) BEGIN
63
+ SQL (2.2ms) INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-26 17:50:33', 'test_account', '2013-03-26 17:50:33')
64
+  (0.4ms) COMMIT
65
+ Started GET "/accounts/25" for 127.0.0.1 at 2013-03-26 13:50:33 -0400
66
+ Processing by AccountsController#show as HTML
67
+ Parameters: {"id"=>"25"}
68
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 25 LIMIT 1
69
+  (0.2ms) SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 25 AND `modulate_documents`.`attachable_type` = 'Account'
70
+ Rendered accounts/_modulate_account_documents.html.haml (97.0ms)
71
+ Rendered accounts/_modulate_attachments.html.haml (270.0ms)
72
+ Rendered accounts/show.html.erb within layouts/application (278.9ms)
73
+ Completed 200 OK in 303ms (Views: 294.5ms | ActiveRecord: 2.9ms)
74
+ Started PUT "/accounts/25" for 127.0.0.1 at 2013-03-26 13:50:34 -0400
75
+ Processing by AccountsController#update as HTML
76
+ Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>{"0"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007f8a9ea67360 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][0][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130326-18453-i1ucao>>}}}, "button"=>"", "id"=>"25"}
77
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 25 LIMIT 1
78
+ Modulate::Document Load (0.3ms) SELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 25 AND `modulate_documents`.`attachable_type` = 'Account'
79
+  (0.1ms) BEGIN
80
+ CACHE (0.0ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 25 LIMIT 1
81
+ Modulate::Document Exists (0.4ms) SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '25-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
82
+ SQL (0.3ms) INSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (25, 'Account', 1, '25-test.txt', 'Dummy::Account', 'text/plain', '2013-03-26 17:50:34', 'test.txt', '25-test.txt', NULL, 0, '2013-03-26 17:50:34')
83
+  (0.5ms) COMMIT
84
+ Redirected to http://www.example.com/accounts
85
+ Completed 302 Found in 124ms (ActiveRecord: 1.8ms)
86
+ Started GET "/accounts" for 127.0.0.1 at 2013-03-26 13:50:34 -0400
87
+ Processing by AccountsController#index as HTML
88
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` 
89
+ Rendered accounts/index.html.haml within layouts/application (1.2ms)
90
+ Completed 200 OK in 10ms (Views: 4.6ms | ActiveRecord: 0.3ms)
91
+ Connecting to database specified by database.yml
92
+  (0.1ms) BEGIN
93
+ SQL (2.1ms) INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-26 17:51:51', 'test_account', '2013-03-26 17:51:51')
94
+  (0.5ms) COMMIT
95
+ Started GET "/accounts/26" for 127.0.0.1 at 2013-03-26 13:51:51 -0400
96
+ Processing by AccountsController#show as HTML
97
+ Parameters: {"id"=>"26"}
98
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 26 LIMIT 1
99
+  (0.2ms) SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 26 AND `modulate_documents`.`attachable_type` = 'Account'
100
+ Rendered accounts/_modulate_account_documents.html.haml (98.3ms)
101
+ Rendered accounts/_modulate_attachments.html.haml (267.0ms)
102
+ Rendered accounts/show.html.erb within layouts/application (275.9ms)
103
+ Completed 200 OK in 350ms (Views: 341.3ms | ActiveRecord: 3.1ms)
104
+ Started PUT "/accounts/26" for 127.0.0.1 at 2013-03-26 13:51:51 -0400
105
+ Processing by AccountsController#update as HTML
106
+ Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>{"0"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007f9f5e983140 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][0][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130326-18545-sc8ey6>>}}}, "button"=>"", "id"=>"26"}
107
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 26 LIMIT 1
108
+ Modulate::Document Load (0.3ms) SELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 26 AND `modulate_documents`.`attachable_type` = 'Account'
109
+  (0.1ms) BEGIN
110
+ CACHE (0.0ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 26 LIMIT 1
111
+ Modulate::Document Exists (0.4ms) SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '26-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
112
+ SQL (0.3ms) INSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (26, 'Account', 1, '26-test.txt', 'Dummy::Account', 'text/plain', '2013-03-26 17:51:51', 'test.txt', '26-test.txt', NULL, 0, '2013-03-26 17:51:51')
113
+  (0.4ms) COMMIT
114
+ Redirected to http://www.example.com/accounts
115
+ Completed 302 Found in 108ms (ActiveRecord: 1.8ms)
116
+ Started GET "/accounts" for 127.0.0.1 at 2013-03-26 13:51:51 -0400
117
+ Processing by AccountsController#index as HTML
118
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` 
119
+ Rendered accounts/index.html.haml within layouts/application (1.2ms)
120
+ Completed 200 OK in 10ms (Views: 4.7ms | ActiveRecord: 0.3ms)
121
+ Connecting to database specified by database.yml
122
+ Connecting to database specified by database.yml
123
+ Connecting to database specified by database.yml
124
+ Connecting to database specified by database.yml
125
+ Connecting to database specified by database.yml
126
+ Connecting to database specified by database.yml
127
+ Connecting to database specified by database.yml
128
+ Connecting to database specified by database.yml
129
+ Connecting to database specified by database.yml
130
+  (0.1ms) BEGIN
131
+ SQL (2.2ms) INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-26 18:34:34', 'test_account', '2013-03-26 18:34:34')
132
+  (0.4ms) COMMIT
133
+ Started GET "/accounts/27" for 127.0.0.1 at 2013-03-26 14:34:34 -0400
134
+ Processing by AccountsController#show as HTML
135
+ Parameters: {"id"=>"27"}
136
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 27 LIMIT 1
137
+  (0.2ms) SELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 27 AND `modulate_documents`.`attachable_type` = 'Account'
138
+ Rendered accounts/_modulate_account_documents.html.haml (65.1ms)
139
+ Rendered accounts/_modulate_attachments.html.haml (284.1ms)
140
+ Rendered accounts/show.html.erb within layouts/application (294.0ms)
141
+ Completed 200 OK in 372ms (Views: 362.5ms | ActiveRecord: 3.1ms)
142
+ Started PUT "/accounts/27" for 127.0.0.1 at 2013-03-26 14:34:35 -0400
143
+ Processing by AccountsController#update as HTML
144
+ Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>{"0"=>{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007f82d48043d8 @original_filename="test.txt", @content_type="text/plain", @headers="Content-Disposition: form-data; name=\"account[modulate_documents_attributes][0][attachment]\"; filename=\"test.txt\"\r\nContent-Type: text/plain\r\nContent-Length: 25\r\n", @tempfile=#<File:/var/folders/lb/j1c12jc524zfb75l84v94qr40000gn/T/RackMultipart20130326-22488-1d3741l>>}}}, "button"=>"", "id"=>"27"}
145
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 27 LIMIT 1
146
+ Modulate::Document Load (0.3ms) SELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 27 AND `modulate_documents`.`attachable_type` = 'Account'
147
+  (0.1ms) BEGIN
148
+ CACHE (0.0ms) SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 27 LIMIT 1
149
+ Modulate::Document Exists (0.3ms) SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '27-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
150
+ SQL (0.3ms) INSERT INTO `modulate_documents` (`attachable_id`, `attachable_type`, `attached_by_id`, `attachment`, `bucket`, `content_type`, `created_at`, `filename`, `key`, `label`, `public`, `updated_at`) VALUES (27, 'Account', 1, '27-test.txt', 'Dummy::Account', 'text/plain', '2013-03-26 18:34:35', 'test.txt', '27-test.txt', NULL, 0, '2013-03-26 18:34:35')
151
+  (0.5ms) COMMIT
152
+ Redirected to http://www.example.com/accounts
153
+ Completed 302 Found in 121ms (ActiveRecord: 1.7ms)
154
+ Started GET "/accounts" for 127.0.0.1 at 2013-03-26 14:34:35 -0400
155
+ Processing by AccountsController#index as HTML
156
+ Account Load (0.3ms) SELECT `accounts`.* FROM `accounts` 
157
+ Rendered accounts/index.html.haml within layouts/application (1.2ms)
158
+ Completed 200 OK in 10ms (Views: 4.7ms | ActiveRecord: 0.3ms)
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1 @@
1
+ This is a test document.
@@ -0,0 +1,45 @@
1
+ ######## CHEAT SHEET #########
2
+ ######## RSPEC ##############
3
+ describe "group of related ideas" do
4
+ describe "idea" do
5
+ it "works as I expect"
6
+ it "handles any special cases"
7
+ it "handles errors/failures gracefully"
8
+
9
+ ######### VIM #################
10
+
11
+ T - back to whatever character you type
12
+ F back on whatever character you type
13
+ c - change character(s) without entering insert mode
14
+ dd - delete line
15
+ A - append to end of line
16
+ a - append to end of word
17
+ o - new line here
18
+ O - new line below
19
+ Shift-V - visual mode (BLOCK)
20
+ CTRL -V - visual mode (chunk)
21
+ v - visual mode
22
+ x - delete selection
23
+ == - auto indent selection
24
+ = auto indent line
25
+ ~ change case
26
+ b - beginning of word
27
+ B - beginning of sentence
28
+ ysiw" - wrap in quotes
29
+ ciw - change inside word
30
+ r - replace character
31
+
32
+
33
+
34
+ yip - copy line
35
+ viw - view inside word
36
+ csXY - change surrounding current(x) with (y)
37
+ zz - jump up
38
+ zt - jump way up
39
+
40
+
41
+
42
+
43
+ RACK APPS
44
+ config.ru *+(rack up)
45
+ composed of middle wares
@@ -0,0 +1,45 @@
1
+ ######## CHEAT SHEET #########
2
+ ######## RSPEC ##############
3
+ describe "group of related ideas" do
4
+ describe "idea" do
5
+ it "works as I expect"
6
+ it "handles any special cases"
7
+ it "handles errors/failures gracefully"
8
+
9
+ ######### VIM #################
10
+
11
+ T - back to whatever character you type
12
+ F back on whatever character you type
13
+ c - change character(s) without entering insert mode
14
+ dd - delete line
15
+ A - append to end of line
16
+ a - append to end of word
17
+ o - new line here
18
+ O - new line below
19
+ Shift-V - visual mode (BLOCK)
20
+ CTRL -V - visual mode (chunk)
21
+ v - visual mode
22
+ x - delete selection
23
+ == - auto indent selection
24
+ = auto indent line
25
+ ~ change case
26
+ b - beginning of word
27
+ B - beginning of sentence
28
+ ysiw" - wrap in quotes
29
+ ciw - change inside word
30
+ r - replace character
31
+
32
+
33
+
34
+ yip - copy line
35
+ viw - view inside word
36
+ csXY - change surrounding current(x) with (y)
37
+ zz - jump up
38
+ zt - jump way up
39
+
40
+
41
+
42
+
43
+ RACK APPS
44
+ config.ru *+(rack up)
45
+ composed of middle wares
@@ -0,0 +1,45 @@
1
+ ######## CHEAT SHEET #########
2
+ ######## RSPEC ##############
3
+ describe "group of related ideas" do
4
+ describe "idea" do
5
+ it "works as I expect"
6
+ it "handles any special cases"
7
+ it "handles errors/failures gracefully"
8
+
9
+ ######### VIM #################
10
+
11
+ T - back to whatever character you type
12
+ F back on whatever character you type
13
+ c - change character(s) without entering insert mode
14
+ dd - delete line
15
+ A - append to end of line
16
+ a - append to end of word
17
+ o - new line here
18
+ O - new line below
19
+ Shift-V - visual mode (BLOCK)
20
+ CTRL -V - visual mode (chunk)
21
+ v - visual mode
22
+ x - delete selection
23
+ == - auto indent selection
24
+ = auto indent line
25
+ ~ change case
26
+ b - beginning of word
27
+ B - beginning of sentence
28
+ ysiw" - wrap in quotes
29
+ ciw - change inside word
30
+ r - replace character
31
+
32
+
33
+
34
+ yip - copy line
35
+ viw - view inside word
36
+ csXY - change surrounding current(x) with (y)
37
+ zz - jump up
38
+ zt - jump way up
39
+
40
+
41
+
42
+
43
+ RACK APPS
44
+ config.ru *+(rack up)
45
+ composed of middle wares
@@ -0,0 +1,45 @@
1
+ ######## CHEAT SHEET #########
2
+ ######## RSPEC ##############
3
+ describe "group of related ideas" do
4
+ describe "idea" do
5
+ it "works as I expect"
6
+ it "handles any special cases"
7
+ it "handles errors/failures gracefully"
8
+
9
+ ######### VIM #################
10
+
11
+ T - back to whatever character you type
12
+ F back on whatever character you type
13
+ c - change character(s) without entering insert mode
14
+ dd - delete line
15
+ A - append to end of line
16
+ a - append to end of word
17
+ o - new line here
18
+ O - new line below
19
+ Shift-V - visual mode (BLOCK)
20
+ CTRL -V - visual mode (chunk)
21
+ v - visual mode
22
+ x - delete selection
23
+ == - auto indent selection
24
+ = auto indent line
25
+ ~ change case
26
+ b - beginning of word
27
+ B - beginning of sentence
28
+ ysiw" - wrap in quotes
29
+ ciw - change inside word
30
+ r - replace character
31
+
32
+
33
+
34
+ yip - copy line
35
+ viw - view inside word
36
+ csXY - change surrounding current(x) with (y)
37
+ zz - jump up
38
+ zt - jump way up
39
+
40
+
41
+
42
+
43
+ RACK APPS
44
+ config.ru *+(rack up)
45
+ composed of middle wares