tuning 4.0.0.0 → 4.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a6bad467e42fd19ccb808852cfb011f729f11ba2
4
- data.tar.gz: 0482a7ce6b4dfae1b211fc0e0622b51dd5426843
3
+ metadata.gz: f615d7bee220d2e737c62f490014355a735d3601
4
+ data.tar.gz: 031b70becc717928cf38a9dbb395d9fd8bc78452
5
5
  SHA512:
6
- metadata.gz: 038433485de3fc9137b4aa96bb5397262f352640e4c54b9d5cb805ccc1dae209427d9fc1f672273cae31c2220136edfc2727a016ef2c29432c945178d99449bf
7
- data.tar.gz: 59b2a30d3096e1c973e9da195e5db45ed3ee5e4e4e80f80e017d71b4491e6a129697847a0c41e869587d47a36f66a0c1f6bf390fde81dea6b6e91adf15695f22
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(args, block) do |name, options|
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(args, block) do |name, options|
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(args) do |name, options|
33
+ _insert_callbacks(names) do |name, options|
34
34
  skip_callback :render, callback, name, options
35
35
  end
36
36
  end
@@ -1,5 +1,5 @@
1
1
  module Tuning
2
2
 
3
- VERSION = '4.0.0.0'
3
+ VERSION = '4.0.0.1'
4
4
 
5
5
  end
@@ -10,11 +10,12 @@ class ControllerTest < ActiveSupport::TestCase
10
10
 
11
11
  test 'callbacks' do
12
12
  controller = ActionController::Base
13
- %i(before after around).each do |callback|
14
- assert controller.respond_to?("#{callback}_render")
15
- assert controller.respond_to?("append_#{callback}_render")
16
- assert controller.respond_to?("prepend_#{callback}_render")
17
- assert controller.respond_to?("skip_#{callback}_render")
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
 
@@ -436,3 +436,213 @@ ValidationsTest: test_count
436
436
  ValidationsTest: test_time
437
437
  --------------------------
438
438
   (0.2ms) ROLLBACK
