Skip to content

Commit

Permalink
Merge pull request adobe#28 from PravinPK/finalwords
Browse files Browse the repository at this point in the history
Update Assurance Version to 3.x + Code of Conduct  doc
  • Loading branch information
sbenedicadb authored Jun 24, 2021
2 parents 38e4dbf + e0957ff commit 6230ebb
Show file tree
Hide file tree
Showing 8 changed files with 182 additions and 14 deletions.
16 changes: 10 additions & 6 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,9 @@ playground.xcworkspace
# Swift Package Manager
#
# Add this line if you want to avoid checking in source code from Swift Package Manager dependencies.
# Packages/
# Package.pins
# Package.resolved
Packages/
Package.pins
Package.resolved
# *.xcodeproj
#
# Xcode automatically generates this directory with a .xcworkspacedata file and xcuserdata
Expand All @@ -63,7 +63,7 @@ playground.xcworkspace
# you should judge for yourself, the pros and cons are mentioned at:
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
#
# Pods/
Pods/
#
# Add this line if you want to avoid checking in source code from the Xcode workspace
# *.xcworkspace
Expand Down Expand Up @@ -91,5 +91,9 @@ fastlane/Preview.html
fastlane/screenshots/**/*.png
fastlane/test_output

## Cocoapods
Pods/
# Code Injection
#
# After new code Injection tools there's a generated folder /iOSInjectionProject
# https://github.com/johnno1962/injectionforxcode

iOSInjectionProject/
3 changes: 2 additions & 1 deletion AEPAssurance.podspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Pod::Spec.new do |s|
s.name = "AEPAssurance"
s.version = "2.0.0-Alpha"
s.version = "3.0.0"
s.summary = "AEPAssurance SDK for Adobe Experience Platform Mobile SDK. Written and maintained by Adobe."

s.description = <<-DESC
Expand All @@ -16,6 +16,7 @@ Pod::Spec.new do |s|

s.pod_target_xcconfig = { 'BUILD_LIBRARY_FOR_DISTRIBUTION' => 'YES' }
s.dependency 'AEPCore', '>= 3.1.0'
s.dependency 'AEPServices', '>= 3.1.0'

