Skip to content

Commit

Permalink
Merge branch 'release/1.5.0' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackjacx committed Aug 7, 2020
2 parents 714b172 + 41ab19f commit 8fb0b2c
Show file tree
Hide file tree
Showing 27 changed files with 1,183 additions and 427 deletions.
3 changes: 0 additions & 3 deletions .codecov.yml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: CI
on: [push, pull_request]
env:
FRAMEWORK: "SHDateFormatter"
XCOV_SCHEME: "SHDateFormatter-iOS"
FRAMEWORK_WORKSPACE: "SHDateFormatter.xcworkspace"
FASTLANE_XCODE_LIST_TIMEOUT: 999
FASTLANE_WORK_DIR: .
MINT_PATH: ${{ github.workspace }}/mint

jobs:
bootstrap-and-test:
name: Test
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Download Configuration Files
run: bash <(curl -s https://raw.githubusercontent.com/Blackjacx/Scripts/master/frameworks/bootstrap.sh) -d
- name: Cache RubyGems
uses: actions/cache@v2
with:
path: vendor/bundle
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
restore-keys: ${{ runner.os }}-gem-
- name: Cache Mint packages
uses: actions/cache@v2
with:
path: ${{ env.MINT_PATH }}
key: ${{ runner.os }}-mint-${{ hashFiles('**/Mintfile') }}
restore-keys: ${{ runner.os }}-mint-
- name: Install dependencies
run: bash <(curl -s https://raw.githubusercontent.com/Blackjacx/Scripts/master/frameworks/bootstrap.sh)
- name: Run tests
run: bundle exec fastlane test framework:${{ env.FRAMEWORK }} run_danger:${{ github.event_name }}
env:
DANGER_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
76 changes: 60 additions & 16 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,38 @@
# OS X
.DS_Store

# Xcode
#
# gitignore contributors: remember to update Global/Xcode.gitignore, Objective-C.gitignore & Swift.gitignore

# macos
**/.DS_Store
**/.env

## CI
codesigndoc_exports

# Carthage framework bundle - created during release process
*.framework.zip
# Fastlane config script is downloaded
fastlane/Fastfile
# Fastlane plugin config is downloaded
fastlane/Pluginfile
# Mint dependencies file which is downloaded
Mintfile
# Swiftlint config file which is downloaded
.swiftlint.yml
# Danger config file which is downloaded
Dangerfile
# Ruby gems config file which is downloaded
Gemfile
# Bundler configuration which is bootstrapped
.bundle
# Bundler vendor information which is bootstrapped
vendor

## Build generated
build/
DerivedData/

## Various settings
*.pbxuser
!default.pbxuser
*.mode1v3
Expand All @@ -12,29 +42,43 @@ build/
*.perspectivev3
!default.perspectivev3
xcuserdata/
*.xccheckout
profile

## Other
*.moved-aside
DerivedData
*.xccheckout
*.xcscmblueprint

## Obj-C/Swift specific
*.hmap
*.ipa
*.dSYM.zip
*.dSYM

# Auto generated
docs/
## Playgrounds
timeline.xctimeline
playground.xcworkspace

# Bundler
.bundle
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
.build/

Carthage
# CocoaPods
#
# We recommend against adding the Pods directory to your .gitignore. However
# you should judge for yourself, the pros and cons are mentioned at:
# http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control
#
# Note: if you ignore the Pods directory, make sure to uncomment
# `pod install` in .travis.yml
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
Pods/

# Carthage
#
# Add this line if you want to avoid checking in source code from Carthage dependencies.
# Carthage/Checkouts
Carthage/Build

# SPM
.swiftpm

Expand All @@ -43,7 +87,7 @@ Pods/
# It is recommended to not store the screenshots in the git repo. Instead, use fastlane to re-generate the
# screenshots whenever they are needed.
# For more information about the recommended setup visit:
# https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Gitignore.md
# https://docs.fastlane.tools/best-practices/source-control/#source-control

fastlane/report.xml
fastlane/Preview.html
Expand Down
12 changes: 6 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@

## [Unreleased]

## [1.5.0] - 2020-08-07
* [#21](https://github.com/Blackjacx/SHDateFormatter/pull/21): Add month formatting - [@blackjacx](https://github.com/blackjacx).

## [1.4.3] - 2019-12-03
* [#19](https://github.com/Blackjacx/SHDateFormatter/pull/19): Add new accessibility date format & Fix Vulnerabilities & 12/24h check - [@blackjacx](https://github.com/blackjacx).

Expand All @@ -24,14 +27,11 @@
* [#5](https://github.com/Blackjacx/SHDateFormatter/pull/5): Improve Robustness By Using Apple's Default Formatting Styles - [@blackjacx](https://github.com/blackjacx).

## [1.0.2] - 2017-10-10
### Changed
* Refactor project structure
* Refactor project structure - [@blackjacx](https://github.com/blackjacx).

## [1.0.1] - 2017-10-10
### Fixed
* Fix source-file reference in podspec
* Fix source-file reference in podspec - [@blackjacx](https://github.com/blackjacx).

## [1.0.0] - 2017-09-28
### Changed
* [#4](https://github.com/Blackjacx/SHDateFormatter/pull/4): Conversion to Swift 4 - [@blackjacx](https://github.com/blackjacx).
* opts in for new build system - [@blackjacx](https://github.com/blackjacx).
* Opts in for new build system - [@blackjacx](https://github.com/blackjacx).
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,6 @@
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
shouldUseLaunchSchemeArgsEnv = "YES">
<Testables>
</Testables>
<MacroExpansion>
<BuildableReference
BuildableIdentifier = "primary"
Expand All @@ -38,8 +36,8 @@
ReferencedContainer = "container:SHDateFormatterExample.xcodeproj">
</BuildableReference>
</MacroExpansion>
<AdditionalOptions>
</AdditionalOptions>
<Testables>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand All @@ -61,8 +59,6 @@
ReferencedContainer = "container:SHDateFormatterExample.xcodeproj">
</BuildableReference>
</BuildableProductRunnable>
<AdditionalOptions>
</AdditionalOptions>
</LaunchAction>
<ProfileAction
buildConfiguration = "Release"
Expand Down
39 changes: 9 additions & 30 deletions Example/source/AppDelegate.swift
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@

//
// AppDelegate.swift
// SHDateFormatter
//
// Created by Stefan Herold on 10/07/2016.
// Copyright (c) 2016 Stefan Herold. All rights reserved.
// Copyright © 2020 Stefan Herold. All rights reserved.
//

import UIKit
Expand All @@ -14,34 +13,14 @@ class AppDelegate: UIResponder, UIApplicationDelegate {

var window: UIWindow?


private func application(application: UIApplication, didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
// Override point for customization after application launch.
return true
}

func applicationWillResignActive(_ application: UIApplication) {
// Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state.
// Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game.
}

func applicationDidEnterBackground(_ application: UIApplication) {
// Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
// If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits.
}

func applicationWillEnterForeground(_ application: UIApplication) {
// Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background.
}

func applicationDidBecomeActive(_ application: UIApplication) {
// Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface.
private func application(application: UIApplication,
didFinishLaunchingWithOptions launchOptions: [NSObject: AnyObject]?) -> Bool {
true
}

func applicationWillTerminate(_ application: UIApplication) {
// Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:.
}


func applicationWillResignActive(_ application: UIApplication) {}
func applicationDidEnterBackground(_ application: UIApplication) {}
func applicationWillEnterForeground(_ application: UIApplication) {}
func applicationDidBecomeActive(_ application: UIApplication) {}
func applicationWillTerminate(_ application: UIApplication) {}
}

12 changes: 6 additions & 6 deletions Example/source/ViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@ class ViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()

let deDE_Locale = Locale(identifier: "de_DE")
let enUS_Locale = Locale(identifier: "en_US")
let frFR_Locale = Locale(identifier: "fr_FR")
let deDELocale = Locale(identifier: "de_DE")
let enUSLocale = Locale(identifier: "en_US")
let frFRLocale = Locale(identifier: "fr_FR")

print(SHDateFormatter.is12hFormat(deDE_Locale))
print(SHDateFormatter.is12hFormat(enUS_Locale))
print(SHDateFormatter.is12hFormat(frFR_Locale))
print(SHDateFormatter.is12hFormat(deDELocale))
print(SHDateFormatter.is12hFormat(enUSLocale))
print(SHDateFormatter.is12hFormat(frFRLocale))
}
}
16 changes: 0 additions & 16 deletions Gemfile

This file was deleted.

Loading

0 comments on commit 8fb0b2c

Please sign in to comment.