tuning 4.0.0.0 → 4.0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tuning/extensions/action_controller/base.rb +3 -3
- data/lib/tuning/version.rb +1 -1
- data/test/controller_test.rb +6 -5
- data/test/dummy/log/test.log +210 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f615d7bee220d2e737c62f490014355a735d3601
|
4
|
+
data.tar.gz: 031b70becc717928cf38a9dbb395d9fd8bc78452
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 88604ee11076f360b92f5cadb0aa36119ec014745593518471c2df211bee9736417606a72f6951fe221580e6069b138ffe31e2d01df4a2062ac3918567737ebe
|
7
|
+
data.tar.gz: f4b4f8a7051d677f7a102ed86e4de51726fa483a23577f9840c687a7ca66dee1caea4b3120578bdd8c103352f56c7bf1097b95ea5a0490a05124094c9a59f319
|
@@ -18,19 +18,19 @@ module Tuning
|
|
18
18
|
|
19
19
|
%i(before after around).each do |callback|
|
20
20
|
define_method "#{callback}_render" do |*names, &block|
|
21
|
-
_insert_callbacks(
|
21
|
+
_insert_callbacks(names, block) do |name, options|
|
22
22
|
set_callback :render, callback, name, options
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
26
26
|
define_method "prepend_#{callback}_render" do |*names, &block|
|
27
|
-
_insert_callbacks(
|
27
|
+
_insert_callbacks(names, block) do |name, options|
|
28
28
|
set_callback :render, callback, name, options.merge(prepend: true)
|
29
29
|
end
|
30
30
|
end
|
31
31
|
|
32
32
|
define_method "skip_#{callback}_render" do |*names|
|
33
|
-
_insert_callbacks(
|
33
|
+
_insert_callbacks(names) do |name, options|
|
34
34
|
skip_callback :render, callback, name, options
|
35
35
|
end
|
36
36
|
end
|
data/lib/tuning/version.rb
CHANGED
data/test/controller_test.rb
CHANGED
@@ -10,11 +10,12 @@ class ControllerTest < ActiveSupport::TestCase
|
|
10
10
|
|
11
11
|
test 'callbacks' do
|
12
12
|
controller = ActionController::Base
|
13
|
-
%
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
13
|
+
%w(before after around).each do |callback|
|
14
|
+
['', 'append_', 'prepend_', 'skip_'].each do |prefix|
|
15
|
+
assert_nothing_raised do
|
16
|
+
controller.send "#{prefix}#{callback}_render", :foo
|
17
|
+
end
|
18
|
+
end
|
18
19
|
end
|
19
20
|
end
|
20
21
|
|
data/test/dummy/log/test.log
CHANGED
@@ -436,3 +436,213 @@ ValidationsTest: test_count
|
|
436
436
|
ValidationsTest: test_time
|
437
437
|
--------------------------
|
438
438
|
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
439
|
+
[1m[36mActiveRecord::SchemaMigration Load (27.9ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
440
|
+
[1m[35m (0.2ms)[0m BEGIN
|
441
|
+
--------------------------
|
442
|
+
ValidationTest: test_count
|
443
|
+
--------------------------
|
444
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
445
|
+
[1m[35m (0.1ms)[0m BEGIN
|
446
|
+
-------------------------
|
447
|
+
ValidationTest: test_time
|
448
|
+
-------------------------
|
449
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
450
|
+
[1m[35m (0.1ms)[0m BEGIN
|
451
|
+
-------------------------------
|
452
|
+
ValidationTest: test_complexity
|
453
|
+
-------------------------------
|
454
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
455
|
+
[1m[35m (0.1ms)[0m BEGIN
|
456
|
+
----------------------------
|
457
|
+
ValidationTest: test_methods
|
458
|
+
----------------------------
|
459
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
460
|
+
[1m[35m (0.1ms)[0m BEGIN
|
461
|
+
-----------------------------
|
462
|
+
HelperTest: test_active_trail
|
463
|
+
-----------------------------
|
464
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
465
|
+
[1m[35m (0.2ms)[0m BEGIN
|
466
|
+
-------------------------------
|
467
|
+
HelperTest: test_content_tag_if
|
468
|
+
-------------------------------
|
469
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
470
|
+
[1m[35m (0.1ms)[0m BEGIN
|
471
|
+
--------------------------
|
472
|
+
HelperTest: test_extending
|
473
|
+
--------------------------
|
474
|
+
Rendered layouts/application.html.erb (0.2ms)
|
475
|
+
Rendered layouts/market.html.erb (7.3ms)
|
476
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
477
|
+
[1m[35m (0.1ms)[0m BEGIN
|
478
|
+
------------------------------
|
479
|
+
MailerTest: test_normalization
|
480
|
+
------------------------------
|
481
|
+
Rendered user_mailer/invite.text.erb (0.3ms)
|
482
|
+
|
483
|
+
UserMailer#invite: processed outbound mail in 10.7ms
|
484
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
485
|
+
[1m[35m (0.1ms)[0m BEGIN
|
486
|
+
------------------------------
|
487
|
+
ControllerTest: test_callbacks
|
488
|
+
------------------------------
|
489
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
490
|
+
[1m[35m (0.1ms)[0m BEGIN
|
491
|
+
---------------------------
|
492
|
+
ControllerTest: test_render
|
493
|
+
---------------------------
|
494
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
495
|
+
[1m[35m (0.1ms)[0m BEGIN
|
496
|
+
------------------------------
|
497
|
+
RecordTest: test_nilify_blanks
|
498
|
+
------------------------------
|
499
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
500
|
+
[1m[35mSQL (25.2ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-12-08 04:42:27.671953"], ["updated_at", "2016-12-08 04:42:27.671953"]]
|
501
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
502
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 3]]
|
503
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
504
|
+
[1m[35m (0.1ms)[0m BEGIN
|
505
|
+
-------------------------
|
506
|
+
RecordTest: test_validate
|
507
|
+
-------------------------
|
508
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
509
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
510
|
+
[1m[35m (0.3ms)[0m BEGIN
|
511
|
+
-------------------------
|
512
|
+
RecordTest: test_validate
|
513
|
+
-------------------------
|
514
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
515
|
+
[1m[35m (0.1ms)[0m BEGIN
|
516
|
+
------------------------------
|
517
|
+
RecordTest: test_nilify_blanks
|
518
|
+
------------------------------
|
519
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
520
|
+
[1m[35mSQL (0.3ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-12-08 04:42:36.802936"], ["updated_at", "2016-12-08 04:42:36.802936"]]
|
521
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
522
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 4]]
|
523
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
524
|
+
[1m[35m (0.1ms)[0m BEGIN
|
525
|
+
-------------------------------
|
526
|
+
ValidationTest: test_complexity
|
527
|
+
-------------------------------
|
528
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
529
|
+
[1m[35m (0.2ms)[0m BEGIN
|
530
|
+
----------------------------
|
531
|
+
ValidationTest: test_methods
|
532
|
+
----------------------------
|
533
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
534
|
+
[1m[35m (0.1ms)[0m BEGIN
|
535
|
+
-------------------------
|
536
|
+
ValidationTest: test_time
|
537
|
+
-------------------------
|
538
|
+
[1m[36m (0.3ms)[0m [1mROLLBACK[0m
|
539
|
+
[1m[35m (0.1ms)[0m BEGIN
|
540
|
+
--------------------------
|
541
|
+
ValidationTest: test_count
|
542
|
+
--------------------------
|
543
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
544
|
+
[1m[35m (0.1ms)[0m BEGIN
|
545
|
+
------------------------------
|
546
|
+
MailerTest: test_normalization
|
547
|
+
------------------------------
|
548
|
+
Rendered user_mailer/invite.text.erb (0.9ms)
|
549
|
+
|
550
|
+
UserMailer#invite: processed outbound mail in 12.5ms
|
551
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
552
|
+
[1m[35m (0.1ms)[0m BEGIN
|
553
|
+
-----------------------------
|
554
|
+
HelperTest: test_active_trail
|
555
|
+
-----------------------------
|
556
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
557
|
+
[1m[35m (0.1ms)[0m BEGIN
|
558
|
+
-------------------------------
|
559
|
+
HelperTest: test_content_tag_if
|
560
|
+
-------------------------------
|
561
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
562
|
+
[1m[35m (0.1ms)[0m BEGIN
|
563
|
+
--------------------------
|
564
|
+
HelperTest: test_extending
|
565
|
+
--------------------------
|
566
|
+
Rendered layouts/application.html.erb (0.4ms)
|
567
|
+
Rendered layouts/market.html.erb (6.9ms)
|
568
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
569
|
+
[1m[35m (0.1ms)[0m BEGIN
|
570
|
+
------------------------------
|
571
|
+
ControllerTest: test_callbacks
|
572
|
+
------------------------------
|
573
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
574
|
+
[1m[35m (0.1ms)[0m BEGIN
|
575
|
+
---------------------------
|
576
|
+
ControllerTest: test_render
|
577
|
+
---------------------------
|
578
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
579
|
+
[1m[36mActiveRecord::SchemaMigration Load (0.4ms)[0m [1mSELECT "schema_migrations".* FROM "schema_migrations"[0m
|
580
|
+
[1m[35m (0.2ms)[0m BEGIN
|
581
|
+
------------------------------
|
582
|
+
RecordTest: test_nilify_blanks
|
583
|
+
------------------------------
|
584
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
585
|
+
[1m[35mSQL (0.4ms)[0m INSERT INTO "users" ("created_at", "updated_at") VALUES ($1, $2) RETURNING "id" [["created_at", "2016-12-08 04:44:39.082973"], ["updated_at", "2016-12-08 04:44:39.082973"]]
|
586
|
+
[1m[36m (0.2ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
587
|
+
[1m[35mUser Load (0.3ms)[0m SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 5]]
|
588
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
589
|
+
[1m[35m (0.1ms)[0m BEGIN
|
590
|
+
-------------------------
|
591
|
+
RecordTest: test_validate
|
592
|
+
-------------------------
|
593
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
594
|
+
[1m[35m (0.1ms)[0m BEGIN
|
595
|
+
------------------------------
|
596
|
+
ControllerTest: test_callbacks
|
597
|
+
------------------------------
|
598
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
599
|
+
[1m[35m (0.1ms)[0m BEGIN
|
600
|
+
---------------------------
|
601
|
+
ControllerTest: test_render
|
602
|
+
---------------------------
|
603
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
604
|
+
[1m[35m (0.1ms)[0m BEGIN
|
605
|
+
------------------------------
|
606
|
+
MailerTest: test_normalization
|
607
|
+
------------------------------
|
608
|
+
Rendered user_mailer/invite.text.erb (1.2ms)
|
609
|
+
|
610
|
+
UserMailer#invite: processed outbound mail in 18.9ms
|
611
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
612
|
+
[1m[35m (0.2ms)[0m BEGIN
|
613
|
+
--------------------------
|
614
|
+
ValidationTest: test_count
|
615
|
+
--------------------------
|
616
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
617
|
+
[1m[35m (0.1ms)[0m BEGIN
|
618
|
+
-------------------------------
|
619
|
+
ValidationTest: test_complexity
|
620
|
+
-------------------------------
|
621
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
622
|
+
[1m[35m (0.1ms)[0m BEGIN
|
623
|
+
----------------------------
|
624
|
+
ValidationTest: test_methods
|
625
|
+
----------------------------
|
626
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
627
|
+
[1m[35m (0.1ms)[0m BEGIN
|
628
|
+
-------------------------
|
629
|
+
ValidationTest: test_time
|
630
|
+
-------------------------
|
631
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
632
|
+
[1m[35m (0.2ms)[0m BEGIN
|
633
|
+
-----------------------------
|
634
|
+
HelperTest: test_active_trail
|
635
|
+
-----------------------------
|
636
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
637
|
+
[1m[35m (0.1ms)[0m BEGIN
|
638
|
+
-------------------------------
|
639
|
+
HelperTest: test_content_tag_if
|
640
|
+
-------------------------------
|
641
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
642
|
+
[1m[35m (0.1ms)[0m BEGIN
|
643
|
+
--------------------------
|
644
|
+
HelperTest: test_extending
|
645
|
+
--------------------------
|
646
|
+
Rendered layouts/application.html.erb (0.3ms)
|
647
|
+
Rendered layouts/market.html.erb (7.2ms)
|
648
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tuning
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.0.
|
4
|
+
version: 4.0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-12-
|
11
|
+
date: 2016-12-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|