s.source_files = 'AEPAssurance/Source/**/*.swift'
end
57 changes: 57 additions & 0 deletions AEPAssurance.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,20 @@
objectVersion = 51;
objects = {

/* Begin PBXAggregateTarget section */
B64212AC2683DB48007343B6 /* AEPAssuranceXCF */ = {
isa = PBXAggregateTarget;
buildConfigurationList = B64212AD2683DB48007343B6 /* Build configuration list for PBXAggregateTarget "AEPAssuranceXCF" */;
buildPhases = (
);
dependencies = (
B64212B12683DB4F007343B6 /* PBXTargetDependency */,
);
name = AEPAssuranceXCF;
productName = AEPAssuranceXCF;
};
/* End PBXAggregateTarget section */

/* Begin PBXBuildFile section */
07BEA3EDD4D94F0947A81DBF /* Pods_AEPAssurance.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = FA7C4770EBD136D41B82A7A1 /* Pods_AEPAssurance.framework */; };
337C8C135446B45550172205 /* Pods_TestAppObjC.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0FEAA724C29B9FAC154C0556 /* Pods_TestAppObjC.framework */; };
Expand Down Expand Up @@ -110,6 +124,13 @@
remoteGlobalIDString = B6407198262C313E00C43183;
remoteInfo = AEPAssurance;
};
B64212B02683DB4F007343B6 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B6407190262C313E00C43183 /* Project object */;
proxyType = 1;
remoteGlobalIDString = B6407198262C313E00C43183;
remoteInfo = AEPAssurance;
};
B670E73D26395E00000FCB96 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = B6407190262C313E00C43183 /* Project object */;
Expand Down Expand Up @@ -780,6 +801,9 @@
B64071E3262C8F8A00C43183 = {
CreatedOnToolsVersion = 12.4;
};
B64212AC2683DB48007343B6 = {
CreatedOnToolsVersion = 12.5.1;
};
B6DDFAA5268139B7002D2757 = {
CreatedOnToolsVersion = 12.5;
};
Expand All @@ -802,6 +826,7 @@
B64071A1262C313E00C43183 /* UnitTests */,
B64071E3262C8F8A00C43183 /* TestApp */,
B6DDFAA5268139B7002D2757 /* TestAppObjC */,
B64212AC2683DB48007343B6 /* AEPAssuranceXCF */,
);
};
/* End PBXProject section */
Expand Down Expand Up @@ -1163,6 +1188,11 @@
target = B6407198262C313E00C43183 /* AEPAssurance */;
targetProxy = B64071A4262C313E00C43183 /* PBXContainerItemProxy */;
};
B64212B12683DB4F007343B6 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B6407198262C313E00C43183 /* AEPAssurance */;
targetProxy = B64212B02683DB4F007343B6 /* PBXContainerItemProxy */;
};
B670E73E26395E00000FCB96 /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
target = B6407198262C313E00C43183 /* AEPAssurance */;
Expand Down Expand Up @@ -1475,6 +1505,24 @@
};
name = Release;
};
B64212AE2683DB48007343B6 /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Debug;
};
B64212AF2683DB48007343B6 /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CODE_SIGN_STYLE = Automatic;
IPHONEOS_DEPLOYMENT_TARGET = 10.0;
PRODUCT_NAME = "$(TARGET_NAME)";
};
name = Release;
};
B6DDFABD268139BA002D2757 /* Debug */ = {
isa = XCBuildConfiguration;
baseConfigurationReference = 5ABE4461A8032C0B29C8BCF6 /* Pods-TestAppObjC.debug.xcconfig */;
Expand Down Expand Up @@ -1554,6 +1602,15 @@
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B64212AD2683DB48007343B6 /* Build configuration list for PBXAggregateTarget "AEPAssuranceXCF" */ = {
isa = XCConfigurationList;
buildConfigurations = (
B64212AE2683DB48007343B6 /* Debug */,
B64212AF2683DB48007343B6 /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
B6DDFABC268139BA002D2757 /* Build configuration list for PBXNativeTarget "TestAppObjC" */ = {
isa = XCConfigurationList;
buildConfigurations = (
Expand Down
2 changes: 1 addition & 1 deletion AEPAssurance/Source/AssuranceConstants.swift
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import Foundation
enum AssuranceConstants {
static let EXTENSION_NAME = "com.adobe.assurance"
static let FRIENDLY_NAME = "Assurance"
static let EXTENSION_VERSION = "2.0.0"
static let EXTENSION_VERSION = "3.0.0"
static let LOG_TAG = FRIENDLY_NAME
static let DEFAULT_ENVIRONMENT = AssuranceEnvironment.prod

Expand Down
2 changes: 1 addition & 1 deletion AEPAssurance/UnitTests/AssuranceBlobTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ class AssuranceBlobTests: XCTestCase {
XCTAssertTrue(mockNetworkService.connectAsyncCalled)
XCTAssertEqual("https://blob-dev.griffon.adobe.com/api/FileUpload?validationSessionId=mocksessionId", mockNetworkService.networkRequest?.url.absoluteString)
XCTAssertEqual(sampleData, mockNetworkService.networkRequest?.connectPayload)
XCTAssertEqual(HttpMethod.get, mockNetworkService.networkRequest?.httpMethod)
XCTAssertEqual(HttpMethod.post, mockNetworkService.networkRequest?.httpMethod)
XCTAssertEqual("application/octet-stream", mockNetworkService.networkRequest?.httpHeaders["Content-Type"])
XCTAssertEqual("png", mockNetworkService.networkRequest?.httpHeaders["File-Content-Type"])
XCTAssertEqual(30, mockNetworkService.networkRequest?.connectTimeout)
Expand Down
10 changes: 5 additions & 5 deletions AEPAssurance/UnitTests/AssuranceShutDownTimerTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,13 @@ class AssuranceShutDownTimerTests: XCTestCase {
assurance.onRegistered()

// verify assurance listens to event before shut down
XCTAssertTrue(assurance.readyForEvent(testEvent))
XCTAssertTrue(assurance.shouldProcessEvents)

// wait for assurance to shut down
sleep(2)

// verify assurance is shutdown after timer
XCTAssertFalse(assurance.readyForEvent(testEvent))
XCTAssertFalse(assurance.shouldProcessEvents)
}

func test_shutDownTimer_invalidated_whenSessionStarted() {
Expand All @@ -65,14 +65,14 @@ class AssuranceShutDownTimerTests: XCTestCase {
assurance.onRegistered()

// verify assurance listens to event before shut down
XCTAssertTrue(assurance.readyForEvent(testEvent))
XCTAssertTrue(assurance.shouldProcessEvents)
runtime.simulateComingEvent(event: assuranceStartEvent)

// wait for assurance shutdown timer to run out
sleep(2)

// verify shutdown timer is invalidated and assurance keeps running
XCTAssertTrue(assurance.readyForEvent(testEvent))
XCTAssertTrue(assurance.shouldProcessEvents)
}

func test_shutDownTimer_invalidedIfAssuranceReconnecting() {
Expand All @@ -84,7 +84,7 @@ class AssuranceShutDownTimerTests: XCTestCase {
sleep(2)

// verify
XCTAssertTrue(assurance.readyForEvent(testEvent))
XCTAssertTrue(assurance.shouldProcessEvents)
}

var assuranceStartEvent: Event {
Expand Down
74 changes: 74 additions & 0 deletions CODE_OF_CONDUCT.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
# Adobe Code of Conduct

## Our Pledge

In the interest of fostering an open and welcoming environment, we as
contributors and maintainers pledge to making participation in our project and
our community a harassment-free experience for everyone, regardless of age, body
size, disability, ethnicity, gender identity and expression, level of experience,
nationality, personal appearance, race, religion, or sexual identity and
orientation.

## Our Standards

Examples of behavior that contributes to creating a positive environment
include:

* Using welcoming and inclusive language
* Being respectful of differing viewpoints and experiences
* Gracefully accepting constructive criticism
* Focusing on what is best for the community
* Showing empathy towards other community members

Examples of unacceptable behavior by participants include:

* The use of sexualized language or imagery and unwelcome sexual attention or
advances
* Trolling, insulting/derogatory comments, and personal or political attacks
* Public or private harassment
* Publishing others' private information, such as a physical or electronic
address, without explicit permission
* Other conduct which could reasonably be considered inappropriate in a
professional setting

## Our Responsibilities

Project maintainers are responsible for clarifying the standards of acceptable
behavior and are expected to take appropriate and fair corrective action in
response to any instances of unacceptable behavior.

Project maintainers have the right and responsibility to remove, edit, or
reject comments, commits, code, wiki edits, issues, and other contributions
that are not aligned to this Code of Conduct, or to ban temporarily or
permanently any contributor for other behaviors that they deem inappropriate,
threatening, offensive, or harmful.

## Scope

This Code of Conduct applies both within project spaces and in public spaces
when an individual is representing the project or its community. Examples of
representing a project or community include using an official project e-mail
address, posting via an official social media account, or acting as an appointed
representative at an online or offline event. Representation of a project may be
further defined and clarified by project maintainers.

## Enforcement

Instances of abusive, harassing, or otherwise unacceptable behavior may be
reported by contacting the project team at [email protected]. All
complaints will be reviewed and investigated and will result in a response that
is deemed necessary and appropriate to the circumstances. The project team is
obligated to maintain confidentiality with regard to the reporter of an incident.
Further details of specific enforcement policies may be posted separately.

Project maintainers who do not follow or enforce the Code of Conduct in good
faith may face temporary or permanent repercussions as determined by other
members of the project's leadership.

## Attribution

This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
available at [https://contributor-covenant.org/version/1/4][version]

[homepage]: https://contributor-covenant.org
[version]: https://contributor-covenant.org/version/1/4/
32 changes: 32 additions & 0 deletions Package.swift
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

/*
Copyright 2021 Adobe. All rights reserved.
This file is licensed to you under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License. You may obtain a copy
of the License at http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under
the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS
OF ANY KIND, either express or implied. See the License for the specific language
governing permissions and limitations under the License.
*/

import PackageDescription

let package = Package(
name: "AEPAssurance",
platforms: [.iOS(.v10)],
products: [
.library(name: "AEPAssurance", targets: ["AEPAssurance"])
],
dependencies: [
.package(name: "AEPCore", url: "https://github.com/adobe/aepsdk-core-ios.git", .upToNextMajor(from: "3.1.0"))
],
targets: [
.target(name: "AEPAssurance",
dependencies: ["AEPCore"],
path: "AEPAssurance/Sources")
]
)

0 comments on commit 6230ebb

Please sign in to comment.