-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #123 from Automattic/add/migrate-to-separate-modules
Migrate to separate modules for `Gravatar` and `GravatarUI`
- Loading branch information
Showing
14 changed files
with
177 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
Pod::Spec.new do |s| | ||
s.name = 'GravatarUI' | ||
s.version = '0.1.1' | ||
s.summary = 'A convient library of Gravatar UI components' | ||
|
||
s.homepage = 'https://gravatar.com' | ||
s.license = { :type => 'Mozilla Public License v2', :file => 'LICENSE.md' } | ||
s.authors = 'Automattic, Inc.' | ||
s.source = { | ||
:git => 'https://github.com/Automattic/Gravatar-SDK-iOS.git', | ||
:tag => s.version.to_s | ||
} | ||
s.documentation_url = 'https://automattic.github.io/Gravatar-SDK-iOS/' | ||
|
||
s.swift_version = '5.9' | ||
|
||
ios_deployment_target = '15.0' | ||
s.ios.deployment_target = ios_deployment_target | ||
|
||
s.source_files = 'Sources/GravatarUI/**/*.swift' | ||
s.dependency 'Gravatar', s.version.to_s | ||
s.ios.framework = 'UIKit' | ||
|
||
s.test_spec 'GravatarUITests' do |swift_unit_tests| | ||
swift_unit_tests.platforms = { | ||
:ios => ios_deployment_target, | ||
} | ||
swift_unit_tests.source_files = [ | ||
'Tests/GravatarUITests/**/*.swift' | ||
] | ||
swift_unit_tests.resource_bundles = { | ||
GravatarUITestsResources: [ | ||
'Tests/GravatarUITests/Resources/**/*' | ||
] | ||
} | ||
swift_unit_tests.requires_app_host = false | ||
end | ||
end | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import Foundation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import XCTest | ||
|
||
final class RenameMeTests_swift: 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 { | ||
// This is an example of a functional test case. | ||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||
// Any test you write for XCTest can be annotated as throws and async. | ||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. | ||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. | ||
} | ||
|
||
func testPerformanceExample() throws { | ||
// This is an example of a performance test case. | ||
self.measure { | ||
// Put the code you want to measure the time of here. | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import Foundation | ||
|
||
#if !SWIFT_PACKAGE | ||
private class BundleFinder: NSObject {} | ||
#endif | ||
|
||
extension Bundle { | ||
/// Returns the GravatarUITests Bundle | ||
/// If installed via CocoaPods, this will be GravatarUITestsResources.bundle, | ||
/// otherwise it will be the module bundle. | ||
/// | ||
public class var testsBundle: Bundle { | ||
#if SWIFT_PACKAGE | ||
return Bundle.module | ||
#else | ||
let defaultBundle = Bundle(for: BundleFinder.self) | ||
// If installed with CocoaPods, resources will be in GravatarUITestsResources.bundle | ||
if let bundleURL = defaultBundle.resourceURL, | ||
let resourceBundle = Bundle(url: bundleURL.appendingPathComponent("GravatarUITestsResources.bundle")) | ||
{ | ||
return resourceBundle | ||
} | ||
// Otherwise, the default bundle is used for resources | ||
return defaultBundle | ||
#endif | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
import XCTest | ||
|
||
final class RenameMeTests_swift: 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 { | ||
// This is an example of a functional test case. | ||
// Use XCTAssert and related functions to verify your tests produce the correct results. | ||
// Any test you write for XCTest can be annotated as throws and async. | ||
// Mark your test throws to produce an unexpected failure when your test encounters an uncaught error. | ||
// Mark your test async to allow awaiting for asynchronous code to complete. Check the results with assertions afterwards. | ||
} | ||
|
||
func testPerformanceExample() throws { | ||
// This is an example of a performance test case. | ||
self.measure { | ||
// Put the code you want to measure the time of here. | ||
} | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.