Skip to content

Commit

Permalink
Merge pull request #1 from ankurp/restructure-project
Browse files Browse the repository at this point in the history
Restructuing project
  • Loading branch information
ankurp committed Feb 14, 2016
2 parents 32f807e + 45619ea commit 625bbc9
Show file tree
Hide file tree
Showing 21 changed files with 199 additions and 90 deletions.
24 changes: 24 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Xcode
.DS_Store
build/
*.pbxuser
!default.pbxuser
*.mode1v3
!default.mode1v3
*.mode2v3
!default.mode2v3
*.perspectivev3
!default.perspectivev3
xcuserdata
*.xccheckout
*.xcuserstate
profile
*.moved-aside
DerivedData
.idea/
# Pods - for those of you who use CocoaPods
Pods
.build
Packages/
Carthage/
*.xcscmblueprint
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "Dollar"]
path = Dollar
url = https://github.com/ankurp/Dollar.git
6 changes: 0 additions & 6 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,3 @@ osx_image: xcode7

script:
- xctool -scheme Cent -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 6' ONLY_ACTIVE_ARCH=NO clean build test

before_install:
- brew update
- brew uninstall xctool && brew install --HEAD xctool
- brew install carthage
- carthage bootstrap --verbose
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Contributing

1. Please fork this project
2. Implement new methods or changes in the `Dollar.swift` file in `Dollar` folder or changes in the appropriate extension file in `Cent` folder.
3. Write tests in `DollarTests.swift` or `CentTests.swift` file as needed.
2. Implement changes in the appropriate extension file in `Cent` folder.
3. Write tests in `CentTests.swift` file as needed.
4. Write appropriate comments in code and docs in the README.md
5. Submit a pull request.
1 change: 0 additions & 1 deletion Cartfile

This file was deleted.

8 changes: 4 additions & 4 deletions Cent.podspec
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
Pod::Spec.new do |s|
s.name = "Cent"
s.version = "4.1.0"
s.version = "5.0.0"
s.summary = "Extension for common object types for Swift Language"
s.homepage = "https://github.com/ankurp/Dollar.swift"
s.homepage = "https://github.com/ankurp/Cent"
s.license = { :type => "MIT", :file => "LICENSE" }
s.author = { "Ankur Patel" => "ankur.patel@ymail.com" }
s.source = { :git => "https://github.com/ankurp/Dollar.swift.git", :tag => "#{s.version}" }
s.source_files = "Cent/Cent/*.{h,swift}"
s.source = { :git => "https://github.com/ankurp/Cent.git", :tag => "#{s.version}" }
s.source_files = "Sources/*.{h,swift}"
s.requires_arc = true
s.ios.deployment_target = "8.0"
s.osx.deployment_target = "10.10"
Expand Down
163 changes: 105 additions & 58 deletions Cent.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Binary file not shown.
1 change: 1 addition & 0 deletions CentTests/CentTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
//

import XCTest
import Cent

class CentTests: XCTestCase {

Expand Down
1 change: 1 addition & 0 deletions Dollar
Submodule Dollar added at 7536b3
7 changes: 7 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import PackageDescription

let package = Package(
name: "Cent",
dependencies: [
.Package(url: "https://github.com/ankurp/Dollar", majorVersion: 5, minor: 0)
])
64 changes: 52 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,54 @@
Cent [![Build Status](https://travis-ci.org/ankurp/Cent.svg?branch=master)](https://travis-ci.org/ankurp/Cent) ![CocoaPods](https://img.shields.io/cocoapods/v/Cent.svg) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage)
===========
[![Gitter](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/ankurp/Dollar?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Cent is a library that extends certain Swift object types using the extension feature and gives its two cents to Swift language.

## Contents ##

- [Setup](#setup)
- [API Documentation](http://www.dollarswift.org)
- [Usage](#cent-usage)
- [Array](#array-extensions)
- [Date](#date-extensions)
- [Dictionary](#dictionary-extensions)
- [Int](#int-extensions)
- [String](#string-extensions)
- [Range](#range-extensions)
- [Contributing](#contributing)

# Setup #

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

Add `github "ankurp/Cent" ~> 5.0.0` to your `Cartfile` and run `carthage update`. If unfamiliar with Carthage then checkout their [Getting Started section](https://github.com/Carthage/Carthage#getting-started).

## Using [cocoapods](http://cocoapods.org/) version 0.36.x or greater

Add `pod 'Cent'` to your `Podfile` and run `pod install`. Add `use_frameworks!` to the end of the `Podfile`. Requires cocoapod version 0.36.x or greater.

## Using `git submodule`

1. If you are using git then add Cent as a submodule using `git submodule add https://github.com/ankurp/Cent.git`. If not using git download the project using `git clone https://github.com/ankurp/Cent.git` in your project folder.
2. Open the `Cent` folder. Drag Cent.xcodeproj, inside the Cent folder, into the file navigator of your Xcode project.
3. In Xcode, navigate to the target configuration window by clicking on the blue project icon, and selecting the application target under the "Targets" heading in the sidebar.
4. In the tab bar at the top of that window, open the "Build Phases" panel.
5. Expand the "Link Binary with Libraries" group, and add Cent.framework.
6. In your project file `import Cent` and you can call all of the helper functions.

## Support for Older Xcode and Swift

* For Xcode 6.3 (Swift 1.2) use version `3.0.3`
* For Xcode 6.1 and 6.2 (Swift 1.1) use version `2.2.0`

## Communication ##

- If you **need help**, use [gitter.im](https://gitter.im/ankurp/Dollar) or post a question on [Stack Overflow](http://stackoverflow.com/questions/tagged/dollar.swift) with tag `dollar.swift`.
- If you'd like to **ask a general question**, use [Stack Overflow](http://stackoverflow.com/questions/tagged/dollar.swift).
- If you **found a bug**, open an issue.
- If you **have a feature request**, open an issue.
- If you **want to contribute**, submit a pull request.

# Cent Usage #

## Array Extensions ##
Expand Down Expand Up @@ -718,15 +769,4 @@ For each index in the range invoke the callback
```

# Contributing #
If you are interested in contributing checkout [CONTRIBUTING.md](https://github.com/ankurp/Dollar.swift/blob/master/CONTRIBUTING.md)

# Roadmap #

* Add more extention functions to the Cent library
* Benchmark and improve performance if applicable

# Dollar or Cent #
If you are interested only in pure functional programming `import Dollar` otherwise `import Cent` which includes extensions for certain object type such as Array for now but more will be added.


[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/ankurp/dollar.swift/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
If you are interested in contributing checkout [CONTRIBUTING.md](https://github.com/ankurp/Cent/blob/master/CONTRIBUTING.md)
4 changes: 0 additions & 4 deletions Cent/Array.swift → Sources/Array.swift
Original file line number Diff line number Diff line change
Expand Up @@ -196,10 +196,6 @@ public extension Array {
func contains<T:Equatable>(value: T) -> Bool {
return $.contains(map { $0 as! T }, value: value)
}

}

extension Array {

/// Return the result of repeatedly calling `combine` with an accumulated value initialized
/// to `initial` on each element of `self`, in turn with a corresponding index.
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
3 changes: 0 additions & 3 deletions Cent/String.swift → Sources/String.swift
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,6 @@ public extension String {
public func strip() -> String {
return self.stringByTrimmingCharactersInSet(.whitespaceCharacterSet())
}
}

extension String {

/// Split string into array of 'words'
func words() -> [String] {
Expand Down

0 comments on commit 625bbc9

Please sign in to comment.