Skip to content

Commit

Permalink
Merge pull request #21 from mergesort/cocoapods
Browse files Browse the repository at this point in the history
Cocoapods Finishing Touches
  • Loading branch information
khanlou authored Sep 30, 2017
2 parents d214c69 + 99a0b1b commit c56aa70
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 19 deletions.
1 change: 1 addition & 0 deletions .swift-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4.0
6 changes: 6 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
source 'https://rubygems.org'

gem 'cocoapods', '~> 1.2.0'
gem 'cocoapods-keys'
gem 'xcpretty'
gem 'xcodeproj'
90 changes: 90 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
GEM
remote: https://rubygems.org/
specs:
CFPropertyList (2.3.5)
RubyInline (3.12.4)
ZenTest (~> 4.3)
ZenTest (4.11.1)
activesupport (4.2.7.1)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
claide (1.0.1)
cocoapods (1.2.0)
activesupport (>= 4.0.2, < 5)
claide (>= 1.0.1, < 2.0)
cocoapods-core (= 1.2.0)
cocoapods-deintegrate (>= 1.0.1, < 2.0)
cocoapods-downloader (>= 1.1.3, < 2.0)
cocoapods-plugins (>= 1.0.0, < 2.0)
cocoapods-search (>= 1.0.0, < 2.0)
cocoapods-stats (>= 1.0.0, < 2.0)
cocoapods-trunk (>= 1.1.2, < 2.0)
cocoapods-try (>= 1.1.0, < 2.0)
colored (~> 1.2)
escape (~> 0.0.4)
fourflusher (~> 2.0.1)
gh_inspector (~> 1.0)
molinillo (~> 0.5.5)
nap (~> 1.0)
ruby-macho (~> 0.2.5)
xcodeproj (>= 1.4.1, < 2.0)
cocoapods-core (1.2.0)
activesupport (>= 4.0.2, < 5)
fuzzy_match (~> 2.0.4)
nap (~> 1.0)
cocoapods-deintegrate (1.0.1)
cocoapods-downloader (1.1.3)
cocoapods-keys (2.0.0)
dotenv
osx_keychain
cocoapods-plugins (1.0.0)
nap
cocoapods-search (1.0.0)
cocoapods-stats (1.0.0)
cocoapods-trunk (1.1.2)
nap (>= 0.8, < 2.0)
netrc (= 0.7.8)
cocoapods-try (1.1.0)
colored (1.2)
dotenv (2.2.0)
escape (0.0.4)
fourflusher (2.0.1)
fuzzy_match (2.0.4)
gh_inspector (1.0.3)
i18n (0.8.0)
json (1.8.6)
minitest (5.10.1)
molinillo (0.5.6)
nanaimo (0.2.3)
nap (1.1.0)
netrc (0.7.8)
osx_keychain (1.0.1)
RubyInline (~> 3)
rouge (1.11.1)
ruby-macho (0.2.6)
thread_safe (0.3.5)
tzinfo (1.2.2)
thread_safe (~> 0.1)
xcodeproj (1.4.2)
CFPropertyList (~> 2.3.3)
activesupport (>= 3)
claide (>= 1.0.1, < 2.0)
colored (~> 1.2)
nanaimo (~> 0.2.3)
xcpretty (0.2.4)
rouge (~> 1.8)

PLATFORMS
ruby

DEPENDENCIES
cocoapods (~> 1.2.0)
cocoapods-keys
xcodeproj
xcpretty

BUNDLED WITH
1.10.6
5 changes: 5 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import PackageDescription

