DSteve595 / Put.io

Put.io for Android!
MIT License
141 stars 30 forks source link

Removed private API key and client ID out of source control #36

Closed jonalmeida closed 8 years ago

jonalmeida commented 8 years ago

After committing this change, please revoke your old API key that you've committed into this public github repository and generate a new one that you can put into ApiKey.java (after renaming from ApiKey.java.in).

DSteve595 commented 8 years ago

This definitely seems like a good idea. Thanks for the solution!

jonalmeida commented 8 years ago

Great!

DSteve595 commented 8 years ago

Why .java.in instead of just .java?

jonalmeida commented 8 years ago

.java.in is the template file. I've add the .java file to the .gitignore so it won't be committed by someone by mistake. The template file forces a new person to see and edit the file first.

DSteve595 commented 8 years ago

That would make the build fail after checkout, right?

jonalmeida commented 8 years ago

Intentionally, yes. I see your point though..

I force commited the ApiKey.java file as the template but that will now fail with the NullPointerException and throw the appropriate error.

DSteve595 commented 8 years ago

I think I'd rather have it just be ApiKey.java, so it builds correctly, and I'll just keep my local copy private (and gitignored) with the new key. (I'll make the changes.) Thanks for the contribution!

jonalmeida commented 8 years ago

I've updated the PR change to make change it into ApiKey.java. It'll "sort of" fail the first time only if you try to build right after cloning the repo.

A one-time (intentional) build failure is a lot safer against newbie mistakes :)

DSteve595 commented 8 years ago

Looks good.