active-component 0.0.3 → 0.0.4

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: 5176b5d88988776f8cf6e9a419e8834bf54e89a9
4
- data.tar.gz: 57ec9bc165345959a885f87052dbe07888c683cd
3
+ metadata.gz: 6eb6edbd6930f5b4702c12e51795c7b8e08d5452
4
+ data.tar.gz: 21836135c99db455907e7f34d3d62aacb71d0985
5
5
  SHA512:
6
- metadata.gz: 21d598e2b7fe3376015b0f22bc9dd41ca16aa02afccfe48c439bc6522c009486e1e463426c38ed2c01053e324d70af8518f33915ffd32d62c9feda625585903d
7
- data.tar.gz: 1ea4afa4669909146f9786546849a6cbeb210821299a5d1124b3b8bbfd98bacb53dab98b5fbef7cacf3f9792123697205d9f5299f2c24e8690c86652deefc74a
6
+ metadata.gz: 6d5fffe42c902e5b02943744305cb8de37dc2288404e7b7034bd7ef7c4d53df294ac016c07b320b6cc96e5e4c170e5ecece451ae6985fce6607b9dcdfefefe77
7
+ data.tar.gz: d6c3f68bd182d8f9c94a4dbb847f68c529f3fb9f16b2ebb25b218a67155887052e6f59b978bd1c24cdd6cb3df6104976945dc77a159f95374bc3058f6fdd96f1
@@ -12,16 +12,16 @@
12
12
  # application.
13
13
  #
14
14
  module ActiveComponent
15
- @@controller = {}
15
+ @@controllers = {}
16
16
 
17
17
  class << self
18
18
  def get_controller
19
- @@controller[Thread.current.object_id]
19
+ @@controllers[Thread.current.object_id]
20
20
  end
21
21
 
22
22
  def set_controller(controller)
23
- @@controller[Thread.current.object_id] = controller
24
- ObjectSpace.define_finalizer Thread.current, -> (id){ @@controller[id].delete! }
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
 
@@ -1,3 +1,3 @@
1
1
  module ActiveComponent
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -356,5 +356,95 @@ ActiveComponent::RenderableTest: test_renders_a_component
356
356
   (0.0ms) begin transaction
357
357
  -----------------------------------------------------
358
358
  ActiveComponentTest: test_has_a_get_controller_method
359
+ -----------------------------------------------------
360
+  (0.1ms) rollback transaction
361
+  (0.3ms) begin transaction
362
+ --------------------------------------------------------------------------------------------------------
363
+ ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
364
+ --------------------------------------------------------------------------------------------------------
365
+  (0.1ms) rollback transaction
366
+  (0.1ms) begin transaction
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
+  (0.0ms) rollback transaction
371
+  (0.1ms) begin transaction
372
+ ------------------------------------------------------------------------
373
+ ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
374
+ ------------------------------------------------------------------------
375
+  (0.0ms) rollback transaction
376
+  (0.1ms) begin transaction
377
+ -------------------------------------------------------------------------
378
+ ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
379
+ -------------------------------------------------------------------------
380
+  (0.1ms) rollback transaction
381
+  (0.1ms) begin transaction
382
+ -------------------------------------------------------------------------
383
+ ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
384
+ -------------------------------------------------------------------------
385
+  (0.0ms) rollback transaction
386
+  (0.0ms) begin transaction
387
+ ---------------------------------------------------------------
388
+ ActiveComponent::ContextTest: test_returns_a_cotroller_instance
389
+ ---------------------------------------------------------------
390
+  (0.1ms) rollback transaction
391
+  (0.0ms) begin transaction
392
+ -------------------------------------------------------------
393
+ ActiveComponent::RailtieTest: test_get_the_controller_context
394
+ -------------------------------------------------------------
395
+  (0.1ms) rollback transaction
396
+  (0.0ms) begin transaction
397
+ ---------------------------------------------------------
398
+ ActiveComponent::RenderableTest: test_renders_a_component
399
+ ---------------------------------------------------------
400
+  (0.0ms) rollback transaction
401
+  (0.0ms) begin transaction
402
+ -----------------------------------------------------
403
+ ActiveComponentTest: test_has_a_get_controller_method
404
+ -----------------------------------------------------
405
+  (0.0ms) rollback transaction
406
+  (0.3ms) begin transaction
407
+ --------------------------------------------------------------------------------------------------------
408
+ ActiveComponent::BaseTest: test_a_new_instance_of_active_component/base_accepts_only_a_hash_of_arguments
409
+ --------------------------------------------------------------------------------------------------------
410
+  (0.1ms) rollback transaction
411
+  (0.1ms) begin transaction
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
+  (0.0ms) rollback transaction
416
+  (0.0ms) begin transaction
417
+ ------------------------------------------------------------------------
418
+ ActiveComponent::BaseTest: test_assigns_the_values_to_instance_variables
419
+ ------------------------------------------------------------------------
420
+  (0.0ms) rollback transaction
421
+  (0.0ms) begin transaction
422
+ -------------------------------------------------------------------------
423
+ ActiveComponent::BaseTest: test_has_included_date_helper_from_action_view
424
+ -------------------------------------------------------------------------
425
+  (0.2ms) rollback transaction
426
+  (0.0ms) begin transaction
427
+ -------------------------------------------------------------------------
428
+ ActiveComponent::BaseTest: test_sets_controller_for_the_component_context
429
+ -------------------------------------------------------------------------
430
+  (0.1ms) rollback transaction
431
+  (0.1ms) begin transaction
432
+ ---------------------------------------------------------------
433
+ ActiveComponent::ContextTest: test_returns_a_cotroller_instance
434
+ ---------------------------------------------------------------
435
+  (0.1ms) rollback transaction
436
+  (0.1ms) begin transaction
437
+ -------------------------------------------------------------
438
+ ActiveComponent::RailtieTest: test_get_the_controller_context
439
+ -------------------------------------------------------------
440
+  (0.1ms) rollback transaction
441
+  (0.1ms) begin transaction
442
+ ---------------------------------------------------------
443
+ ActiveComponent::RenderableTest: test_renders_a_component
444
+ ---------------------------------------------------------
445
+  (0.1ms) rollback transaction
446
+  (0.1ms) begin transaction
447
+ -----------------------------------------------------
448
+ ActiveComponentTest: test_has_a_get_controller_method
359
449
  -----------------------------------------------------
360
450
   (0.1ms) rollback transaction
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active-component
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Antonio Chavez