let package = Package(
name: "Promises"
)
28 changes: 13 additions & 15 deletions Promise.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@
1A2A8CFE1D5D764600421E3E /* PromiseRetryTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A2A8CFD1D5D764600421E3E /* PromiseRetryTests.swift */; };
1A42330C1F6ECC250045B066 /* PromiseKickoffTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A42330B1F6ECC250045B066 /* PromiseKickoffTests.swift */; };
1A7CC22F1DF4D37400929E7C /* PromiseEnsureTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A7CC22E1DF4D37400929E7C /* PromiseEnsureTests.swift */; };
1AE9F56F1D526F8A00185453 /* Promise+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9F56E1D526F8A00185453 /* Promise+Extras.swift */; };
1AF54F3B1D67D60000557CCB /* PromiseZipTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AF54F3A1D67D60000557CCB /* PromiseZipTests.swift */; };
1AFA1FA01D8A0C9500E4F76E /* PromiseThrowsTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AFA1F9F1D8A0C9500E4F76E /* PromiseThrowsTests.swift */; };
1AFF80FA1D5166C000C55D5A /* delay.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF80F91D5166C000C55D5A /* delay.swift */; };
1AFF80FC1D51676700C55D5A /* PromiseAllTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AFF80FB1D51676700C55D5A /* PromiseAllTests.swift */; };
2648083B1E54221900F01140 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 264808391E54221900F01140 /* Promise.swift */; };
2648083C1E54221900F01140 /* Promise+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2648083A1E54221900F01140 /* Promise+Extras.swift */; };
3454F9D21D4FACD000985BBF /* Promise.h in Headers */ = {isa = PBXBuildFile; fileRef = 3454F9D11D4FACD000985BBF /* Promise.h */; settings = {ATTRIBUTES = (Public, ); }; };
3454F9D91D4FACD000985BBF /* Promise.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3454F9CE1D4FACD000985BBF /* Promise.framework */; };
3454F9DE1D4FACD000985BBF /* PromiseTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3454F9DD1D4FACD000985BBF /* PromiseTests.swift */; };
3454F9E91D4FACFB00985BBF /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3454F9E81D4FACFB00985BBF /* Promise.swift */; };
52F3C1BE1ECE503D0028CA53 /* Promise+Extras.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1AE9F56E1D526F8A00185453 /* Promise+Extras.swift */; };
52F3C1BF1ECE503D0028CA53 /* Promise.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3454F9E81D4FACFB00985BBF /* Promise.swift */; };
52F3C1C21ECE503D0028CA53 /* Promise.h in Headers */ = {isa = PBXBuildFile; fileRef = 3454F9D11D4FACD000985BBF /* Promise.h */; settings = {ATTRIBUTES = (Public, ); }; };
72B61D3C1E00E5830008E829 /* Wrench.swift in Sources */ = {isa = PBXBuildFile; fileRef = 72B61D3B1E00E5830008E829 /* Wrench.swift */; };
/* End PBXBuildFile section */

