Skip to content

Commit

Permalink
Merge pull request #143 from terales/142-deprecate-google-api
Browse files Browse the repository at this point in the history
Deprecate Google API, closes #142
  • Loading branch information
terales committed Apr 14, 2019
2 parents ed22910 + dad7be4 commit b6a640f
Show file tree
Hide file tree
Showing 13 changed files with 12 additions and 51 deletions.
3 changes: 0 additions & 3 deletions .env-template
Expand Up @@ -22,6 +22,3 @@ AVATAR_HEIGHT=100

# Get GitHub token with user.read scope. See more: https://help.github.com/articles/creating-a-personal-access-token-for-the-command-line/
GITHUB_TOKEN=

# Create project, enable Google+ API and get an API key. See more: https://developers.google.com/+/web/api/rest/oauth#apikey
GOOGLE_KEY=
5 changes: 4 additions & 1 deletion README.md
Expand Up @@ -38,10 +38,13 @@ Uptime: [![Uptime](http://www.sixnines.io/b/28f4)](http://www.sixnines.io/h/28f4

* Facebook with id, like `100001584476227` OR profile slug, like `yegor256`
* GitHub with login, like `terales`
* Google with Google+ id, like `+SriramSaroop` OR gmail address
* Gravatar with email
* Twitter with username, like `robwormald`

#### Deprecated

* Google with Google+ id, like `+SriramSaroop` OR gmail address

### Resize images with Cloudinary

Thanks to the Cloudinary generous limits we are able to resize images from any source.
Expand Down
12 changes: 7 additions & 5 deletions src/public/index.html
Expand Up @@ -51,11 +51,6 @@ <h3 style="margin-bottom: 0.6em;">Currently supported sources</h3>
<i class="example" style="background-image: url('/github/yegor256/30-30');"></i>
<strong>GitHub</strong> with login, like <code>yegor256</code>: <a href="/github/yegor256" target="_blank">/github/yegor256</a>
</li>
<li>
<i class="example" style="background-image: url('/google/+SriramSaroop/30-30');"></i>
<strong>Google</strong> with Google+ id, like <code>+SriramSaroop</code>: <a href="/google/+SriramSaroop" target="_blank">/google/+SriramSaroop</a>
<br>with GMail address, like <code>email@gmail.com</code>: <a href="/google/terehov.alexander.serg@gmail.com" target="_blank">/google/email@gmail.com</a>
</li>
<li>
<i class="example" style="background-image: url('/gravatar/terehov.alexander.serg@gmail.com/30-30');"></i>
<strong>Gravatar</strong> with email: <a href="/gravatar/terehov.alexander.serg@gmail.com" target="_blank">/gravatar/email@example.com</a>
Expand All @@ -68,6 +63,13 @@ <h3 style="margin-bottom: 0.6em;">Currently supported sources</h3>
<i class="example" style="background-image: url('/fallback/image/30-30');"></i>
Automatically fallback to good enough placeholder image
</li>
<li>
deprecated
<s>
<strong>Google</strong> with Google+ id, like <code>+SriramSaroop</code>: <a href="/google/+SriramSaroop" target="_blank">/google/+SriramSaroop</a>
<br>with GMail address, like <code>email@gmail.com</code>: <a href="/google/email@gmail.com" target="_blank">/google/email@gmail.com</a>
</s>
</li>
</ul>

<h3>Get images with size you need thanks to Cloudinary integration</h3>
Expand Down
23 changes: 0 additions & 23 deletions src/sources/google.js

This file was deleted.

2 changes: 0 additions & 2 deletions tests/helpers/runForPullRequestFromFork.js
@@ -1,7 +1,5 @@

module.exports = function runForPullRequestFromFork (source) {
if (source === 'google' && !process.env.GOOGLE_KEY) { return false }

if (source === 'github' && !process.env.GITHUB_TOKEN) { return false }

return true
Expand Down
16 changes: 0 additions & 16 deletions tests/respectEtagHeader.test.js

This file was deleted.

Binary file removed tests/sources/google/samples/+RaviChahar27.jpeg
Binary file not shown.
Binary file removed tests/sources/google/samples/+SriramSaroop.jpeg
Binary file not shown.
Binary file removed tests/sources/google/samples/+krunalsisodiya.jpeg
Binary file not shown.
Binary file removed tests/sources/google/samples/socatar.com@gmail.com.png
Binary file not shown.
Binary file not shown.
Binary file not shown.
2 changes: 1 addition & 1 deletion tests/testNativeResize/supportNativeResize.test.js
Expand Up @@ -9,7 +9,7 @@ const rimraf = require('rimraf')
const app = require('./../../src/app')()

// Test helpers
const testRunner = require('./../helpers/runForPullRequestFromFork')('google') ? test : test.skip
const testRunner = require('./../helpers/runForPullRequestFromFork')('github') ? test : test.skip
const getImagesFromFolder = require('./../helpers/getImagesFromFolder')
const imageMagicCompare = require('./../helpers/imageMagicCompare')
const saveReceivedImage = require('./../helpers/saveReceivedImage')
Expand Down

0 comments on commit b6a640f

Please sign in to comment.