modulate 0.0.4 → 0.0.5
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.
@@ -13,8 +13,8 @@ class ModulateGenerator < Rails::Generators::Base
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def copy_view_files
|
16
|
-
template "_modulate_documents.html.haml", "
|
17
|
-
template "_modulate_attachments.html.haml", "
|
16
|
+
template "_modulate_documents.html.haml", "#{folder_name}s/_modulate_#{partial_name}_documents.html.haml"
|
17
|
+
template "_modulate_attachments.html.haml", "#{folder_name}s/_modulate_attachments.html.haml"
|
18
18
|
end
|
19
19
|
|
20
20
|
def copy_initializer
|
@@ -29,5 +29,24 @@ class ModulateGenerator < Rails::Generators::Base
|
|
29
29
|
File.open(path, 'wb') { |file| file.write(content) }
|
30
30
|
end
|
31
31
|
|
32
|
+
def partial_name
|
33
|
+
name.join("_")
|
34
|
+
end
|
35
|
+
|
36
|
+
def name
|
37
|
+
model_name.downcase.split('::')
|
38
|
+
end
|
39
|
+
|
40
|
+
def folder_name
|
41
|
+
array = name.tap{
|
42
|
+
last = name.last
|
43
|
+
new = last + 's'
|
44
|
+
name.pop
|
45
|
+
name.push new
|
46
|
+
}
|
47
|
+
tail = array.join("/")
|
48
|
+
"app/views/#{tail}"
|
49
|
+
end
|
50
|
+
|
32
51
|
end
|
33
52
|
|
data/lib/modulate/version.rb
CHANGED
@@ -3858,3 +3858,21 @@ Served asset /application.js - 304 Not Modified (1ms)
|
|
3858
3858
|
Connecting to database specified by database.yml
|
3859
3859
|
Connecting to database specified by database.yml
|
3860
3860
|
Connecting to database specified by database.yml
|
3861
|
+
Connecting to database specified by database.yml
|
3862
|
+
Connecting to database specified by database.yml
|
3863
|
+
Connecting to database specified by database.yml
|
3864
|
+
Connecting to database specified by database.yml
|
3865
|
+
Connecting to database specified by database.yml
|
3866
|
+
Connecting to database specified by database.yml
|
3867
|
+
Connecting to database specified by database.yml
|
3868
|
+
Connecting to database specified by database.yml
|
3869
|
+
Connecting to database specified by database.yml
|
3870
|
+
Connecting to database specified by database.yml
|
3871
|
+
Connecting to database specified by database.yml
|
3872
|
+
Connecting to database specified by database.yml
|
3873
|
+
Connecting to database specified by database.yml
|
3874
|
+
Connecting to database specified by database.yml
|
3875
|
+
Connecting to database specified by database.yml
|
3876
|
+
Connecting to database specified by database.yml
|
3877
|
+
Connecting to database specified by database.yml
|
3878
|
+
Connecting to database specified by database.yml
|
data/spec/dummy/log/test.log
CHANGED
@@ -360,3 +360,97 @@ Processing by AccountsController#index as HTML
|
|
360
360
|
[1m[36mAccount Load (0.3ms)[0m [1mSELECT `accounts`.* FROM `accounts` [0m
|
361
361
|
Rendered accounts/index.html.haml within layouts/application (1.2ms)
|
362
362
|
Completed 200 OK in 11ms (Views: 4.7ms | ActiveRecord: 0.3ms)
|
363
|
+
Connecting to database specified by database.yml
|
364
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
365
|
+
[1m[35mSQL (2.1ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 18:25:49', 'test_account', '2013-03-27 18:25:49')
|
366
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
367
|
+
Started GET "/accounts/36" for 127.0.0.1 at 2013-03-27 14:25:49 -0400
|
368
|
+
Processing by AccountsController#show as HTML
|
369
|
+
Parameters: {"id"=>"36"}
|
370
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 36 LIMIT 1
|
371
|
+
Rendered accounts/_modulate_attachments.html.haml (15.8ms)
|
372
|
+
Rendered accounts/show.html.erb within layouts/application (24.8ms)
|
373
|
+
Completed 500 Internal Server Error in 100ms
|
374
|
+
Connecting to database specified by database.yml
|
375
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
376
|
+
[1m[35mSQL (2.2ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 19:26:09', 'test_account', '2013-03-27 19:26:09')
|
377
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
378
|
+
Started GET "/accounts/37" for 127.0.0.1 at 2013-03-27 15:26:09 -0400
|
379
|
+
Processing by AccountsController#show as HTML
|
380
|
+
Parameters: {"id"=>"37"}
|
381
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 37 LIMIT 1
|
382
|
+
Rendered accounts/_modulate_attachments.html.haml (15.6ms)
|
383
|
+
Rendered accounts/show.html.erb within layouts/application (25.6ms)
|
384
|
+
Completed 500 Internal Server Error in 47ms
|
385
|
+
Connecting to database specified by database.yml
|
386
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
387
|
+
[1m[35mSQL (2.2ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 19:26:50', 'test_account', '2013-03-27 19:26:50')
|
388
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
389
|
+
Started GET "/accounts/38" for 127.0.0.1 at 2013-03-27 15:26:51 -0400
|
390
|
+
Processing by AccountsController#show as HTML
|
391
|
+
Parameters: {"id"=>"38"}
|
392
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 38 LIMIT 1
|
393
|
+
Rendered accounts/_modulate_attachments.html.haml (16.2ms)
|
394
|
+
Rendered accounts/show.html.erb within layouts/application (25.6ms)
|
395
|
+
Completed 500 Internal Server Error in 100ms
|
396
|
+
Connecting to database specified by database.yml
|
397
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
398
|
+
[1m[35mSQL (2.4ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 19:27:35', 'test_account', '2013-03-27 19:27:35')
|
399
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
400
|
+
Started GET "/accounts/39" for 127.0.0.1 at 2013-03-27 15:27:35 -0400
|
401
|
+
Processing by AccountsController#show as HTML
|
402
|
+
Parameters: {"id"=>"39"}
|
403
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 39 LIMIT 1
|
404
|
+
Rendered accounts/show.html.erb within layouts/application (16.4ms)
|
405
|
+
Completed 500 Internal Server Error in 90ms
|
406
|
+
Connecting to database specified by database.yml
|
407
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
408
|
+
[1m[35mSQL (2.2ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 19:28:24', 'test_account', '2013-03-27 19:28:24')
|
409
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
410
|
+
Started GET "/accounts/40" for 127.0.0.1 at 2013-03-27 15:28:25 -0400
|
411
|
+
Processing by AccountsController#show as HTML
|
412
|
+
Parameters: {"id"=>"40"}
|
413
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 40 LIMIT 1
|
414
|
+
Rendered accounts/show.html.erb within layouts/application (16.4ms)
|
415
|
+
Completed 500 Internal Server Error in 88ms
|
416
|
+
Connecting to database specified by database.yml
|
417
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
418
|
+
[1m[35mSQL (42.4ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 19:30:24', 'test_account', '2013-03-27 19:30:24')
|
419
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
420
|
+
Started GET "/accounts/41" for 127.0.0.1 at 2013-03-27 15:30:24 -0400
|
421
|
+
Processing by AccountsController#show as HTML
|
422
|
+
Parameters: {"id"=>"41"}
|
423
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 41 LIMIT 1
|
424
|
+
Rendered accounts/_modulate_attachments.html.haml (15.5ms)
|
425
|
+
Rendered accounts/show.html.erb within layouts/application (25.5ms)
|
426
|
+
Completed 500 Internal Server Error in 98ms
|
427
|
+
Connecting to database specified by database.yml
|
428
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
429
|
+
[1m[35mSQL (2.5ms)[0m INSERT INTO `accounts` (`created_at`, `name`, `updated_at`) VALUES ('2013-03-27 19:34:42', 'test_account', '2013-03-27 19:34:42')
|
430
|
+
[1m[36m (0.4ms)[0m [1mCOMMIT[0m
|
431
|
+
Started GET "/accounts/42" for 127.0.0.1 at 2013-03-27 15:34:42 -0400
|
432
|
+
Processing by AccountsController#show as HTML
|
433
|
+
Parameters: {"id"=>"42"}
|
434
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 42 LIMIT 1
|
435
|
+
[1m[36m (0.2ms)[0m [1mSELECT COUNT(*) FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 42 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
436
|
+
Rendered accounts/_modulate_account_documents.html.haml (55.2ms)
|
437
|
+
Rendered accounts/_modulate_attachments.html.haml (315.7ms)
|
438
|
+
Rendered accounts/show.html.erb within layouts/application (325.2ms)
|
439
|
+
Completed 200 OK in 400ms (Views: 391.0ms | ActiveRecord: 3.1ms)
|
440
|
+
Started PUT "/accounts/42" for 127.0.0.1 at 2013-03-27 15:34:43 -0400
|
441
|
+
Processing by AccountsController#update as HTML
|
442
|
+
Parameters: {"utf8"=>"✓", "account"=>{"modulate_documents_attributes"=>[{"attachment"=>#<ActionDispatch::Http::UploadedFile:0x007f9d243926a0 @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/RackMultipart20130327-95496-nsw8h7>>}]}, "button"=>"", "id"=>"42"}
|
443
|
+
[1m[35mAccount Load (0.3ms)[0m SELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 42 LIMIT 1
|
444
|
+
[1m[36mModulate::Document Load (0.3ms)[0m [1mSELECT `modulate_documents`.* FROM `modulate_documents` WHERE `modulate_documents`.`attachable_id` = 42 AND `modulate_documents`.`attachable_type` = 'Account'[0m
|
445
|
+
[1m[35m (0.1ms)[0m BEGIN
|
446
|
+
[1m[36mCACHE (0.0ms)[0m [1mSELECT `accounts`.* FROM `accounts` WHERE `accounts`.`id` = 42 LIMIT 1[0m
|
447
|
+
[1m[35mModulate::Document Exists (0.3ms)[0m SELECT 1 AS one FROM `modulate_documents` WHERE (`modulate_documents`.`key` = BINARY '42-test.txt' AND `modulate_documents`.`bucket` = 'Dummy::Account') LIMIT 1
|
448
|
+
[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 (42, 'Account', 1, '42-test.txt', 'Dummy::Account', 'text/plain', '2013-03-27 19:34:43', 'test.txt', '42-test.txt', NULL, 0, '2013-03-27 19:34:43')[0m
|
449
|
+
[1m[35m (0.5ms)[0m COMMIT
|
450
|
+
Redirected to http://www.example.com/accounts
|
451
|
+
Completed 302 Found in 113ms (ActiveRecord: 1.8ms)
|
452
|
+
Started GET "/accounts" for 127.0.0.1 at 2013-03-27 15:34:43 -0400
|
453
|
+
Processing by AccountsController#index as HTML
|
454
|
+
[1m[36mAccount Load (0.5ms)[0m [1mSELECT `accounts`.* FROM `accounts` [0m
|
455
|
+
Rendered accounts/index.html.haml within layouts/application (1.2ms)
|
456
|
+
Completed 200 OK in 12ms (Views: 4.8ms | ActiveRecord: 0.5ms)
|
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.5
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -191,7 +191,6 @@ files:
|
|
191
191
|
- spec/dummy/app/views/layouts/application.html.erb
|
192
192
|
- spec/dummy/config/application.rb
|
193
193
|
- spec/dummy/config/boot.rb
|
194
|
-
- spec/dummy/config/carrierwave.rb
|
195
194
|
- spec/dummy/config/database.yml
|
196
195
|
- spec/dummy/config/database.yml.example
|
197
196
|
- spec/dummy/config/environment.rb
|
@@ -289,7 +288,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
289
288
|
version: '0'
|
290
289
|
segments:
|
291
290
|
- 0
|
292
|
-
hash: -
|
291
|
+
hash: -2141877784016317984
|
293
292
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
294
293
|
none: false
|
295
294
|
requirements:
|
@@ -298,7 +297,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
298
297
|
version: '0'
|
299
298
|
segments:
|
300
299
|
- 0
|
301
|
-
hash: -
|
300
|
+
hash: -2141877784016317984
|
302
301
|
requirements: []
|
303
302
|
rubyforge_project:
|
304
303
|
rubygems_version: 1.8.24
|
@@ -319,7 +318,6 @@ test_files:
|
|
319
318
|
- spec/dummy/app/views/layouts/application.html.erb
|
320
319
|
- spec/dummy/config/application.rb
|
321
320
|
- spec/dummy/config/boot.rb
|
322
|
-
- spec/dummy/config/carrierwave.rb
|
323
321
|
- spec/dummy/config/database.yml
|
324
322
|
- spec/dummy/config/database.yml.example
|
325
323
|
- spec/dummy/config/environment.rb
|