Skip to content

Commit

Permalink
Merge pull request #1456 from Nexmo/fix_team_page
Browse files Browse the repository at this point in the history
Removed GRAVATAR gem and added Author image_url in /TEAM
  • Loading branch information
marcoranieri authored Jun 15, 2022
2 parents 1e57814 + 6f80bc6 commit 0604a50
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 20 deletions.
3 changes: 0 additions & 3 deletions lib/nexmo_developer/Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -86,9 +86,6 @@ gem 'woothee'
# The simplest way to group temporal data
gem 'groupdate', '5.2.2'

# A configurable and documented Rails view helper for adding gravatars into your Rails application.
gem 'gravatar_image_tag', github: 'Envek/gravatar_image_tag', branch: 'fix/deprecation-warnings'

# Boot large ruby/rails apps faster
gem 'bootsnap', require: false

Expand Down
8 changes: 0 additions & 8 deletions lib/nexmo_developer/Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
GIT
remote: https://github.com/Envek/gravatar_image_tag.git
revision: 5af4d8e302587aa9ac2fe4105c92e428a11d8ec7
branch: fix/deprecation-warnings
specs:
gravatar_image_tag (1.2.0)

GIT
remote: https://github.com/oscardelben/rawler.git
revision: f2909b135fce7d35167f98026ac481926c94423e
Expand Down Expand Up @@ -646,7 +639,6 @@ DEPENDENCIES
ffi (>= 1.9.24)
geocoder
gmaps4rails (= 2.1.2)
gravatar_image_tag!
greenhouse_io
groupdate (= 5.2.2)
guard-livereload (~> 2.5)
Expand Down
6 changes: 6 additions & 0 deletions lib/nexmo_developer/app/controllers/static_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ def default_landing

if request.path.delete('/') == 'team'
@team ||= LoadConfig.load_file('config/team.yml')

@team['current'].each do |member|
author = Blog::Author.new(AuthorParser.fetch_author(member['short-name']))
member['image_url'] = author.build_avatar_url
end

@careers = Greenhouse.devrel_careers
end

Expand Down
2 changes: 1 addition & 1 deletion lib/nexmo_developer/app/views/static/_profile.html.erb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div class="Nxd-profile Vlt-col Vlt-col--M-1of3">
<%= gravatar_image_tag email, gravatar: { size: 140, secure: true }, class: 'Nxd-profile__avatar avatar' %>
<%= image_tag(image_url, size: 140, class: 'Nxd-profile__avatar avatar') %>
<h3><%= name %></h3>
<p class="Vlt-grey-darker p-large"><%= local_assigns[:role] ? role : 'Developer Advocate' %>
<% if local_assigns[:twitter] %>
Expand Down
5 changes: 0 additions & 5 deletions lib/nexmo_developer/config/initializers/gravatar_image_tag.rb

This file was deleted.

1 change: 0 additions & 1 deletion lib/nexmo_developer/nexmo_developer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
require 'bugsnag'
require 'devise'
require 'geocoder'
require 'gravatar_image_tag'
require 'greenhouse_io'
require 'recaptcha'
require 'split/dashboard'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

RSpec.describe 'static/profile.html.erb' do
it 'renders the profile' do
render partial: 'static/profile.html.erb', locals: { twitter: 'vonagedevs', name: 'John Doe', email: 'john.doe@vonage.com' }
render partial: 'static/profile.html.erb', locals: { twitter: 'vonagedevs', name: 'John Doe', email: 'john.doe@vonage.com', image_url: '' }

view = Capybara::Node::Simple.new(rendered)

Expand Down
2 changes: 1 addition & 1 deletion lib/nexmo_developer/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module NexmoDeveloper
VERSION = '0.3.1'.freeze
VERSION = '0.3.2'.freeze
end

0 comments on commit 0604a50

Please sign in to comment.