active-component 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/active_component/context.rb +4 -4
- data/lib/active_component/version.rb +1 -1
- data/test/dummy/log/test.log +90 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6eb6edbd6930f5b4702c12e51795c7b8e08d5452
|
4
|
+
data.tar.gz: 21836135c99db455907e7f34d3d62aacb71d0985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6d5fffe42c902e5b02943744305cb8de37dc2288404e7b7034bd7ef7c4d53df294ac016c07b320b6cc96e5e4c170e5ecece451ae6985fce6607b9dcdfefefe77
|
7
|
+
data.tar.gz: d6c3f68bd182d8f9c94a4dbb847f68c529f3fb9f16b2ebb25b218a67155887052e6f59b978bd1c24cdd6cb3df6104976945dc77a159f95374bc3058f6fdd96f1
|
@@ -12,16 +12,16 @@
|
|
12
12
|
# application.
|
13
13
|
#
|
14
14
|
module ActiveComponent
|
15
|
-
@@
|
15
|
+
@@controllers = {}
|
16
16
|
|
17
17
|
class << self
|
18
18
|
def get_controller
|
19
|
-
@@
|
19
|
+
@@controllers[Thread.current.object_id]
|
20
20
|
end
|
21
21
|
|
22
22
|
def set_controller(controller)
|
23
|
-
@@
|
24
|
-
ObjectSpace.define_finalizer Thread.current, -> (id){ @@
|
23
|
+
@@controllers[Thread.current.object_id] = controller
|
24
|
+
ObjectSpace.define_finalizer Thread.current, -> (id){ @@controllers[id].delete! }
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
data/test/dummy/log/test.log
CHANGED
@@ -356,5 +356,95 @@ ActiveComponent::RenderableTest: test_renders_a_component
|
|
356
356
|
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
357
357
|
-----------------------------------------------------
|
358
358
|
ActiveComponentTest: test_has_a_get_controller_method
|
359
|
+
-----------------------------------------------------
|
360
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
361
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
362
|
+
--------------------------------------------------------------------------------------------------------
|
363
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
364
|
+
--------------------------------------------------------------------------------------------------------
|
365
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
366
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
367
|
+
-------------------------------------------------------------------------------------------------------------------------
|
368
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
369
|
+
-------------------------------------------------------------------------------------------------------------------------
|
370
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
371
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
372
|
+
------------------------------------------------------------------------
|
373
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
374
|
+
------------------------------------------------------------------------
|
375
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
376
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
377
|
+
-------------------------------------------------------------------------
|
378
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
379
|
+
-------------------------------------------------------------------------
|
380
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
381
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
382
|
+
-------------------------------------------------------------------------
|
383
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
384
|
+
-------------------------------------------------------------------------
|
385
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
386
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
387
|
+
---------------------------------------------------------------
|
388
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
389
|
+
---------------------------------------------------------------
|
390
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
391
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
392
|
+
-------------------------------------------------------------
|
393
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
394
|
+
-------------------------------------------------------------
|
395
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
396
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
397
|
+
---------------------------------------------------------
|
398
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
399
|
+
---------------------------------------------------------
|
400
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
401
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
402
|
+
-----------------------------------------------------
|
403
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
404
|
+
-----------------------------------------------------
|
405
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
406
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
407
|
+
--------------------------------------------------------------------------------------------------------
|
408
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
|
409
|
+
--------------------------------------------------------------------------------------------------------
|
410
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
411
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
412
|
+
-------------------------------------------------------------------------------------------------------------------------
|
413
|
+
ActiveComponent::BaseTest: test_a_new_instance_of_active_component_should_raise_an_error_if_the_given_value_is_not_a_hash
|
414
|
+
-------------------------------------------------------------------------------------------------------------------------
|
415
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
416
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
417
|
+
------------------------------------------------------------------------
|
418
|
+
ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
|
419
|
+
------------------------------------------------------------------------
|
420
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
421
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
422
|
+
-------------------------------------------------------------------------
|
423
|
+
ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
|
424
|
+
-------------------------------------------------------------------------
|
425
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
426
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
427
|
+
-------------------------------------------------------------------------
|
428
|
+
ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
|
429
|
+
-------------------------------------------------------------------------
|
430
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
431
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
432
|
+
---------------------------------------------------------------
|
433
|
+
ActiveComponent::ContextTest: test_returns_a_cotroller_instance
|
434
|
+
---------------------------------------------------------------
|
435
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
436
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
437
|
+
-------------------------------------------------------------
|
438
|
+
ActiveComponent::RailtieTest: test_get_the_controller_context
|
439
|
+
-------------------------------------------------------------
|
440
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
441
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
442
|
+
---------------------------------------------------------
|
443
|
+
ActiveComponent::RenderableTest: test_renders_a_component
|
444
|
+
---------------------------------------------------------
|
445
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
446
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
447
|
+
-----------------------------------------------------
|
448
|
+
ActiveComponentTest: test_has_a_get_controller_method
|
359
449
|
-----------------------------------------------------
|
360
450
|
[1m[35m (0.1ms)[0m rollback transaction
|