forked from SwifterSwift/SwifterSwift
-
Notifications
You must be signed in to change notification settings - Fork 0
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 #1 from SwifterSwift/master
Update from main repo
- Loading branch information
Showing
204 changed files
with
15,716 additions
and
11,315 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
root = true | ||
|
||
[*] | ||
end_of_line = lf | ||
insert_final_newline = true | ||
|
||
# Set default charset | ||
[*.{js,py,swift,m,json}] | ||
charset = utf-8 | ||
|
||
# 4 space indentation | ||
[*.swift] | ||
indent_style = space | ||
indent_size = 4 |
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 |
---|---|---|
@@ -1 +1 @@ | ||
3.0 | ||
4.1 |
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,3 @@ | ||
disabled_rules: | ||
- line_length | ||
- file_length |
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 |
---|---|---|
@@ -1,9 +1,33 @@ | ||
osx_image: xcode8.3 | ||
language: objective-c | ||
osx_image: xcode9.4 | ||
|
||
env: | ||
global: | ||
- PROJECT='SwifterSwift.xcodeproj' | ||
- IOS_SCHEME='SwifterSwift-iOS' | ||
- TVOS_SCHEME='SwifterSwift-tvOS' | ||
- WATCHOS_SCHEME='SwifterSwift-watchOS' | ||
- MACOS_SCHEME='SwifterSwift-macOS' | ||
- IOS_DESTINATION='platform=iOS Simulator,name=iPhone X' | ||
- TVOS_DESTINATION='platform=tvOS Simulator,name=Apple TV 4K (at 1080p)' | ||
- WATCHOS_DESTINATION='name=Apple Watch - 42mm' | ||
- MACOS_DESTINATION='platform=OS X' | ||
|
||
|
||
before_install: | ||
- brew update | ||
- brew outdated xctool || brew upgrade xctool | ||
- gem install xcpretty | ||
script: sh Tests/build.sh /tmp/SwifterSwift | ||
after_success: | ||
- bash <(curl -s https://codecov.io/bash) -D /tmp/SwifterSwift | ||
- bundle install | ||
- brew update | ||
- brew outdated xctool || brew upgrade xctool | ||
script: | ||
- set -o pipefail | ||
- swift --version | ||
- xcodebuild clean build test -project "$PROJECT" -scheme "$IOS_SCHEME" -destination "$IOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-ios.json" xcpretty -f `xcpretty-json-formatter` | ||
- bash <(curl -s https://codecov.io/bash) -cF ios -J 'SwifterSwift' | ||
- xcodebuild clean build test -project "$PROJECT" -scheme "$TVOS_SCHEME" -destination "$TVOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-tvos.json" xcpretty -f `xcpretty-json-formatter` | ||
- bash <(curl -s https://codecov.io/bash) -cF tvos -J 'SwifterSwift' | ||
- xcodebuild clean build test -project "$PROJECT" -scheme "$MACOS_SCHEME" -destination "$MACOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-macos.json" xcpretty -f `xcpretty-json-formatter` | ||
- bash <(curl -s https://codecov.io/bash) -cF osx -J 'SwifterSwift' | ||
- xcodebuild clean build -project "$PROJECT" -scheme "$WATCHOS_SCHEME" -destination "$WATCHOS_DESTINATION" | XCPRETTY_JSON_FILE_OUTPUT="xcodebuild-watchos.json" xcpretty -f `xcpretty-json-formatter` | ||
- swiftlint lint | ||
- bundle exec danger --verbose | ||
- pod lib lint |
Large diffs are not rendered by default.
Oops, something went wrong.
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,71 @@ | ||
# Changelog Guidelines | ||
|
||
Here you can find the general guidelines for maintaining the Changelog (or adding new entries). We follow the guidelines from [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) with few additions. | ||
|
||
## Guiding Principles | ||
- Changelogs are for humans, not machines. | ||
- There should be an entry for every single version. | ||
- The same types of changes should be grouped. | ||
- Versions and sections should be linkable. | ||
- The latest version comes first. | ||
- The release date of each versions is displayed. | ||
- Mention whether you follow Semantic Versioning. | ||
|
||
... with the following **SwifterSwift** specific additions: | ||
- Keep an unreleased section at the top. | ||
- Each release title should link to release's page. | ||
- Add PR number and a GitHub tag at the end of each entry. | ||
- Each breaking change entry should have **Breaking Change** label at the beginning of this entry. | ||
- **Breaking Change** entries should be placed at the top of the section it's in. | ||
- Entries under each category should be grouped by the type they extend. | ||
|
||
## Types of changes | ||
- **Added** for new features. | ||
- **Changed** for changes in existing functionality. | ||
- **Deprecated** for soon-to-be removed features. | ||
- **Removed** for now removed features. | ||
- **Fixed** for any bug fixes. | ||
- **Security** in case of vulnerabilities. | ||
|
||
--- | ||
|
||
## Example: | ||
|
||
|
||
# [v4.1.0](https://github.com/SwifterSwift/SwifterSwift/releases/tag/4.1.0) | ||
|
||
### Added | ||
|
||
- **UIDatePicker** | ||
- Added `textColor` property to set and get text color of UIDatePicker. [#335](https://github.com/SwifterSwift/SwifterSwift/pull/335) by [@omaralbeik](https://github.com/omaralbeik). | ||
- **Continuous Integration** | ||
- Added **Danger** to continuous integration. [#252](https://github.com/SwifterSwift/SwifterSwift/pull/252) by [SD10](https://github.com/SD10). | ||
|
||
|
||
### Changed | ||
|
||
- **Date** | ||
- **Breaking Change** The property `weekday` is now a get-only property. [#313](https://github.com/SwifterSwift/SwifterSwift/pull/313) by [kaphacius](https://github.com/kaphacius). | ||
|
||
- **Array** | ||
- `shuffle` and `shuffled` are no more constrained to Equatable. [#327](https://github.com/SwifterSwift/SwifterSwift/pull/327) by [LucianoPAlmeida](https://github.com/LucianoPAlmeida). | ||
|
||
|
||
### Deprecated | ||
|
||
- **String** | ||
- `reversed() -> String` is deprecated in favor of Swift 4 new `reversed() -> ReversedCollection<String>`. [#305](https://github.com/SwifterSwift/SwifterSwift/pull/305) by [LucianoPAlmeida](https://github.com/LucianoPAlmeida). | ||
- **Date** | ||
- `isInThisWeek` has been renamed to `isInCurrentWeek`. | ||
|
||
|
||
### Removed | ||
|
||
- **UIViewController** | ||
- **Breaking Change** Removed `navigationBar` that was causing iOS apps to crash, thanks to drewpitchford for reporting in [#243](https://github.com/SwifterSwift/SwifterSwift/issues/243). by [drewpitchford](https://github.com/drewpitchford) | ||
|
||
|
||
### Fixed | ||
|
||
- **Tests** | ||
- Fixed a bug where `XCTAssertNotNil` could not handle optionals. [#188](https://github.com/SwifterSwift/SwifterSwift/pull/188). by [omaralbeik](https://github.com/omaralbeik) |
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,51 @@ | ||
message('Thank you for submitting a pull request to SwifterSwift. The team will review your submission as soon as possible.') | ||
|
||
# Checks for modified source files | ||
source_changes_exist = !git.modified_files.grep(/Sources/).empty? | ||
|
||
# Checks for changelog entry | ||
no_changelog_entry = !git.modified_files.include?("CHANGELOG.md") | ||
|
||
# Checks for tests | ||
no_test_changes = git.modified_files.grep(/Tests/).empty? | ||
|
||
if source_changes_exist && no_test_changes | ||
warn('Consider adding tests for new extensions or updating existing tests for a modified SwifterSwift extension') | ||
end | ||
|
||
if source_changes_exist && no_changelog_entry | ||
warn('The source files have been modified. Please consider adding a CHANGELOG entry if necessary.') | ||
end | ||
|
||
swiftlint.lint_files | ||
|
||
# Checks if pull request is labeled as [WIP] | ||
warn('This pull request is marked as Work in Progress. DO NOT MERGE!') if github.pr_title.include? "[WIP]" | ||
|
||
# Xcode summary | ||
def summary(platform:) | ||
xcode_summary.report "xcodebuild-#{platform}.json" | ||
end | ||
|
||
def label_tests_summary(label:, platform:) | ||
file_name = "xcodebuild-#{platform}.json" | ||
json = File.read(file_name) | ||
data = JSON.parse(json) | ||
data["tests_summary_messages"].each { |message| | ||
if !message.empty? | ||
message.insert(1, " " + label + ":") | ||
end | ||
} | ||
File.open(file_name,"w") do |f| | ||
f.puts JSON.pretty_generate(data) | ||
end | ||
end | ||
|
||
label_tests_summary(label: "iOS", platform: "ios") | ||
label_tests_summary(label: "tvOS", platform: "tvos") | ||
label_tests_summary(label: "macOS", platform: "macos") | ||
|
||
summary(platform: "ios") | ||
summary(platform: "tvos") | ||
summary(platform: "macos") | ||
summary(platform: "watchos") |
Oops, something went wrong.