Expand All @@ -49,19 +46,18 @@
1A2A8CFD1D5D764600421E3E /* PromiseRetryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseRetryTests.swift; sourceTree = "<group>"; };
1A42330B1F6ECC250045B066 /* PromiseKickoffTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseKickoffTests.swift; sourceTree = "<group>"; };
1A7CC22E1DF4D37400929E7C /* PromiseEnsureTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseEnsureTests.swift; sourceTree = "<group>"; };
1AE9F56E1D526F8A00185453 /* Promise+Extras.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "Promise+Extras.swift"; sourceTree = "<group>"; };
1AF54F3A1D67D60000557CCB /* PromiseZipTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseZipTests.swift; sourceTree = "<group>"; };
1AFA1F9F1D8A0C9500E4F76E /* PromiseThrowsTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseThrowsTests.swift; sourceTree = "<group>"; };
1AFF80F91D5166C000C55D5A /* delay.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = delay.swift; sourceTree = "<group>"; };
1AFF80FB1D51676700C55D5A /* PromiseAllTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PromiseAllTests.swift; sourceTree = "<group>"; };
264808391E54221900F01140 /* Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = Promise.swift; path = Sources/Promise.swift; sourceTree = SOURCE_ROOT; };
2648083A1E54221900F01140 /* Promise+Extras.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; name = "Promise+Extras.swift"; path = "Sources/Promise+Extras.swift"; sourceTree = SOURCE_ROOT; };
3454F9CE1D4FACD000985BBF /* Promise.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Promise.framework; sourceTree = BUILT_PRODUCTS_DIR; };
3454F9D11D4FACD000985BBF /* Promise.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Promise.h; sourceTree = "<group>"; };
3454F9D31D4FACD000985BBF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3454F9D81D4FACD000985BBF /* PromiseTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PromiseTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
3454F9DD1D4FACD000985BBF /* PromiseTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PromiseTests.swift; sourceTree = "<group>"; };
3454F9DF1D4FACD000985BBF /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
3454F9E81D4FACFB00985BBF /* Promise.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Promise.swift; sourceTree = "<group>"; };
52F3C1C71ECE503D0028CA53 /* Promise.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Promise.framework; sourceTree = BUILT_PRODUCTS_DIR; };
72B61D3B1E00E5830008E829 /* Wrench.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Wrench.swift; sourceTree = "<group>"; };
76E25E381D8483D0000A58DF /* Promise.playground */ = {isa = PBXFileReference; lastKnownFileType = file.playground; path = Promise.playground; sourceTree = "<group>"; };
/* End PBXFileReference section */
Expand Down Expand Up @@ -115,9 +111,9 @@
3454F9D01D4FACD000985BBF /* Promise */ = {
isa = PBXGroup;
children = (
264808391E54221900F01140 /* Promise.swift */,
2648083A1E54221900F01140 /* Promise+Extras.swift */,
3454F9D11D4FACD000985BBF /* Promise.h */,
3454F9E81D4FACFB00985BBF /* Promise.swift */,
1AE9F56E1D526F8A00185453 /* Promise+Extras.swift */,
3454F9D31D4FACD000985BBF /* Info.plist */,
);
path = Promise;
Expand Down Expand Up @@ -232,7 +228,7 @@
TargetAttributes = {
3454F9CD1D4FACD000985BBF = {
CreatedOnToolsVersion = 7.3.1;
LastSwiftMigration = 0800;
LastSwiftMigration = 0820;
};
3454F9D71D4FACD000985BBF = {
CreatedOnToolsVersion = 7.3.1;
Expand Down Expand Up @@ -288,8 +284,8 @@
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
1AE9F56F1D526F8A00185453 /* Promise+Extras.swift in Sources */,
3454F9E91D4FACFB00985BBF /* Promise.swift in Sources */,
2648083C1E54221900F01140 /* Promise+Extras.swift in Sources */,
2648083B1E54221900F01140 /* Promise.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
Expand Down Expand Up @@ -444,7 +440,7 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Onone";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Debug;
};
Expand All @@ -463,13 +459,14 @@
PRODUCT_NAME = "$(TARGET_NAME)";
SKIP_INSTALL = YES;
SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule";
SWIFT_VERSION = 3.0;
SWIFT_VERSION = 4.0;
};
name = Release;
};
3454F9E61D4FACD000985BBF /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
INFOPLIST_FILE = PromiseTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.khanlou.PromiseTests;
Expand All @@ -481,6 +478,7 @@
3454F9E71D4FACD000985BBF /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES;
INFOPLIST_FILE = PromiseTests/Info.plist;
LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks";
PRODUCT_BUNDLE_IDENTIFIER = com.khanlou.PromiseTests;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52F3C1BC1ECE503D0028CA53"
BuildableName = "Promise.framework"
BuildableName = "Promise Mac"
BlueprintName = "Promise Mac"
ReferencedContainer = "container:Promise.xcodeproj">
</BuildableReference>
Expand All @@ -26,6 +26,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
Expand All @@ -36,6 +37,7 @@
buildConfiguration = "Debug"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
language = ""
launchStyle = "0"
useCustomWorkingDirectory = "NO"
ignoresPersistentStateOnLaunch = "NO"
Expand All @@ -46,7 +48,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52F3C1BC1ECE503D0028CA53"
BuildableName = "Promise.framework"
BuildableName = "Promise Mac"
BlueprintName = "Promise Mac"
ReferencedContainer = "container:Promise.xcodeproj">
</BuildableReference>
Expand All @@ -64,7 +66,7 @@
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "52F3C1BC1ECE503D0028CA53"
BuildableName = "Promise.framework"
BuildableName = "Promise Mac"
BlueprintName = "Promise Mac"
ReferencedContainer = "container:Promise.xcodeproj">
</BuildableReference>
Expand Down
2 changes: 1 addition & 1 deletion Promise/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleShortVersionString</key>
<string>1.0</string>
<string>2.0.0</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
Expand Down
17 changes: 17 additions & 0 deletions Promises.podspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Pod::Spec.new do |s|
s.name = "Promise"
s.version = "v2.0"
s.summary = "A Promise library for Swift"
s.description = "A Promise library for Swift, based partially on Javascript's A+ spec"
s.module_name = "Promise"
s.homepage = "https://github.com/khanlou/Promise"
s.license = 'MIT'
s.author = { "Soroush Khanlou" => "[email protected]" }
s.source = { :git => "https://github.com/khanlou/Promise.git", :tag => "#{spec.version}" }
s.social_media_url = 'https://twitter.com/khanlou'
s.source_files = 'Sources/*.swift'
s.cocoapods_version = '>= 1.0'
s.ios.deployment_target = '9.0'
s.osx.deployment_target = '10.11'
s.frameworks = 'Foundation'
end
35 changes: 35 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,41 @@ Promise<Void>(work: { fulfill, reject in
})
```

## Installation

### [CocoaPods](http://cocoapods.org/)

1. Add the following to your [Podfile](http://guides.cocoapods.org/using/the-podfile.html):

```rb
pod 'Promise'
```

2. Integrate your dependencies using frameworks: add `use_frameworks!` to your Podfile.
3. Run `pod install`.

### [Carthage](https://github.com/Carthage/Carthage)

1. Add the following to your [Cartfile](https://github.com/Carthage/Carthage/blob/master/Documentation/Artifacts.md#cartfile):

```
github "khanlou/Promise"
```

2. Run `carthage update` and follow the steps as described in Carthage's [README](https://github.com/Carthage/Carthage#adding-frameworks-to-an-application).

### [Swift Package Manager](https://swift.org/package-manager/)

The Swift Package Manager is a tool for automating the distribution of Swift code and is integrated into the `swift` compiler. It is in early development, but Promise does support its use on supported platforms.

Once you have your Swift package set up, adding AlamPromiseofire as a dependency is as easy as adding it to the `dependencies` value of your `Package.swift`.

```swift
dependencies: [
.Package(url: "https://github.com/khanlou/Promise.git", majorVersion: 2)
]
```

## Playing Around

To get started playing with this library, you can use the included `Promise.playground`. Simply open the `.xcodeproj`, build the scheme, and then open the playground (from within the project) and start playing.
Expand Down
File renamed without changes.
File renamed without changes.

0 comments on commit c56aa70

Please sign in to comment.