439
+ ActiveRecord::SchemaMigration Load (27.9ms) SELECT "schema_migrations".* FROM "schema_migrations"
440
+  (0.2ms) BEGIN
441
+ --------------------------
442
+ ValidationTest: test_count
443
+ --------------------------
444
+  (0.3ms) ROLLBACK
445
+  (0.1ms) BEGIN
446
+ -------------------------
447
+ ValidationTest: test_time
448
+ -------------------------
449
+  (0.2ms) ROLLBACK
450
+  (0.1ms) BEGIN
451
+ -------------------------------
452
+ ValidationTest: test_complexity
453
+ -------------------------------
454
+  (0.1ms) ROLLBACK
455
+  (0.1ms) BEGIN
456
+ ----------------------------
457
+ ValidationTest: test_methods
458
+ ----------------------------
459
+  (0.1ms) ROLLBACK
460
+  (0.1ms) BEGIN
461
+ -----------------------------
462
+ HelperTest: test_active_trail
463
+ -----------------------------
464
+  (0.2ms) ROLLBACK
465
+  (0.2ms) BEGIN
466
+ -------------------------------
467
+ HelperTest: test_content_tag_if
468
+ -------------------------------
469
+  (0.2ms) ROLLBACK
470
+  (0.1ms) BEGIN
471
+ --------------------------
472
+ HelperTest: test_extending
473
+ --------------------------
474
+ Rendered layouts/application.html.erb (0.2ms)
475
+ Rendered layouts/market.html.erb (7.3ms)
476
+  (0.2ms) ROLLBACK
477
+  (0.1ms) 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
+  (0.2ms) ROLLBACK
485
+  (0.1ms) BEGIN
486
+ ------------------------------
487
+ ControllerTest: test_callbacks
488
+ ------------------------------
489
+  (0.1ms) ROLLBACK
490
+  (0.1ms) BEGIN
491
+ ---------------------------
492
+ ControllerTest: test_render
493
+ ---------------------------
494
+  (0.2ms) ROLLBACK
495
+  (0.1ms) BEGIN
496
+ ------------------------------
497
+ RecordTest: test_nilify_blanks
498
+ ------------------------------
499
+  (0.1ms) SAVEPOINT active_record_1
500
+ SQL (25.2ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
502
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 3]]
503
+  (0.2ms) ROLLBACK
504
+  (0.1ms) BEGIN
505
+ -------------------------
506
+ RecordTest: test_validate
507
+ -------------------------
508
+  (0.1ms) ROLLBACK
509
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
510
+  (0.3ms) BEGIN
511
+ -------------------------
512
+ RecordTest: test_validate
513
+ -------------------------
514
+  (0.2ms) ROLLBACK
515
+  (0.1ms) BEGIN
516
+ ------------------------------
517
+ RecordTest: test_nilify_blanks
518
+ ------------------------------
519
+  (0.1ms) SAVEPOINT active_record_1
520
+ SQL (0.3ms) 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
+  (0.1ms) RELEASE SAVEPOINT active_record_1
522
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 4]]
523
+  (0.2ms) ROLLBACK
524
+  (0.1ms) BEGIN
525
+ -------------------------------
526
+ ValidationTest: test_complexity
527
+ -------------------------------
528
+  (0.1ms) ROLLBACK
529
+  (0.2ms) BEGIN
530
+ ----------------------------
531
+ ValidationTest: test_methods
532
+ ----------------------------
533
+  (0.2ms) ROLLBACK
534
+  (0.1ms) BEGIN
535
+ -------------------------
536
+ ValidationTest: test_time
537
+ -------------------------
538
+  (0.3ms) ROLLBACK
539
+  (0.1ms) BEGIN
540
+ --------------------------
541
+ ValidationTest: test_count
542
+ --------------------------
543
+  (0.2ms) ROLLBACK
544
+  (0.1ms) 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
+  (0.2ms) ROLLBACK
552
+  (0.1ms) BEGIN
553
+ -----------------------------
554
+ HelperTest: test_active_trail
555
+ -----------------------------
556
+  (0.1ms) ROLLBACK
557
+  (0.1ms) BEGIN
558
+ -------------------------------
559
+ HelperTest: test_content_tag_if
560
+ -------------------------------
561
+  (0.2ms) ROLLBACK
562
+  (0.1ms) BEGIN
563
+ --------------------------
564
+ HelperTest: test_extending
565
+ --------------------------
566
+ Rendered layouts/application.html.erb (0.4ms)
567
+ Rendered layouts/market.html.erb (6.9ms)
568
+  (0.2ms) ROLLBACK
569
+  (0.1ms) BEGIN
570
+ ------------------------------
571
+ ControllerTest: test_callbacks
572
+ ------------------------------
573
+  (0.1ms) ROLLBACK
574
+  (0.1ms) BEGIN
575
+ ---------------------------
576
+ ControllerTest: test_render
577
+ ---------------------------
578
+  (0.1ms) ROLLBACK
579
+ ActiveRecord::SchemaMigration Load (0.4ms) SELECT "schema_migrations".* FROM "schema_migrations"
580
+  (0.2ms) BEGIN
581
+ ------------------------------
582
+ RecordTest: test_nilify_blanks
583
+ ------------------------------
584
+  (0.1ms) SAVEPOINT active_record_1
585
+ SQL (0.4ms) 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
+  (0.2ms) RELEASE SAVEPOINT active_record_1
587
+ User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = $1 LIMIT 1 [["id", 5]]
588
+  (0.2ms) ROLLBACK
589
+  (0.1ms) BEGIN
590
+ -------------------------
591
+ RecordTest: test_validate
592
+ -------------------------
593
+  (0.1ms) ROLLBACK
594
+  (0.1ms) BEGIN
595
+ ------------------------------
596
+ ControllerTest: test_callbacks
597
+ ------------------------------
598
+  (0.1ms) ROLLBACK
599
+  (0.1ms) BEGIN
600
+ ---------------------------
601
+ ControllerTest: test_render
602
+ ---------------------------
603
+  (0.2ms) ROLLBACK
604
+  (0.1ms) 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
+  (0.2ms) ROLLBACK
612
+  (0.2ms) BEGIN
613
+ --------------------------
614
+ ValidationTest: test_count
615
+ --------------------------
616
+  (0.2ms) ROLLBACK
617
+  (0.1ms) BEGIN
618
+ -------------------------------
619
+ ValidationTest: test_complexity
620
+ -------------------------------
621
+  (0.1ms) ROLLBACK
622
+  (0.1ms) BEGIN
623
+ ----------------------------
624
+ ValidationTest: test_methods
625
+ ----------------------------
626
+  (0.1ms) ROLLBACK
627
+  (0.1ms) BEGIN
628
+ -------------------------
629
+ ValidationTest: test_time
630
+ -------------------------
631
+  (0.2ms) ROLLBACK
632
+  (0.2ms) BEGIN
633
+ -----------------------------
634
+ HelperTest: test_active_trail
635
+ -----------------------------
636
+  (0.1ms) ROLLBACK
637
+  (0.1ms) BEGIN
638
+ -------------------------------
639
+ HelperTest: test_content_tag_if
640
+ -------------------------------
641
+  (0.1ms) ROLLBACK
642
+  (0.1ms) BEGIN
643
+ --------------------------
644
+ HelperTest: test_extending
645
+ --------------------------
646
+ Rendered layouts/application.html.erb (0.3ms)
647
+ Rendered layouts/market.html.erb (7.2ms)
648
+  (0.2ms) ROLLBACK
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.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-06 00:00:00.000000000 Z
11
+ date: 2016-12-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails