Skip to content

Commit

Permalink
bring back the fake api for the tests and make a note of it
Browse files Browse the repository at this point in the history
  • Loading branch information
cpg committed Jul 8, 2017
1 parent 2558bfa commit cf81d2f
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
9 changes: 8 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,14 @@ android {
def apiFile = file("api.properties")
def apiProperties = new Properties()

apiProperties.load(apiFile.newInputStream())
// NOTE-cpg: this fake api is here for the tests to pass
def fakeApiFile = file("fakeApi.properties")

if (apiFile.exists()) {
apiProperties.load(apiFile.newInputStream())
} else {
apiProperties.load(fakeApiFile.newInputStream())
}

buildConfigField "String", "API_URL_AMAHI", formatStringField(apiProperties["url.amahi"])
buildConfigField "String", "API_URL_PROXY", formatStringField(apiProperties["url.proxy"])
Expand Down
8 changes: 8 additions & 0 deletions fakeApi.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Set API information in api.properties.
# This is something to keep private and you obtain it by asking in the Amahi IRC channel or
# send a message to support at Amahi dot org

url.amahi=https://amahi.org
url.proxy=https://amahi.org
client.id=1234567890
client.secret=abcdefghijklmnopqrstuvwxyz

0 comments on commit cf81d2f

Please sign in to comment.