This repository has been archived by the owner on Sep 20, 2023. It is now read-only.
API Keys read from environment variables #1075
Merged
Merged
Changes from 2 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
be08b8f
Update client keys to use environment vars
Sherlouk 3725f5c
Extra logging to assist with debugging
Sherlouk 3c983b5
Add other files to test target (temporary solution)
Sherlouk 185be04
Update Project Target References
Sherlouk 1433542
Add arguments and share scheme
Sherlouk 09d6ade
Disable failing FBSnapshot tests
Sherlouk 788da38
If at first you fail, wait 20 minutes for a build and then try again
Sherlouk af8292f
Update test to also ensure it's not using the template keys
Sherlouk 724b69f
Update gitignore
Sherlouk 59e5422
Remove intentional failing test
Sherlouk 84cd410
revert pod changes
76eb4e2
revert podfile
File filter
Filter by extension
Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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
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 was deleted.
Oops, something went wrong.
This file was deleted.
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,35 @@ | ||
// | ||
// Secrets.swift | ||
// Freetime | ||
// | ||
// Created by Sherlock, James on 23/11/2017. | ||
// Copyright © 2017 Ryan Nystrom. All rights reserved. | ||
// | ||
|
||
import Foundation | ||
|
||
enum Secrets { | ||
|
||
enum GitHub { | ||
static let clientId = Secrets.environmentVariable(named: "GITHUB_CLIENT_ID") | ||
static let clientSecret = Secrets.environmentVariable(named: "GITHUB_CLIENT_SECRET") | ||
} | ||
|
||
enum Imgur { | ||
static let clientId = Secrets.environmentVariable(named: "IMGUR_CLIENT_ID") | ||
} | ||
|
||
fileprivate static func environmentVariable(named: String) -> String { | ||
|
||
let processInfo = ProcessInfo.processInfo | ||
|
||
guard let value = processInfo.environment[named] else { | ||
print("‼️ Missing Environment Variable: '\(named)'") | ||
return "" | ||
} | ||
|
||
return value | ||
|
||
} | ||
|
||
} |
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 |
---|---|---|
|
@@ -110,4 +110,4 @@ SPEC CHECKSUMS: | |
|
||
PODFILE CHECKSUM: 42663ce5abae69b05b234e40c92d7f02b29efe06 | ||
|
||
COCOAPODS: 1.3.1 | ||
COCOAPODS: 1.2.1 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
127 changes: 57 additions & 70 deletions
127
Pods/Target Support Files/Pods-Freetime/Pods-Freetime-frameworks.sh
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could do
#if DEBUG then fatalError()
if we wanted to be super obvious when doing things locally?