blue_printer 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/VIP Architecture.xctemplate/TemplateIcon.png b/data/Clean Swift → Tests.xctemplate/TemplateIcon.png +0 -0
- data/VIP Architecture.xctemplate/TemplateIcon@2x.png b/data/Clean Swift → Tests.xctemplate/TemplateIcon@2x.png +0 -0
- data/VIP Architecture.xctemplate/TemplateInfo.plist b/data/Clean Swift → Tests.xctemplate/TemplateInfo.plist +0 -0
- data/{VIP Architecture.xctemplate → Clean Swift Tests.xctemplate}/___FILEBASENAME___InteractorTests.swift +7 -9
- data/{VIP Architecture.xctemplate → Clean Swift Tests.xctemplate}/___FILEBASENAME___PresenterTests.swift +8 -2
- data/{VIP Architecture.xctemplate → Clean Swift Tests.xctemplate}/___FILEBASENAME___ViewControllerTests.swift +8 -2
- data/Clean Swift VIP.xctemplate/TemplateIcon.png +0 -0
- data/Clean Swift VIP.xctemplate/TemplateIcon@2x.png +0 -0
- data/Clean Swift VIP.xctemplate/TemplateInfo.plist +39 -0
- data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___Interactor.swift +10 -1
- data/Clean Swift VIP.xctemplate/___FILEBASENAME___Model.swift +18 -0
- data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___Presenter.swift +11 -1
- data/VIP Architecture.xctemplate/___FILEBASENAME___Router.swift b/data/Clean Swift → VIP.xctemplate/___FILEBASENAME___Router.swift +0 -0
- data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___ViewController.swift +11 -10
- data/VIP Architecture.xctemplate/___FILEBASENAME___ViewController.xib b/data/Clean Swift → VIP.xctemplate/___FILEBASENAME___ViewController.xib +0 -0
- data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___Worker.swift +4 -3
- data/Gemfile.lock +1 -1
- data/README.md +3 -3
- data/exe/blue_printer +6 -0
- data/lib/blue_printer.rb +5 -21
- data/lib/blue_printer/version.rb +1 -1
- metadata +21 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f0106f3346cb66ba81d907d08929fc3aa734020910220111ce418c78a185cf1
|
4
|
+
data.tar.gz: 19967f4efc8340a9be94b12e50736da30ab8e4f1151a748f252ee77ade72fc65
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1f4996b32fc4b9e57307be9d4e5a5f7401176a32ad442de8bf220656d1fd3447f585f84452706e7fc0e2462313c3875c7473620cf0b954c5deb7f4cf909eecc
|
7
|
+
data.tar.gz: 9c5805209cb07313ac98ab7ef3bafdef5a31507330183e3ef8c0d5b908b07e3334fa135ba6813923759bd2d41298735a316aaca336c8e156b586669fb06abf3a
|
data/.DS_Store
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//___FILEHEADER___
|
2
2
|
|
3
3
|
import XCTest
|
4
|
-
@testable import
|
4
|
+
@testable import ___PROJECTNAME___
|
5
5
|
|
6
6
|
class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
7
7
|
|
@@ -23,24 +23,22 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
|
23
23
|
// }
|
24
24
|
}
|
25
25
|
|
26
|
-
class WorkerSpy: ___VARIABLE_productName___DataProvidable {
|
27
|
-
|
28
|
-
}
|
29
|
-
|
30
26
|
// MARK: - Properties
|
31
27
|
var sut: ___VARIABLE_productName___Interactor!
|
32
28
|
var presenterSpy: PresenterSpy!
|
33
|
-
var
|
29
|
+
lazy var moduleConfiguration: ModuleConfiguration = {
|
30
|
+
let moduleConfiguration = ModuleConfiguration()
|
31
|
+
// moduleConfiguration.add(module: MockAnalyticsService, interface: AnalyticsService.self)
|
32
|
+
return moduleConfiguration
|
33
|
+
}()
|
34
34
|
|
35
35
|
// MARK: - Test lifecycle
|
36
36
|
override func setUp() {
|
37
37
|
super.setUp()
|
38
38
|
|
39
39
|
presenterSpy = PresenterSpy()
|
40
|
-
|
41
|
-
sut = ___VARIABLE_productName___Interactor()
|
40
|
+
sut = ___VARIABLE_productName___Interactor(moduleConfiguration)
|
42
41
|
sut.presenter = presenterSpy
|
43
|
-
sut.worker = workerSpy
|
44
42
|
}
|
45
43
|
|
46
44
|
// MARK: - Tests
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//___FILEHEADER___
|
2
2
|
|
3
3
|
import XCTest
|
4
|
-
@testable import
|
4
|
+
@testable import ___PROJECTNAME___
|
5
5
|
|
6
6
|
class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
7
7
|
|
@@ -14,11 +14,17 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
|
14
14
|
var sut: ___VARIABLE_productName___Presenter!
|
15
15
|
var viewControllerSpy: ViewControllerSpy!
|
16
16
|
|
17
|
+
lazy var moduleConfiguration: ModuleConfiguration = {
|
18
|
+
let moduleConfiguration = ModuleConfiguration()
|
19
|
+
// moduleConfiguration.add(module: localizationService, interface: ABNLocalizationService.self)
|
20
|
+
return moduleConfiguration
|
21
|
+
}()
|
22
|
+
|
17
23
|
// MARK: - Test lifecycle
|
18
24
|
override func setUp() {
|
19
25
|
super.setUp()
|
20
26
|
viewControllerSpy = ViewControllerSpy()
|
21
|
-
sut = ___VARIABLE_productName___Presenter()
|
27
|
+
sut = ___VARIABLE_productName___Presenter(moduleConfiguration)
|
22
28
|
sut.viewController = viewControllerSpy
|
23
29
|
}
|
24
30
|
|
@@ -1,7 +1,7 @@
|
|
1
1
|
//___FILEHEADER___
|
2
2
|
|
3
3
|
import XCTest
|
4
|
-
@testable import
|
4
|
+
@testable import ___PROJECTNAME___
|
5
5
|
|
6
6
|
class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
7
7
|
|
@@ -15,6 +15,12 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
|
15
15
|
var dataStore: ___VARIABLE_productName___DataStore?
|
16
16
|
}
|
17
17
|
|
18
|
+
let moduleConfiguration: ModuleConfiguration = {
|
19
|
+
let config = ModuleConfiguration()
|
20
|
+
// moduleConfiguration.add(module: localizationService, interface: ABNLocalizationService.self)
|
21
|
+
return config
|
22
|
+
}()
|
23
|
+
|
18
24
|
// MARK: - Properties
|
19
25
|
var sut: ___VARIABLE_productName___ViewController!
|
20
26
|
var interactorSpy: InteractorSpy!
|
@@ -25,7 +31,7 @@ class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
|
25
31
|
super.setUp()
|
26
32
|
interactorSpy = InteractorSpy()
|
27
33
|
routerSpy = RouterSpy()
|
28
|
-
sut = ___VARIABLE_productName___ViewController()
|
34
|
+
sut = ___VARIABLE_productName___ViewController(moduleConfiguration)
|
29
35
|
sut.interactor = interactorSpy
|
30
36
|
sut.router = routerSpy
|
31
37
|
sut.beginAppearanceTransition(true, animated: false)
|
Binary file
|
Binary file
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
+
<plist version="1.0">
|
4
|
+
<dict>
|
5
|
+
<key>Kind</key>
|
6
|
+
<string>Xcode.IDEFoundation.TextSubstitutionFileTemplateKind</string>
|
7
|
+
<key>Description</key>
|
8
|
+
<string>An empty Swift file.</string>
|
9
|
+
<key>Summary</key>
|
10
|
+
<string>An empty Swift file</string>
|
11
|
+
<key>SortOrder</key>
|
12
|
+
<string>30</string>
|
13
|
+
<key>AllowedTypes</key>
|
14
|
+
<array>
|
15
|
+
<string>public.swift-source</string>
|
16
|
+
</array>
|
17
|
+
<key>DefaultCompletionName</key>
|
18
|
+
<string></string>
|
19
|
+
<key>MainTemplateFile</key>
|
20
|
+
<string>___FILEBASENAME___.swift</string>
|
21
|
+
<key>Options</key>
|
22
|
+
<array>
|
23
|
+
<dict>
|
24
|
+
<key>Identifier</key>
|
25
|
+
<string>productName</string>
|
26
|
+
<key>Required</key>
|
27
|
+
<true/>
|
28
|
+
<key>Name</key>
|
29
|
+
<string>Class:</string>
|
30
|
+
<key>Description</key>
|
31
|
+
<string>The name of the class to create</string>
|
32
|
+
<key>Type</key>
|
33
|
+
<string>text</string>
|
34
|
+
<key>NotPersisted</key>
|
35
|
+
<false/>
|
36
|
+
</dict>
|
37
|
+
</array>
|
38
|
+
</dict>
|
39
|
+
</plist>
|
data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___Interactor.swift
RENAMED
@@ -14,6 +14,15 @@ class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Interactable, __
|
|
14
14
|
|
15
15
|
// MARK: - Properties
|
16
16
|
var presenter: ___VARIABLE_productName___Presentable?
|
17
|
-
|
17
|
+
private let configuration: ModuleConfiguration?
|
18
18
|
|
19
|
+
// MARK: - Services
|
20
|
+
// var service: Service? {
|
21
|
+
// return configuration?.getModule(Service.self)
|
22
|
+
// }
|
23
|
+
|
24
|
+
// MARK: - Initializer
|
25
|
+
init(_ moduleConfiguration: ModuleConfiguration?) {
|
26
|
+
self.configuration = moduleConfiguration
|
27
|
+
}
|
19
28
|
}
|
data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___Presenter.swift
RENAMED
@@ -10,7 +10,17 @@ class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Presentable {
|
|
10
10
|
|
11
11
|
// MARK: - Properties
|
12
12
|
weak var viewController: ___VARIABLE_productName___Displayable?
|
13
|
-
|
13
|
+
private let moduleConfiguration: ModuleConfiguration!
|
14
|
+
|
15
|
+
// MARK: - Services
|
16
|
+
// private var localizationService: LocalizationService! {
|
17
|
+
// return moduleConfiguration.getModule(LocalizationService.self)
|
18
|
+
// }
|
19
|
+
|
20
|
+
// MARK: - Initializers
|
21
|
+
init(_ moduleConfiguration: ModuleConfiguration!) {
|
22
|
+
self.moduleConfiguration = moduleConfiguration
|
23
|
+
}
|
14
24
|
}
|
15
25
|
|
16
26
|
//extension ___FILEBASENAMEASIDENTIFIER___: LoadingPresentable {
|
File without changes
|
@@ -11,29 +11,30 @@ class ___FILEBASENAMEASIDENTIFIER___: UIViewController, ___VARIABLE_productName_
|
|
11
11
|
// MARK: - Properties
|
12
12
|
var router: (___VARIABLE_productName___Routable & ___VARIABLE_productName___DataPassing)!
|
13
13
|
var interactor: ___VARIABLE_productName___Interactable!
|
14
|
+
private let moduleConfiguration: ModuleConfiguration?
|
14
15
|
|
15
16
|
// MARK: - Initializers
|
16
|
-
|
17
|
-
|
17
|
+
init(_ moduleConfiguration: ModuleConfiguration! = ModuleConfiguration.currentConfiguration) {
|
18
|
+
self.moduleConfiguration = moduleConfiguration
|
19
|
+
super.init(nibName: nil, bundle: nil)
|
18
20
|
setupVIP()
|
19
21
|
}
|
20
22
|
|
21
23
|
required init?(coder aDecoder: NSCoder) {
|
22
|
-
|
23
|
-
setupVIP()
|
24
|
+
fatalError("init(coder:) has not been implemented")
|
24
25
|
}
|
25
26
|
|
26
27
|
// MARK: - Setup VIP
|
27
28
|
private func setupVIP() {
|
28
|
-
let interactor = ___VARIABLE_productName___Interactor()
|
29
|
-
let presenter = ___VARIABLE_productName___Presenter()
|
29
|
+
let interactor = ___VARIABLE_productName___Interactor(moduleConfiguration)
|
30
|
+
let presenter = ___VARIABLE_productName___Presenter(moduleConfiguration)
|
30
31
|
let router = ___VARIABLE_productName___Router()
|
31
|
-
self.interactor = interactor
|
32
|
-
self.router = router
|
33
|
-
interactor.presenter = presenter
|
34
32
|
presenter.viewController = self
|
35
|
-
|
33
|
+
interactor.presenter = presenter
|
36
34
|
router.dataStore = interactor
|
35
|
+
router.viewController = self
|
36
|
+
self.interactor = interactor
|
37
|
+
self.router = router
|
37
38
|
}
|
38
39
|
|
39
40
|
// MARK: - Lifecycle
|
File without changes
|
data/{VIP Architecture.xctemplate → Clean Swift VIP.xctemplate}/___FILEBASENAME___Worker.swift
RENAMED
@@ -9,9 +9,10 @@ protocol ___VARIABLE_productName___DataProvidable {
|
|
9
9
|
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___DataProvidable {
|
10
10
|
|
11
11
|
// MARK: - Properties
|
12
|
-
|
12
|
+
private let moduleConfiguration: ModuleConfiguration!
|
13
|
+
|
13
14
|
// MARK: - Initializers
|
14
|
-
init() {
|
15
|
-
|
15
|
+
init(_ moduleConfiguration: ModuleConfiguration!) {
|
16
|
+
self.moduleConfiguration = moduleConfiguration
|
16
17
|
}
|
17
18
|
}
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -6,11 +6,11 @@ TODO: Delete this and the text above, and describe your gem
|
|
6
6
|
|
7
7
|
## Roadmap
|
8
8
|
|
9
|
+
- Add a seperate xctemplate for Tests
|
10
|
+
- Create models template file e.g. GuidedInvestmentsOverviewModels.swift (with Analytics, Errors, SceneModel)
|
11
|
+
- -Remove 'ios-xcode-templates' from folder path-
|
9
12
|
- -Move it to the right directory-
|
10
13
|
- -Create a *.xctemplate directory-
|
11
|
-
- Create swift template files
|
12
|
-
- Create resources
|
13
|
-
- Fill it with boilerplate code
|
14
14
|
|
15
15
|
## Installation
|
16
16
|
|
data/exe/blue_printer
ADDED
data/lib/blue_printer.rb
CHANGED
@@ -6,32 +6,16 @@ module BluePrinter
|
|
6
6
|
|
7
7
|
XCODE_TEMPLATE_PATH = File.join("Library", "Developer", "Xcode", "Templates")
|
8
8
|
TEMPLATE_DIR = File.join(File.expand_path('~'), XCODE_TEMPLATE_PATH)
|
9
|
-
|
10
|
-
|
9
|
+
TEMPLATE_NAME = "Clean Swift VIP.xctemplate"
|
10
|
+
TEMPLATE_NAME_TESTS = "Clean Swift Tests.xctemplate"
|
11
11
|
|
12
12
|
def self.root
|
13
13
|
File.dirname __dir__
|
14
14
|
end
|
15
15
|
|
16
|
-
def self.generate
|
17
|
-
template_path = "tmp/VIP Architecture.xctemplate"
|
18
|
-
FileUtils.mkdir_p template_path
|
19
|
-
[
|
20
|
-
"Interactor",
|
21
|
-
"Presenter",
|
22
|
-
"ViewController",
|
23
|
-
"InteractorTests",
|
24
|
-
"PresenterTests",
|
25
|
-
"ViewControllerTests",
|
26
|
-
"Router",
|
27
|
-
"Worker"
|
28
|
-
].each do |filename|
|
29
|
-
File.open("#{template_path}/___FILEBASENAME___#{filename}.swift", "w")
|
30
|
-
end
|
31
|
-
end
|
32
|
-
|
33
16
|
def self.move_to_xcode_template_directory
|
34
|
-
FileUtils.mkdir_p
|
35
|
-
FileUtils.copy_entry File.join(root, TEMPLATE_NAME), File.join(
|
17
|
+
FileUtils.mkdir_p TEMPLATE_DIR
|
18
|
+
FileUtils.copy_entry File.join(root, TEMPLATE_NAME), File.join(TEMPLATE_DIR, TEMPLATE_NAME)
|
19
|
+
FileUtils.copy_entry File.join(root, TEMPLATE_NAME_TESTS), File.join(TEMPLATE_DIR, TEMPLATE_NAME_TESTS)
|
36
20
|
end
|
37
21
|
end
|
data/lib/blue_printer/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: blue_printer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dunya Kirkali
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2019-
|
12
|
+
date: 2019-07-17 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -85,7 +85,8 @@ description: Will generate xctemplate files for CleanSwift
|
|
85
85
|
email:
|
86
86
|
- dunyakirkali@gmail.com
|
87
87
|
- devrind@me.com
|
88
|
-
executables:
|
88
|
+
executables:
|
89
|
+
- blue_printer
|
89
90
|
extensions: []
|
90
91
|
extra_rdoc_files: []
|
91
92
|
files:
|
@@ -94,25 +95,30 @@ files:
|
|
94
95
|
- ".rspec"
|
95
96
|
- ".travis.yml"
|
96
97
|
- CHANGELOG.md
|
98
|
+
- Clean Swift Tests.xctemplate/TemplateIcon.png
|
99
|
+
- Clean Swift Tests.xctemplate/TemplateIcon@2x.png
|
100
|
+
- Clean Swift Tests.xctemplate/TemplateInfo.plist
|
101
|
+
- Clean Swift Tests.xctemplate/___FILEBASENAME___InteractorTests.swift
|
102
|
+
- Clean Swift Tests.xctemplate/___FILEBASENAME___PresenterTests.swift
|
103
|
+
- Clean Swift Tests.xctemplate/___FILEBASENAME___ViewControllerTests.swift
|
104
|
+
- Clean Swift VIP.xctemplate/TemplateIcon.png
|
105
|
+
- Clean Swift VIP.xctemplate/TemplateIcon@2x.png
|
106
|
+
- Clean Swift VIP.xctemplate/TemplateInfo.plist
|
107
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___Interactor.swift
|
108
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___Model.swift
|
109
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___Presenter.swift
|
110
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___Router.swift
|
111
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___ViewController.swift
|
112
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___ViewController.xib
|
113
|
+
- Clean Swift VIP.xctemplate/___FILEBASENAME___Worker.swift
|
97
114
|
- Gemfile
|
98
115
|
- Gemfile.lock
|
99
116
|
- README.md
|
100
117
|
- Rakefile
|
101
|
-
- VIP Architecture.xctemplate/TemplateIcon.png
|
102
|
-
- VIP Architecture.xctemplate/TemplateIcon@2x.png
|
103
|
-
- VIP Architecture.xctemplate/TemplateInfo.plist
|
104
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___Interactor.swift
|
105
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___InteractorTests.swift
|
106
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___Presenter.swift
|
107
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___PresenterTests.swift
|
108
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___Router.swift
|
109
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___ViewController.swift
|
110
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___ViewController.xib
|
111
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___ViewControllerTests.swift
|
112
|
-
- VIP Architecture.xctemplate/___FILEBASENAME___Worker.swift
|
113
118
|
- bin/console
|
114
119
|
- bin/setup
|
115
120
|
- blue_printer.gemspec
|
121
|
+
- exe/blue_printer
|
116
122
|
- lib/blue_printer.rb
|
117
123
|
- lib/blue_printer/version.rb
|
118
124
|
homepage: https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer
|