blue_printer 0.1.0
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 +7 -0
- data/.DS_Store +0 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +7 -0
- data/CHANGELOG.md +0 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +59 -0
- data/README.md +45 -0
- data/Rakefile +6 -0
- data/VIP Architecture.xctemplate/TemplateIcon.png +0 -0
- data/VIP Architecture.xctemplate/TemplateIcon@2x.png +0 -0
- data/VIP Architecture.xctemplate/TemplateInfo.plist +39 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___Interactor.swift +24 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___InteractorTests.swift +48 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___Presenter.swift +37 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___PresenterTests.swift +28 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___Router.swift +24 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___ViewController.swift +43 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___ViewController.xib +25 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___ViewControllerTests.swift +37 -0
- data/VIP Architecture.xctemplate/___FILEBASENAME___Worker.swift +17 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/blue_printer.gemspec +43 -0
- data/lib/blue_printer.rb +37 -0
- data/lib/blue_printer/version.rb +3 -0
- metadata +143 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 23b952884cd43d683aada3def98de5dff8dea738
|
4
|
+
data.tar.gz: 5f590c86cd908a400c3667ce73f4f5e7088d4ff5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 35232aa8f248584955330a03a394afc09184656fe87941e744a2775453f8a2b3774ca0865565545deb7861f33a2ed5c490ec85592802b6ace3328e3f717b0c8a
|
7
|
+
data.tar.gz: ac4f645dbb066ba5352fc8b2ef1c33e7486d2dff162cae9c66d31facd585a00abafec1802a4f6642610d0841869db64ab95f19ceb5bd826538570c725a59e6bc
|
data/.DS_Store
ADDED
Binary file
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
File without changes
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,59 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
blue_printer (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.0)
|
10
|
+
diff-lcs (1.3)
|
11
|
+
docile (1.3.1)
|
12
|
+
jaro_winkler (1.5.3)
|
13
|
+
json (2.2.0)
|
14
|
+
parallel (1.17.0)
|
15
|
+
parser (2.6.3.0)
|
16
|
+
ast (~> 2.4.0)
|
17
|
+
rainbow (3.0.0)
|
18
|
+
rake (10.5.0)
|
19
|
+
rspec (3.8.0)
|
20
|
+
rspec-core (~> 3.8.0)
|
21
|
+
rspec-expectations (~> 3.8.0)
|
22
|
+
rspec-mocks (~> 3.8.0)
|
23
|
+
rspec-core (3.8.0)
|
24
|
+
rspec-support (~> 3.8.0)
|
25
|
+
rspec-expectations (3.8.2)
|
26
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
27
|
+
rspec-support (~> 3.8.0)
|
28
|
+
rspec-mocks (3.8.0)
|
29
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
30
|
+
rspec-support (~> 3.8.0)
|
31
|
+
rspec-support (3.8.0)
|
32
|
+
rubocop (0.71.0)
|
33
|
+
jaro_winkler (~> 1.5.1)
|
34
|
+
parallel (~> 1.10)
|
35
|
+
parser (>= 2.6)
|
36
|
+
rainbow (>= 2.2.2, < 4.0)
|
37
|
+
ruby-progressbar (~> 1.7)
|
38
|
+
unicode-display_width (>= 1.4.0, < 1.7)
|
39
|
+
ruby-progressbar (1.10.1)
|
40
|
+
simplecov (0.16.1)
|
41
|
+
docile (~> 1.1)
|
42
|
+
json (>= 1.8, < 3)
|
43
|
+
simplecov-html (~> 0.10.0)
|
44
|
+
simplecov-html (0.10.2)
|
45
|
+
unicode-display_width (1.6.0)
|
46
|
+
|
47
|
+
PLATFORMS
|
48
|
+
ruby
|
49
|
+
|
50
|
+
DEPENDENCIES
|
51
|
+
blue_printer!
|
52
|
+
bundler (~> 2.0)
|
53
|
+
rake (~> 10.0)
|
54
|
+
rspec (~> 3.0)
|
55
|
+
rubocop (~> 0.71.0)
|
56
|
+
simplecov (~> 0.16.1)
|
57
|
+
|
58
|
+
BUNDLED WITH
|
59
|
+
2.0.1
|
data/README.md
ADDED
@@ -0,0 +1,45 @@
|
|
1
|
+
# BluePrinter
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/blue_printer`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Roadmap
|
8
|
+
|
9
|
+
- -Move it to the right directory-
|
10
|
+
- -Create a *.xctemplate directory-
|
11
|
+
- Create swift template files
|
12
|
+
- Create resources
|
13
|
+
- Fill it with boilerplate code
|
14
|
+
|
15
|
+
## Installation
|
16
|
+
|
17
|
+
Add this line to your application's Gemfile:
|
18
|
+
|
19
|
+
```ruby
|
20
|
+
gem 'blue_printer'
|
21
|
+
```
|
22
|
+
|
23
|
+
And then execute:
|
24
|
+
|
25
|
+
$ bundle
|
26
|
+
|
27
|
+
Or install it yourself as:
|
28
|
+
|
29
|
+
$ gem install blue_printer
|
30
|
+
|
31
|
+
## Usage
|
32
|
+
|
33
|
+
### Linting
|
34
|
+
|
35
|
+
If you want to lint your code u can just run `rubocop`
|
36
|
+
|
37
|
+
## Development
|
38
|
+
|
39
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
40
|
+
|
41
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/blue_printer.
|
data/Rakefile
ADDED
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>
|
@@ -0,0 +1,24 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import Foundation
|
4
|
+
|
5
|
+
protocol ___VARIABLE_productName___Interactable {
|
6
|
+
|
7
|
+
}
|
8
|
+
|
9
|
+
protocol ___VARIABLE_productName___DataStore {
|
10
|
+
|
11
|
+
}
|
12
|
+
|
13
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Interactable, ___VARIABLE_productName___DataStore {
|
14
|
+
|
15
|
+
// MARK: - Properties
|
16
|
+
private let presenter: ___VARIABLE_productName___Presentable
|
17
|
+
private var worker: ___VARIABLE_productName___DataProvidable?
|
18
|
+
|
19
|
+
// MARK: - Initializers
|
20
|
+
init(presenter: ___VARIABLE_productName___Presentable, worker: ___VARIABLE_productName___DataProvidable = ___VARIABLE_productName___Worker()) {
|
21
|
+
self.presenter = presenter
|
22
|
+
self.worker = worker
|
23
|
+
}
|
24
|
+
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import XCTest
|
4
|
+
@testable import ___PACKAGENAME___
|
5
|
+
|
6
|
+
class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
7
|
+
|
8
|
+
// MARK: - Spies
|
9
|
+
class PresenterSpy: ___VARIABLE_productName___Presentable {
|
10
|
+
// var presentLoadingViewCalled = false
|
11
|
+
// var presentErrorCalled = false
|
12
|
+
// var presentLoading: Bool = false
|
13
|
+
// var error: Error?
|
14
|
+
|
15
|
+
// func presentLoadingView(_ show: Bool) {
|
16
|
+
// presentLoadingViewCalled = true
|
17
|
+
// presentLoading = show
|
18
|
+
// }
|
19
|
+
//
|
20
|
+
// func present(_ error: Error) {
|
21
|
+
// presentErrorCalled = true
|
22
|
+
// self.error = error
|
23
|
+
// }
|
24
|
+
}
|
25
|
+
|
26
|
+
class WorkerSpy: ___VARIABLE_productName___DataProvidable {
|
27
|
+
|
28
|
+
}
|
29
|
+
|
30
|
+
// MARK: - Properties
|
31
|
+
var sut: ___VARIABLE_productName___Interactor!
|
32
|
+
var presenterSpy: PresenterSpy!
|
33
|
+
var workerSpy: WorkerSpy!
|
34
|
+
|
35
|
+
// MARK: - Setup
|
36
|
+
override func setUp() {
|
37
|
+
super.setUp()
|
38
|
+
|
39
|
+
presenterSpy = PresenterSpy()
|
40
|
+
workerSpy = WorkerSpy()
|
41
|
+
sut = ___VARIABLE_productName___Interactor(presenter: presenterSpy, worker: workerSpy)
|
42
|
+
}
|
43
|
+
|
44
|
+
// MARK: - Tests
|
45
|
+
func test() {
|
46
|
+
|
47
|
+
}
|
48
|
+
}
|
@@ -0,0 +1,37 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import Foundation
|
4
|
+
|
5
|
+
protocol ___VARIABLE_productName___Presentable {
|
6
|
+
|
7
|
+
}
|
8
|
+
|
9
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Presentable {
|
10
|
+
|
11
|
+
// MARK: - Properties
|
12
|
+
private weak var viewController: ___VARIABLE_productName___Displayable?
|
13
|
+
|
14
|
+
// MARK: - Initializers
|
15
|
+
init(viewController: ___VARIABLE_productName___Displayable) {
|
16
|
+
self.viewController = viewController
|
17
|
+
}
|
18
|
+
|
19
|
+
}
|
20
|
+
|
21
|
+
//extension ___FILEBASENAMEASIDENTIFIER___: LoadingPresentable {
|
22
|
+
// func presentLoadingView(_ show: Bool) {
|
23
|
+
// viewController?.displayLoadingView(show)
|
24
|
+
// }
|
25
|
+
//}
|
26
|
+
|
27
|
+
//extension ___FILEBASENAMEASIDENTIFIER___: ErrorPresentable {
|
28
|
+
// func present(_ error: Error) {
|
29
|
+
//
|
30
|
+
// }
|
31
|
+
//}
|
32
|
+
|
33
|
+
//extension ___FILEBASENAMEASIDENTIFIER___: EmptyStatePresentable {
|
34
|
+
// func presentEmptyState() {
|
35
|
+
// viewController?.displayEmptyState()
|
36
|
+
// }
|
37
|
+
//}
|
@@ -0,0 +1,28 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import XCTest
|
4
|
+
@testable import ___PACKAGENAME___
|
5
|
+
|
6
|
+
class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
7
|
+
|
8
|
+
// MARK: - Spies
|
9
|
+
class ViewControllerSpy: ___VARIABLE_productName___Displayable {
|
10
|
+
|
11
|
+
}
|
12
|
+
|
13
|
+
// MARK: - Properties
|
14
|
+
var sut: ___VARIABLE_productName___Presenter!
|
15
|
+
var viewControllerSpy: ViewControllerSpy!
|
16
|
+
|
17
|
+
// MARK: - Setup
|
18
|
+
override func setUp() {
|
19
|
+
super.setUp()
|
20
|
+
viewControllerSpy = ViewControllerSpy()
|
21
|
+
sut = ___VARIABLE_productName___Presenter(viewController: viewControllerSpy)
|
22
|
+
}
|
23
|
+
|
24
|
+
// MARK: - Tests
|
25
|
+
func test() {
|
26
|
+
|
27
|
+
}
|
28
|
+
}
|
@@ -0,0 +1,24 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import Foundation
|
4
|
+
|
5
|
+
protocol ___VARIABLE_productName___Routable {
|
6
|
+
|
7
|
+
}
|
8
|
+
|
9
|
+
protocol ___VARIABLE_productName___DataPassing {
|
10
|
+
var dataStore: ___VARIABLE_productName___DataStore? { get }
|
11
|
+
}
|
12
|
+
|
13
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___Routable, ___VARIABLE_productName___DataPassing {
|
14
|
+
|
15
|
+
// MARK: - Properties
|
16
|
+
var dataStore: ___VARIABLE_productName___DataStore?
|
17
|
+
weak var viewController: UIViewController?
|
18
|
+
|
19
|
+
// MARK: - Routing
|
20
|
+
|
21
|
+
// MARK: - Data passing
|
22
|
+
|
23
|
+
// MARK: - Navigation
|
24
|
+
}
|
@@ -0,0 +1,43 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import UIKit
|
4
|
+
|
5
|
+
protocol ___VARIABLE_productName___Displayable: class {
|
6
|
+
|
7
|
+
}
|
8
|
+
|
9
|
+
class ___FILEBASENAMEASIDENTIFIER___: UIViewController, ___VARIABLE_productName___Displayable {
|
10
|
+
|
11
|
+
// MARK: - Properties
|
12
|
+
var router: (___VARIABLE_productName___Routable & ___VARIABLE_productName___DataPassing)!
|
13
|
+
private var interactor: ___VARIABLE_productName___Interactable!
|
14
|
+
|
15
|
+
// MARK: - Initializers
|
16
|
+
override init(nibName nibNameOrNil: String?, bundle nibBundleOrNil: Bundle?) {
|
17
|
+
super.init(nibName: nibNameOrNil, bundle: nibBundleOrNil)
|
18
|
+
setupVIP()
|
19
|
+
}
|
20
|
+
|
21
|
+
required init?(coder aDecoder: NSCoder) {
|
22
|
+
fatalError("init(coder:) has not been implemented")
|
23
|
+
}
|
24
|
+
|
25
|
+
/// Use this initializer only for unit testing
|
26
|
+
init(interactor: ___VARIABLE_productName___Interactable, router: (___VARIABLE_productName___Routable & ___VARIABLE_productName___DataPassing)) {
|
27
|
+
super.init(nibName: nil, bundle: nil)
|
28
|
+
self.interactor = interactor
|
29
|
+
self.router = router
|
30
|
+
}
|
31
|
+
|
32
|
+
// MARK: - Setup VIP
|
33
|
+
private func setupVIP() {
|
34
|
+
let presenter = ___VARIABLE_productName___Presenter(viewController: self)
|
35
|
+
let interactor = ___VARIABLE_productName___Interactor(presenter: presenter)
|
36
|
+
self.interactor = interactorrouter = ___VARIABLE_productName___Router(viewController: self, dataStore: interactor)
|
37
|
+
}
|
38
|
+
|
39
|
+
// MARK: - Lifecycle
|
40
|
+
override func viewDidLoad() {
|
41
|
+
super.viewDidLoad()
|
42
|
+
}
|
43
|
+
}
|
@@ -0,0 +1,25 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="14109" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
|
3
|
+
<device id="retina4_7" orientation="portrait">
|
4
|
+
<adaptation id="fullscreen"/>
|
5
|
+
</device>
|
6
|
+
<dependencies>
|
7
|
+
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="14088"/>
|
8
|
+
<capability name="Safe area layout guides" minToolsVersion="9.0"/>
|
9
|
+
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
|
10
|
+
</dependencies>
|
11
|
+
<objects>
|
12
|
+
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="___FILEBASENAMEASIDENTIFIER___" customModuleProvider="target">
|
13
|
+
<connections>
|
14
|
+
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
|
15
|
+
</connections>
|
16
|
+
</placeholder>
|
17
|
+
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
|
18
|
+
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
|
19
|
+
<rect key="frame" x="0.0" y="0.0" width="375" height="667"/>
|
20
|
+
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
21
|
+
<color key="backgroundColor" red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
|
22
|
+
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
|
23
|
+
</view>
|
24
|
+
</objects>
|
25
|
+
</document>
|
@@ -0,0 +1,37 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import XCTest
|
4
|
+
@testable import ___PACKAGENAME___
|
5
|
+
|
6
|
+
class ___FILEBASENAMEASIDENTIFIER___: XCTestCase {
|
7
|
+
|
8
|
+
// MARK: - Spies
|
9
|
+
class InteractorSpy: ___VARIABLE_productName___Interactable {
|
10
|
+
|
11
|
+
}
|
12
|
+
|
13
|
+
class RouterSpy: ___VARIABLE_productName___Routable, ___VARIABLE_productName___DataPassing {
|
14
|
+
|
15
|
+
var dataStore: ___VARIABLE_productName___DataStore?
|
16
|
+
}
|
17
|
+
|
18
|
+
// MARK: - Properties
|
19
|
+
var sut: ___VARIABLE_productName___ViewController!
|
20
|
+
var interactorSpy: InteractorSpy!
|
21
|
+
var routerSpy: RouterSpy!
|
22
|
+
|
23
|
+
// MARK: - Setup
|
24
|
+
override func setUp() {
|
25
|
+
super.setUp()
|
26
|
+
interactorSpy = InteractorSpy()
|
27
|
+
routerSpy = RouterSpy()
|
28
|
+
sut = ___VARIABLE_productName___ViewController(interactor: interactorSpy, router: routerSpy)
|
29
|
+
sut.beginAppearanceTransition(true, animated: false)
|
30
|
+
sut.endAppearanceTransition()
|
31
|
+
}
|
32
|
+
|
33
|
+
// MARK: - Tests
|
34
|
+
func test() {
|
35
|
+
|
36
|
+
}
|
37
|
+
}
|
@@ -0,0 +1,17 @@
|
|
1
|
+
//___FILEHEADER___
|
2
|
+
|
3
|
+
import Foundation
|
4
|
+
|
5
|
+
protocol ___VARIABLE_productName___DataProvidable {
|
6
|
+
|
7
|
+
}
|
8
|
+
|
9
|
+
class ___FILEBASENAMEASIDENTIFIER___: ___VARIABLE_productName___DataProvidable {
|
10
|
+
|
11
|
+
// MARK: - Properties
|
12
|
+
|
13
|
+
// MARK: - Initializers
|
14
|
+
init() {
|
15
|
+
|
16
|
+
}
|
17
|
+
}
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "blue_printer"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
@@ -0,0 +1,43 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "blue_printer/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "blue_printer"
|
8
|
+
spec.version = BluePrinter::VERSION
|
9
|
+
spec.authors = ["Dunya Kirkali"]
|
10
|
+
spec.email = ["dunyakirkali@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{xctemplate blue printer}
|
13
|
+
spec.description = %q{Will generate xctemplate files for CleanSwift}
|
14
|
+
spec.homepage = "https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer"
|
15
|
+
|
16
|
+
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
17
|
+
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
18
|
+
if spec.respond_to?(:metadata)
|
19
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
20
|
+
|
21
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
22
|
+
spec.metadata["source_code_uri"] = "https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer/browse"
|
23
|
+
spec.metadata["changelog_uri"] = "https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer/browse/CHANGELOG.md"
|
24
|
+
else
|
25
|
+
raise "RubyGems 2.0 or newer is required to protect against " \
|
26
|
+
"public gem pushes."
|
27
|
+
end
|
28
|
+
|
29
|
+
# Specify which files should be added to the gem when it is released.
|
30
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
31
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
32
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
33
|
+
end
|
34
|
+
spec.bindir = "exe"
|
35
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
36
|
+
spec.require_paths = ["lib"]
|
37
|
+
|
38
|
+
spec.add_development_dependency "bundler", "~> 2.0"
|
39
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
40
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
41
|
+
spec.add_development_dependency "simplecov", "~> 0.16.1"
|
42
|
+
spec.add_development_dependency "rubocop", "~> 0.71.0"
|
43
|
+
end
|
data/lib/blue_printer.rb
ADDED
@@ -0,0 +1,37 @@
|
|
1
|
+
require "blue_printer/version"
|
2
|
+
require "fileutils"
|
3
|
+
|
4
|
+
module BluePrinter
|
5
|
+
class Error < StandardError; end
|
6
|
+
|
7
|
+
XCODE_TEMPLATE_PATH = File.join("Library", "Developer", "Xcode", "Templates")
|
8
|
+
TEMPLATE_DIR = File.join(File.expand_path('~'), XCODE_TEMPLATE_PATH)
|
9
|
+
IOS_TEMPLATE_DIR = File.join(TEMPLATE_DIR, "ios-xcode-templates")
|
10
|
+
TEMPLATE_NAME = "VIP Architecture.xctemplate"
|
11
|
+
|
12
|
+
def self.root
|
13
|
+
File.dirname __dir__
|
14
|
+
end
|
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
|
+
def self.move_to_xcode_template_directory
|
34
|
+
FileUtils.mkdir_p IOS_TEMPLATE_DIR
|
35
|
+
FileUtils.copy_entry File.join(root, TEMPLATE_NAME), File.join(IOS_TEMPLATE_DIR, TEMPLATE_NAME)
|
36
|
+
end
|
37
|
+
end
|
metadata
ADDED
@@ -0,0 +1,143 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: blue_printer
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dunya Kirkali
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2019-06-20 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '2.0'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '2.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: simplecov
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.16.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 0.16.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rubocop
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.71.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.71.0
|
83
|
+
description: Will generate xctemplate files for CleanSwift
|
84
|
+
email:
|
85
|
+
- dunyakirkali@gmail.com
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".DS_Store"
|
91
|
+
- ".gitignore"
|
92
|
+
- ".rspec"
|
93
|
+
- ".travis.yml"
|
94
|
+
- CHANGELOG.md
|
95
|
+
- Gemfile
|
96
|
+
- Gemfile.lock
|
97
|
+
- README.md
|
98
|
+
- Rakefile
|
99
|
+
- VIP Architecture.xctemplate/TemplateIcon.png
|
100
|
+
- VIP Architecture.xctemplate/TemplateIcon@2x.png
|
101
|
+
- VIP Architecture.xctemplate/TemplateInfo.plist
|
102
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___Interactor.swift
|
103
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___InteractorTests.swift
|
104
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___Presenter.swift
|
105
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___PresenterTests.swift
|
106
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___Router.swift
|
107
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___ViewController.swift
|
108
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___ViewController.xib
|
109
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___ViewControllerTests.swift
|
110
|
+
- VIP Architecture.xctemplate/___FILEBASENAME___Worker.swift
|
111
|
+
- bin/console
|
112
|
+
- bin/setup
|
113
|
+
- blue_printer.gemspec
|
114
|
+
- lib/blue_printer.rb
|
115
|
+
- lib/blue_printer/version.rb
|
116
|
+
homepage: https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer
|
117
|
+
licenses: []
|
118
|
+
metadata:
|
119
|
+
allowed_push_host: https://rubygems.org
|
120
|
+
homepage_uri: https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer
|
121
|
+
source_code_uri: https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer/browse
|
122
|
+
changelog_uri: https://p-bitbucket.nl.eu.abnamro.com:7999/users/c44755/repos/blue_printer/browse/CHANGELOG.md
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ">="
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.6.14
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: xctemplate blue printer
|
143
|
+
test_files: []
|