Skip to content

Commit c1dcd19

Browse files
Preparation for open source repo
OKTA-404190 <<<Jenkins Check-In of Tested SHA: 5c10baa for eng_productivity_ci_bot_okta@okta.com>>> Artifact: okta-ios-logger Files changed count: 39 PR Link: "#39"
1 parent 803c948 commit c1dcd19

39 files changed

+490
-153
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.6.0
1+
2.7.2

.travis.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
language: swift
2+
os: osx
3+
osx_image: xcode12.2
4+
5+
before_install:
6+
- gem install xcpretty
7+
- gem install cocoapods
8+
jobs:
9+
include:
10+
- stage: Linting
11+
name: SwiftLint
12+
addons:
13+
homebrew:
14+
packages:
15+
- swiftlint
16+
update: true
17+
script:
18+
- swiftlint
19+
- stage: Unit Tests
20+
name: iOS
21+
script:
22+
- xcodebuild -workspace "OktaLogger.xcworkspace" -scheme "OktaLogger" -destination "platform=iOS Simulator,OS=latest,name=iPhone 11" clean test | xcpretty
23+
- stage: Dependency Manager Validation
24+
name: CocoaPods
25+
script:
26+
- pod lib lint --allow-warnings

CONTRIBUTING.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
Contributing to Okta Open Source Repos
2+
======================================
3+
4+
Sign the CLA
5+
------------
6+
7+
If you haven't already, [sign the CLA](https://developer.okta.com/cla/). Common questions/answers are also listed on the CLA page.
8+
9+
Summary
10+
-------
11+
This document covers how to contribute to an Okta Open Source project. These instructions assume you have a GitHub.com account, so if you don't have one you will have to create one. Your proposed code changes will be published to your own fork of the Okta Logger SDK project and you will submit a Pull Request for your changes to be added.
12+
13+
_Lets get started!!!_
14+
15+
16+
Fork the code
17+
-------------
18+
19+
In your browser, navigate to: [https://github.com/okta/okta-logger-swift](https://github.com/okta/okta-os)
20+
21+
Fork the repository by clicking on the 'Fork' button on the top right hand side. The fork will happen and you will be taken to your own fork of the repository. Copy the Git repository URL by clicking on the clipboard next to the URL on the right hand side of the page under '**HTTPS** clone URL'. You will paste this URL when doing the following `git clone` command.
22+
23+
On your computer, follow these steps to setup a local repository for working on the Okta Logger SDK:
24+
25+
``` bash
26+
$ git clone https://github.com/YOUR_ACCOUNT/okta-logger-swift.git
27+
$ cd okta-logger-swift
28+
$ git remote add upstream https://github.com/okta/okta-logger-swift.git
29+
$ git checkout master
30+
$ git fetch upstream
31+
$ git rebase upstream/master
32+
```
33+
34+
35+
Making changes
36+
--------------
37+
38+
It is important that you create a new branch to make changes on and that you do not change the `master` branch (other than to rebase in changes from `upstream/master`). In this example I will assume you will be making your changes to a branch called `feature_x`. This `feature_x` branch will be created on your local repository and will be pushed to your forked repository on GitHub. Once this branch is on your fork you will create a Pull Request for the changes to be added to the Okta Logger SDK project.
39+
40+
It is best practice to create a new branch each time you want to contribute to the project and only track the changes for that pull request in this branch.
41+
42+
``` bash
43+
$ git checkout -b feature_x
44+
(make your changes)
45+
$ git status
46+
$ git add .
47+
$ git commit -a -m "descriptive commit message for your changes"
48+
```
49+
50+
> The `-b` specifies that you want to create a new branch called `feature_x`. You only specify `-b` the first time you checkout because you are creating a new branch. Once the `feature_x` branch exists, you can later switch to it with only `git checkout feature_x`.
51+
52+
53+
Rebase `feature_x` to include updates from `upstream/master`
54+
------------------------------------------------------------
55+
56+
It is important that you maintain an up-to-date `master` branch in your local repository. This is done by rebasing in the code changes from `upstream/master` (the official Okta Logger SDK project repository) into your local repository. You will want to do this before you start working on a feature as well as right before you submit your changes as a pull request. I recommend you do this process periodically while you work to make sure you are working off the most recent project code.
57+
58+
This process will do the following:
59+
60+
1. Checkout your local `master` branch
61+
2. Synchronize your local `master` branch with the `upstream/master` so you have all the latest changes from the project
62+
3. Rebase the latest project code into your `feature_x` branch so it is up-to-date with the upstream code
63+
64+
``` bash
65+
$ git checkout master
66+
$ git fetch upstream
67+
$ git rebase upstream/master
68+
$ git checkout feature_x
69+
$ git rebase master
70+
```
71+
72+
> Now your `feature_x` branch is up-to-date with all the code in `upstream/master`.
73+
74+
75+
Make a GitHub Pull Request to contribute your changes
76+
-----------------------------------------------------
77+
78+
When you are happy with your changes and you are ready to contribute them, you will create a Pull Request on GitHub to do so. This is done by pushing your local changes to your forked repository (default remote name is `origin`) and then initiating a pull request on GitHub.
79+
80+
> **IMPORTANT:** Make sure you have rebased your `feature_x` branch to include the latest code from `upstream/master` _before_ you do this.
81+
82+
``` bash
83+
$ git push origin master
84+
$ git push origin feature_x
85+
```
86+
87+
Now that the `feature_x` branch has been pushed to your GitHub repository, you can initiate the pull request.
88+
89+
To initiate the pull request, do the following:
90+
91+
1. In your browser, navigate to your forked repository: [https://github.com/YOUR_ACCOUNT/okta-logger-swift](https://github.com/YOUR_ACCOUNT/okta-logger-swift)
92+
2. Click the new button called '**Compare & pull request**' that showed up just above the main area in your forked repository
93+
3. Validate the pull request will be into the upstream `master` and will be from your `feature_x` branch
94+
4. Enter a detailed description of the work you have done and then click '**Send pull request**'
95+
96+
If you are requested to make modifications to your proposed changes, make the changes locally on your `feature_x` branch, re-push the `feature_x` branch to your fork. The existing pull request should automatically pick up the change and update accordingly.
97+
98+
99+
Cleaning up after a successful pull request
100+
-------------------------------------------
101+
102+
Once the `feature_x` branch has been committed into the `upstream/master` branch, your local `feature_x` branch and the `origin/feature_x` branch are no longer needed. If you want to make additional changes, restart the process with a new branch.
103+
104+
> **IMPORTANT:** Make sure that your changes are in `upstream/master` before you delete your `feature_x` and `origin/feature_x` branches!
105+
106+
You can delete these deprecated branches with the following:
107+
108+
``` bash
109+
$ git checkout master
110+
$ git branch -D feature_x
111+
$ git push origin :feature_x
112+
```

Config.xcconfig

Lines changed: 0 additions & 10 deletions
This file was deleted.

Example/Example-iOS/AppDelegate.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// AppDelegate.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Lihao Li on 6/5/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013
import OktaLogger
1114
import Firebase

Example/Example-iOS/DemoTableViewCell.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// DemoTableViewCell.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Kaushik Krishnakumar on 7/14/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013

1114
class DemoTableViewCell: UITableViewCell {

Example/Example-iOS/LoggerDemoViewController.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// LoggerDemoViewController.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Lihao Li on 6/5/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013
import OktaLogger
1114

Example/Example-iOS/LoggerDemoViewModel.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// LoggerDemoViewModel.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Borys Kasianenko on 3/3/21.
6-
// Copyright © 2021 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import Foundation
1013
import OktaLogger
1114
import FirebaseCrashlytics

Example/Example-iOS/LogsBrowseViewController.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// LogsBrowseViewController.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Borys Kasianenko on 3/4/21.
6-
// Copyright © 2021 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013

1114
class LogsBrowseViewController: UIViewController {

Example/Example-iOS/SceneDelegate.swift

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,14 @@
1-
//
2-
// SceneDelegate.swift
3-
// OktaLoggerDemoApp
4-
//
5-
// Created by Lihao Li on 6/5/20.
6-
// Copyright © 2020 Okta, Inc. All rights reserved.
7-
//
8-
1+
/*
2+
* Copyright (c) 2020-Present, Okta, Inc. and/or its affiliates. All rights reserved.
3+
* The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the "License.")
4+
*
5+
* You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.
6+
* Unless required by applicable law or agreed to in writing, software
7+
* distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
8+
* WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9+
*
10+
* See the License for the specific language governing permissions and limitations under the License.
11+
*/
912
import UIKit
1013

1114
class SceneDelegate: UIResponder, UIWindowSceneDelegate {

0 commit comments

Comments
 (0)