diff --git a/Boardy.podspec b/Boardy.podspec index 2137030..f8449b0 100644 --- a/Boardy.podspec +++ b/Boardy.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Boardy" - s.version = "1.34.0" + s.version = "1.34.1" s.swift_versions = ["5.3", "5.4", "5.5"] s.summary = "A mediator interface to integrate multiple mobile architectures." diff --git a/Boardy/ModulePlugin/PluginLauncher.swift b/Boardy/ModulePlugin/PluginLauncher.swift index 0d6e21c..0f535ce 100644 --- a/Boardy/ModulePlugin/PluginLauncher.swift +++ b/Boardy/ModulePlugin/PluginLauncher.swift @@ -43,7 +43,7 @@ public final class LauncherComponent { } func loadPluginsIfNeeded() { - plugins.forEach { $0.apply(for: self) } + plugins.forEach { $0.apply(for: Component(options: options, producer: container.boxed)) } plugins.removeAll() } @@ -63,8 +63,9 @@ public final class LauncherComponent { } } -extension LauncherComponent: MainComponent { - public var producer: BoardDynamicProducer { container.boxed } +struct Component: MainComponent { + let options: MainOptions + let producer: BoardDynamicProducer } public final class PluginLauncher { diff --git a/Example/Boardy.xcodeproj/project.pbxproj b/Example/Boardy.xcodeproj/project.pbxproj index af58d08..ce70e59 100644 --- a/Example/Boardy.xcodeproj/project.pbxproj +++ b/Example/Boardy.xcodeproj/project.pbxproj @@ -16,6 +16,7 @@ 27547FCE25415640005C9027 /* HeadlineBoard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27547FCD25415640005C9027 /* HeadlineBoard.swift */; }; 27547FD22541571C005C9027 /* FeaturedBoard.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27547FD12541571C005C9027 /* FeaturedBoard.swift */; }; 2766A4652706B22300C04DA9 /* ProducerTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2766A4642706B22300C04DA9 /* ProducerTests.swift */; }; + 2766A4672706ED7200C04DA9 /* PluginTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2766A4662706ED7200C04DA9 /* PluginTests.swift */; }; 2776F43126DD0F4900680B7F /* TaskBoardTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2776F43026DD0F4900680B7F /* TaskBoardTests.swift */; }; 277BC12926D9EEF400BDEA8F /* AdapterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277BC12826D9EEF400BDEA8F /* AdapterTests.swift */; }; 277BC12B26D9F75C00BDEA8F /* InteractableTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 277BC12A26D9F75C00BDEA8F /* InteractableTests.swift */; }; @@ -102,6 +103,7 @@ 27547FCD25415640005C9027 /* HeadlineBoard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = HeadlineBoard.swift; sourceTree = ""; }; 27547FD12541571C005C9027 /* FeaturedBoard.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FeaturedBoard.swift; sourceTree = ""; }; 2766A4642706B22300C04DA9 /* ProducerTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ProducerTests.swift; sourceTree = ""; }; + 2766A4662706ED7200C04DA9 /* PluginTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PluginTests.swift; sourceTree = ""; }; 2776F43026DD0F4900680B7F /* TaskBoardTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TaskBoardTests.swift; sourceTree = ""; }; 277BC12826D9EEF400BDEA8F /* AdapterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AdapterTests.swift; sourceTree = ""; }; 277BC12A26D9F75C00BDEA8F /* InteractableTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = InteractableTests.swift; sourceTree = ""; }; @@ -456,6 +458,7 @@ 2776F43026DD0F4900680B7F /* TaskBoardTests.swift */, 27F4F05726E499ED005BAC34 /* ResultBoardTests.swift */, 2766A4642706B22300C04DA9 /* ProducerTests.swift */, + 2766A4662706ED7200C04DA9 /* PluginTests.swift */, 607FACE91AFB9204008FA782 /* Supporting Files */, ); path = Tests; @@ -752,6 +755,7 @@ files = ( 27E40B9226CF533D00A0F634 /* BlockTaskTests.swift in Sources */, 2766A4652706B22300C04DA9 /* ProducerTests.swift in Sources */, + 2766A4672706ED7200C04DA9 /* PluginTests.swift in Sources */, 270351C125C2BD26007AF693 /* AttachableTests.swift in Sources */, 27F4F05826E499ED005BAC34 /* ResultBoardTests.swift in Sources */, 27058AE026DA4281008FB4F6 /* BarrierTests.swift in Sources */, diff --git a/Example/Tests/PluginTests.swift b/Example/Tests/PluginTests.swift new file mode 100644 index 0000000..fc6b23b --- /dev/null +++ b/Example/Tests/PluginTests.swift @@ -0,0 +1,24 @@ +// +// PluginTests.swift +// Boardy_Tests +// +// Created by NGUYEN CHI CONG on 10/1/21. +// Copyright © 2021 [iF] Solution. All rights reserved. +// + +@testable import Boardy +import XCTest + +class PluginTests: XCTestCase { + override func setUpWithError() throws { + // Put setup code here. This method is called before the invocation of each test method in the class. + } + + override func tearDownWithError() throws { + // Put teardown code here. This method is called after the invocation of each test method in the class. + } + + func testExample() throws { + + } +}