From 966b164afffe461740c5f78e934508c773c61885 Mon Sep 17 00:00:00 2001 From: Abbey Jackson Date: Wed, 25 Oct 2017 12:08:28 -0700 Subject: [PATCH 1/6] Update swift2.stencil Change private access to private(set) in order to expose image name. --- templates/xcassets/swift2.stencil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/xcassets/swift2.stencil b/templates/xcassets/swift2.stencil index fc39237..0f6294e 100644 --- a/templates/xcassets/swift2.stencil +++ b/templates/xcassets/swift2.stencil @@ -19,7 +19,7 @@ typealias {{enumName}}Type = {{imageType}} struct {{imageType}} { - private var name: String + private(set) var name: String var image: {{imageAlias}} { let bundle = NSBundle(forClass: BundleToken.self) From fb474315013091fa4ebdaed651ed59d49af15951 Mon Sep 17 00:00:00 2001 From: Abbey Jackson Date: Wed, 25 Oct 2017 12:12:20 -0700 Subject: [PATCH 2/6] Update swift3.stencil Change fileprivate access to fileprivate(set) in order to expose image name. --- templates/xcassets/swift3.stencil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/xcassets/swift3.stencil b/templates/xcassets/swift3.stencil index 06d0df6..e037fb4 100644 --- a/templates/xcassets/swift3.stencil +++ b/templates/xcassets/swift3.stencil @@ -22,7 +22,7 @@ typealias {{enumName}}Type = {{imageType}} struct {{imageType}} { - fileprivate var name: String + fileprivate(set) var name: String var image: {{imageAlias}} { let bundle = Bundle(for: BundleToken.self) From b15c6b41f89768ada3655986c747b7b6cdc3e281 Mon Sep 17 00:00:00 2001 From: Abbey Jackson Date: Wed, 25 Oct 2017 12:12:41 -0700 Subject: [PATCH 3/6] Update swift4.stencil Change fileprivate access to fileprivate(set) in order to expose image name. --- templates/xcassets/swift4.stencil | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/xcassets/swift4.stencil b/templates/xcassets/swift4.stencil index a6e6029..051d599 100644 --- a/templates/xcassets/swift4.stencil +++ b/templates/xcassets/swift4.stencil @@ -22,7 +22,7 @@ typealias {{enumName}}Type = {{imageType}} struct {{imageType}} { - fileprivate var name: String + fileprivate(set) var name: String var image: {{imageAlias}} { let bundle = Bundle(for: BundleToken.self) From d95faff8c18a99735c7bea6541e8bfff3c48bbc4 Mon Sep 17 00:00:00 2001 From: Abbey Jackson Date: Wed, 25 Oct 2017 18:56:21 -0700 Subject: [PATCH 4/6] Generate tests, all tests passing. --- Tests/Expected/XCAssets/swift2-context-all-customname.swift | 2 +- Tests/Expected/XCAssets/swift2-context-all-no-all-values.swift | 2 +- Tests/Expected/XCAssets/swift2-context-all.swift | 2 +- Tests/Expected/XCAssets/swift3-context-all-customname.swift | 2 +- Tests/Expected/XCAssets/swift3-context-all-no-all-values.swift | 2 +- Tests/Expected/XCAssets/swift3-context-all.swift | 2 +- Tests/Expected/XCAssets/swift4-context-all-customname.swift | 2 +- Tests/Expected/XCAssets/swift4-context-all-no-all-values.swift | 2 +- Tests/Expected/XCAssets/swift4-context-all.swift | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Tests/Expected/XCAssets/swift2-context-all-customname.swift b/Tests/Expected/XCAssets/swift2-context-all-customname.swift index b62d2f9..e5d4aef 100644 --- a/Tests/Expected/XCAssets/swift2-context-all-customname.swift +++ b/Tests/Expected/XCAssets/swift2-context-all-customname.swift @@ -15,7 +15,7 @@ typealias XCTAssetsType = XCTImageAsset struct XCTImageAsset { - private var name: String + private(set) var name: String var image: XCTImage { let bundle = NSBundle(forClass: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift2-context-all-no-all-values.swift b/Tests/Expected/XCAssets/swift2-context-all-no-all-values.swift index 31a445d..6bf75a3 100644 --- a/Tests/Expected/XCAssets/swift2-context-all-no-all-values.swift +++ b/Tests/Expected/XCAssets/swift2-context-all-no-all-values.swift @@ -15,7 +15,7 @@ typealias AssetType = ImageAsset struct ImageAsset { - private var name: String + private(set) var name: String var image: Image { let bundle = NSBundle(forClass: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift2-context-all.swift b/Tests/Expected/XCAssets/swift2-context-all.swift index 0206ef0..0cd902a 100644 --- a/Tests/Expected/XCAssets/swift2-context-all.swift +++ b/Tests/Expected/XCAssets/swift2-context-all.swift @@ -15,7 +15,7 @@ typealias AssetType = ImageAsset struct ImageAsset { - private var name: String + private(set) var name: String var image: Image { let bundle = NSBundle(forClass: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift3-context-all-customname.swift b/Tests/Expected/XCAssets/swift3-context-all-customname.swift index aca0a07..d5b1865 100644 --- a/Tests/Expected/XCAssets/swift3-context-all-customname.swift +++ b/Tests/Expected/XCAssets/swift3-context-all-customname.swift @@ -17,7 +17,7 @@ typealias XCTAssetsType = XCTImageAsset struct XCTImageAsset { - fileprivate var name: String + fileprivate(set) var name: String var image: XCTImage { let bundle = Bundle(for: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift3-context-all-no-all-values.swift b/Tests/Expected/XCAssets/swift3-context-all-no-all-values.swift index 5ceaf87..bbad947 100644 --- a/Tests/Expected/XCAssets/swift3-context-all-no-all-values.swift +++ b/Tests/Expected/XCAssets/swift3-context-all-no-all-values.swift @@ -17,7 +17,7 @@ typealias AssetType = ImageAsset struct ImageAsset { - fileprivate var name: String + fileprivate(set) var name: String var image: Image { let bundle = Bundle(for: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift3-context-all.swift b/Tests/Expected/XCAssets/swift3-context-all.swift index 47dec5d..3b19922 100644 --- a/Tests/Expected/XCAssets/swift3-context-all.swift +++ b/Tests/Expected/XCAssets/swift3-context-all.swift @@ -17,7 +17,7 @@ typealias AssetType = ImageAsset struct ImageAsset { - fileprivate var name: String + fileprivate(set) var name: String var image: Image { let bundle = Bundle(for: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift4-context-all-customname.swift b/Tests/Expected/XCAssets/swift4-context-all-customname.swift index 3497ea1..c072b71 100644 --- a/Tests/Expected/XCAssets/swift4-context-all-customname.swift +++ b/Tests/Expected/XCAssets/swift4-context-all-customname.swift @@ -17,7 +17,7 @@ typealias XCTAssetsType = XCTImageAsset struct XCTImageAsset { - fileprivate var name: String + fileprivate(set) var name: String var image: XCTImage { let bundle = Bundle(for: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift4-context-all-no-all-values.swift b/Tests/Expected/XCAssets/swift4-context-all-no-all-values.swift index 04ed7d0..3fb8655 100644 --- a/Tests/Expected/XCAssets/swift4-context-all-no-all-values.swift +++ b/Tests/Expected/XCAssets/swift4-context-all-no-all-values.swift @@ -17,7 +17,7 @@ typealias AssetType = ImageAsset struct ImageAsset { - fileprivate var name: String + fileprivate(set) var name: String var image: Image { let bundle = Bundle(for: BundleToken.self) diff --git a/Tests/Expected/XCAssets/swift4-context-all.swift b/Tests/Expected/XCAssets/swift4-context-all.swift index 5c70e78..afe6b5a 100644 --- a/Tests/Expected/XCAssets/swift4-context-all.swift +++ b/Tests/Expected/XCAssets/swift4-context-all.swift @@ -17,7 +17,7 @@ typealias AssetType = ImageAsset struct ImageAsset { - fileprivate var name: String + fileprivate(set) var name: String var image: Image { let bundle = Bundle(for: BundleToken.self) From af3892ec5bd43c6b68f022557b599cef9e114ea7 Mon Sep 17 00:00:00 2001 From: Abbey Jackson Date: Wed, 25 Oct 2017 18:56:32 -0700 Subject: [PATCH 5/6] Update Changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2be7266..605107b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,14 @@ _None_ _None_ +## 2.2.1 + +### Bug Fixes + +* XCAssets: exposed getter for image name string. + [Abbey Jackson](https://github.com/abbeyjackson) + [#85](https://github.com/SwiftGen/templates/pull/85) + ## 2.2.0 ### Bug Fixes From 2ce9a8c329b38db2d5689499a00624aabdb8f2b6 Mon Sep 17 00:00:00 2001 From: Abbey Jackson Date: Thu, 26 Oct 2017 10:26:42 -0700 Subject: [PATCH 6/6] Update CHANGELOG.md Moved entry to Master section on Changelog --- CHANGELOG.md | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 605107b..c3a8a2b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,9 @@ ### Bug Fixes -_None_ +* XCAssets: exposed getter for image name string. + [Abbey Jackson](https://github.com/abbeyjackson) + [#85](https://github.com/SwiftGen/templates/pull/85) ### Breaking Changes @@ -20,14 +22,6 @@ _None_ _None_ -## 2.2.1 - -### Bug Fixes - -* XCAssets: exposed getter for image name string. - [Abbey Jackson](https://github.com/abbeyjackson) - [#85](https://github.com/SwiftGen/templates/pull/85) - ## 2.2.0 ### Bug Fixes