diff --git a/app/controllers/async_info_controller.rb b/app/controllers/async_info_controller.rb
index 8020c121c..e9c35b6ef 100644
--- a/app/controllers/async_info_controller.rb
+++ b/app/controllers/async_info_controller.rb
@@ -43,7 +43,7 @@ class AsyncInfoController < ApplicationController
id: @user.id,
name: @user.name,
username: @user.username,
- profile_image_90: ProfileImage.new(@user).get(90),
+ profile_image_90: ProfileImage.new(@user).get(width: 90),
followed_tag_names: @user.cached_followed_tag_names,
followed_tags: @user.cached_followed_tags.to_json(only: %i[id name bg_color_hex text_color_hex hotness_score], methods: [:points]),
followed_user_ids: @user.cached_following_users_ids,
diff --git a/app/controllers/comments_controller.rb b/app/controllers/comments_controller.rb
index 84a257916..3fca99186 100644
--- a/app/controllers/comments_controller.rb
+++ b/app/controllers/comments_controller.rb
@@ -91,7 +91,7 @@ class CommentsController < ApplicationController
id: current_user.id,
username: current_user.username,
name: current_user.name,
- profile_pic: ProfileImage.new(current_user).get(50),
+ profile_pic: ProfileImage.new(current_user).get(width: 50),
twitter_username: current_user.twitter_username,
github_username: current_user.github_username
}
diff --git a/app/controllers/live_articles_controller.rb b/app/controllers/live_articles_controller.rb
index 443c2c72b..322945e58 100644
--- a/app/controllers/live_articles_controller.rb
+++ b/app/controllers/live_articles_controller.rb
@@ -14,7 +14,7 @@ class LiveArticlesController < ApplicationController
tag_list: [],
user: {
name: @event.host_name,
- profile_pic: ProfileImage.new(@event).get(50)
+ profile_pic: ProfileImage.new(@event).get(width: 50)
}
}
elsif @article
@@ -26,7 +26,7 @@ class LiveArticlesController < ApplicationController
tag_list: @article.tag_list,
user: {
name: @article.user.name,
- profile_pic: ProfileImage.new(@article.user).get(50)
+ profile_pic: ProfileImage.new(@article.user).get(width: 50)
}
}
else
diff --git a/app/controllers/messages_controller.rb b/app/controllers/messages_controller.rb
index d127948fd..4273ddd47 100644
--- a/app/controllers/messages_controller.rb
+++ b/app/controllers/messages_controller.rb
@@ -88,7 +88,7 @@ class MessagesController < ApplicationController
chat_channel_adjusted_slug: new_message.chat_channel.adjusted_slug(current_user, "sender"),
channel_type: new_message.chat_channel.channel_type,
username: new_message.user.username,
- profile_image_url: ProfileImage.new(new_message.user).get(90),
+ profile_image_url: ProfileImage.new(new_message.user).get(width: 90),
message: new_message.message_html,
markdown: new_message.message_markdown,
edited_at: new_message.edited_at,
diff --git a/app/labor/profile_image.rb b/app/labor/profile_image.rb
index efcf65375..76c8f865d 100644
--- a/app/labor/profile_image.rb
+++ b/app/labor/profile_image.rb
@@ -8,7 +8,7 @@ class ProfileImage
@backup_link = "https://thepracticaldev.s3.amazonaws.com/i/99mvlsfu5tfj9m7ku25d.png"
end
- def get(width = 120)
+ def get(width: 120)
cl_image_path(get_link,
type: "fetch",
crop: "fill",
diff --git a/app/models/article.rb b/app/models/article.rb
index 686814014..924152403 100644
--- a/app/models/article.rb
+++ b/app/models/article.rb
@@ -150,7 +150,7 @@ class Article < ApplicationRecord
:body_text, :tag_keywords_for_search, :search_score, :readable_publish_date, :flare_tag
attribute :user do
{ username: user.username, name: user.name,
- profile_image_90: ProfileImage.new(user).get(90), pro: user.pro? }
+ profile_image_90: ProfileImage.new(user).get(width: 90), pro: user.pro? }
end
tags do
[tag_list,
@@ -180,13 +180,13 @@ class Article < ApplicationRecord
attribute :user do
{ username: user.username,
name: user.name,
- profile_image_90: ProfileImage.new(user).get(90) }
+ profile_image_90: ProfileImage.new(user).get(width: 90) }
end
attribute :organization do
if organization
{ slug: organization.slug,
name: organization.name,
- profile_image_90: ProfileImage.new(organization).get(90) }
+ profile_image_90: ProfileImage.new(organization).get(width: 90) }
end
end
tags do
diff --git a/app/models/chat_channel.rb b/app/models/chat_channel.rb
index 289cbbbcd..c233d3332 100644
--- a/app/models/chat_channel.rb
+++ b/app/models/chat_channel.rb
@@ -171,7 +171,7 @@ class ChatChannel < ApplicationRecord
def user_obj(membership)
{
- profile_image: ProfileImage.new(membership.user).get(90),
+ profile_image: ProfileImage.new(membership.user).get(width: 90),
darker_color: membership.user.decorate.darker_color,
name: membership.user.name,
last_opened_at: membership.last_opened_at,
diff --git a/app/models/chat_channel_membership.rb b/app/models/chat_channel_membership.rb
index 98464a7fe..d3f4df542 100644
--- a/app/models/chat_channel_membership.rb
+++ b/app/models/chat_channel_membership.rb
@@ -46,7 +46,7 @@ class ChatChannelMembership < ApplicationRecord
def channel_image
if chat_channel.channel_type == "direct"
- ProfileImage.new(other_user).get(90)
+ ProfileImage.new(other_user).get(width: 90)
else
ActionController::Base.helpers.asset_path("organization.svg")
end
diff --git a/app/models/classified_listing.rb b/app/models/classified_listing.rb
index 38fbcb746..5e1ededf4 100644
--- a/app/models/classified_listing.rb
+++ b/app/models/classified_listing.rb
@@ -42,7 +42,7 @@ class ClassifiedListing < ApplicationRecord
attribute :author do
{ username: author.username,
name: author.name,
- profile_image_90: ProfileImage.new(author).get(90) }
+ profile_image_90: ProfileImage.new(author).get(width: 90) }
end
tags do
[tag_list,
diff --git a/app/models/comment.rb b/app/models/comment.rb
index 98c77b594..b38ffb186 100644
--- a/app/models/comment.rb
+++ b/app/models/comment.rb
@@ -74,8 +74,8 @@ class Comment < ApplicationRecord
username: user.username,
name: user.name,
id: user.id,
- profile_pic: ProfileImage.new(user).get(90),
- profile_image_90: ProfileImage.new(user).get(90),
+ profile_pic: ProfileImage.new(user).get(width: 90),
+ profile_image_90: ProfileImage.new(user).get(width: 90),
github_username: user.github_username,
twitter_username: user.twitter_username
}
diff --git a/app/models/message.rb b/app/models/message.rb
index ec5586c62..43952400a 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -100,7 +100,7 @@ class Message < ApplicationRecord
target='_blank' data-content='sidecar-article'>
#{"
" if article.main_image.present?}
#{article.title}
-
#{article.cached_user.name}・#{article.readable_publish_date || 'Draft Post'}
+
#{article.cached_user.name}・#{article.readable_publish_date || 'Draft Post'}
".html_safe
elsif (tag = rich_link_tag(anchor))
html += "
-
+
#{user.name}
".html_safe
diff --git a/app/models/organization.rb b/app/models/organization.rb
index a54875c1b..ca2ef463c 100644
--- a/app/models/organization.rb
+++ b/app/models/organization.rb
@@ -89,7 +89,7 @@ class Organization < ApplicationRecord
end
def profile_image_90
- ProfileImage.new(self).get(90)
+ ProfileImage.new(self).get(width: 90)
end
def enough_credits?(num_credits_needed)
diff --git a/app/models/podcast.rb b/app/models/podcast.rb
index 65f45dd3e..3d52f9fa2 100644
--- a/app/models/podcast.rb
+++ b/app/models/podcast.rb
@@ -40,7 +40,7 @@ class Podcast < ApplicationRecord
end
def image_90
- ProfileImage.new(self).get(90)
+ ProfileImage.new(self).get(width: 90)
end
private
diff --git a/app/models/podcast_episode.rb b/app/models/podcast_episode.rb
index c9829b9d5..5f1a2910c 100644
--- a/app/models/podcast_episode.rb
+++ b/app/models/podcast_episode.rb
@@ -42,7 +42,7 @@ class PodcastEpisode < ApplicationRecord
attribute :user do
{ name: podcast.name,
username: user_username,
- profile_image_90: ProfileImage.new(user).get(90) }
+ profile_image_90: ProfileImage.new(user).get(width: 90) }
end
searchableAttributes ["unordered(title)",
"body_text",
diff --git a/app/models/user.rb b/app/models/user.rb
index 825bc115e..76dfb368c 100644
--- a/app/models/user.rb
+++ b/app/models/user.rb
@@ -445,7 +445,7 @@ class User < ApplicationRecord
end
def profile_image_90
- ProfileImage.new(self).get(90)
+ ProfileImage.new(self).get(width: 90)
end
def remove_from_algolia_index
diff --git a/app/serializers/webhook/user_serializer.rb b/app/serializers/webhook/user_serializer.rb
index 81268bc0c..c2359750c 100644
--- a/app/serializers/webhook/user_serializer.rb
+++ b/app/serializers/webhook/user_serializer.rb
@@ -5,10 +5,10 @@ module Webhook
attributes :name, :username, :twitter_username, :github_username
attribute :website_url, &:processed_website_url
attribute :profile_image do |user|
- ProfileImage.new(user).get(640)
+ ProfileImage.new(user).get(width: 640)
end
attribute :profile_image_90 do |user|
- ProfileImage.new(user).get(90)
+ ProfileImage.new(user).get(width: 90)
end
end
end
diff --git a/app/views/additional_content_boxes/_article_content_area.html.erb b/app/views/additional_content_boxes/_article_content_area.html.erb
index b6e428722..66640bcf8 100644
--- a/app/views/additional_content_boxes/_article_content_area.html.erb
+++ b/app/views/additional_content_boxes/_article_content_area.html.erb
@@ -3,7 +3,7 @@
-
+
<%= article.user.name %>
<%= render "shared/pro_checkmark" if article.user.pro? %>
diff --git a/app/views/additional_content_boxes/_article_followable_area.html.erb b/app/views/additional_content_boxes/_article_followable_area.html.erb
index b8aa20391..2b3ff0e97 100644
--- a/app/views/additional_content_boxes/_article_followable_area.html.erb
+++ b/app/views/additional_content_boxes/_article_followable_area.html.erb
@@ -20,7 +20,7 @@
class="<%= "partner-link" if classification == "boosted" %>"
data-details="<%= followable&.slug if classification == "boosted" %>__PROFILE">
.get(200) %>)
__PROFILE"
diff --git a/app/views/api/v0/articles/onboarding.json.jbuilder b/app/views/api/v0/articles/onboarding.json.jbuilder
index e0814a0c1..da4fd6129 100644
--- a/app/views/api/v0/articles/onboarding.json.jbuilder
+++ b/app/views/api/v0/articles/onboarding.json.jbuilder
@@ -9,6 +9,6 @@ json.array! @articles do |article|
json.user do
json.name article.user.name
- json.profile_image_url ProfileImage.new(article.user).get(90)
+ json.profile_image_url ProfileImage.new(article.user).get(width: 90)
end
end
diff --git a/app/views/api/v0/shared/_follows.json.jbuilder b/app/views/api/v0/shared/_follows.json.jbuilder
index 2ed41761d..5c7cec2f1 100644
--- a/app/views/api/v0/shared/_follows.json.jbuilder
+++ b/app/views/api/v0/shared/_follows.json.jbuilder
@@ -1,4 +1,4 @@
json.name user.name
json.path "/" + user.path.delete_prefix("/")
json.username user.try(:username) || user.name
-json.profile_image ProfileImage.new(user).get(60)
+json.profile_image ProfileImage.new(user).get(width: 60)
diff --git a/app/views/api/v0/shared/_organization.json.jbuilder b/app/views/api/v0/shared/_organization.json.jbuilder
index 44febb787..90fbc4cc8 100644
--- a/app/views/api/v0/shared/_organization.json.jbuilder
+++ b/app/views/api/v0/shared/_organization.json.jbuilder
@@ -4,6 +4,6 @@ json.organization do
json.name organization.name
json.username organization.username
json.slug organization.slug
- json.profile_image organization_profile_image.get(640)
- json.profile_image_90 organization_profile_image.get(90)
+ json.profile_image organization_profile_image.get(width: 640)
+ json.profile_image_90 organization_profile_image.get(width: 90)
end
diff --git a/app/views/api/v0/shared/_user.json.jbuilder b/app/views/api/v0/shared/_user.json.jbuilder
index 01493b390..0c435c100 100644
--- a/app/views/api/v0/shared/_user.json.jbuilder
+++ b/app/views/api/v0/shared/_user.json.jbuilder
@@ -6,6 +6,6 @@ json.user do
json.twitter_username user.twitter_username
json.github_username user.github_username
json.website_url user.processed_website_url
- json.profile_image user_profile_image.get(640)
- json.profile_image_90 user_profile_image.get(90)
+ json.profile_image user_profile_image.get(width: 640)
+ json.profile_image_90 user_profile_image.get(width: 90)
end
diff --git a/app/views/api/v0/users/index.json.jbuilder b/app/views/api/v0/users/index.json.jbuilder
index 00f629e79..00d0ecc06 100644
--- a/app/views/api/v0/users/index.json.jbuilder
+++ b/app/views/api/v0/users/index.json.jbuilder
@@ -3,6 +3,6 @@ json.array! @users.each do |user|
json.name user.name
json.username user.username
json.summary truncate(user.summary.presence || "Active DEV author", length: 100)
- json.profile_image_url ProfileImage.new(user).get(90)
+ json.profile_image_url ProfileImage.new(user).get(width: 90)
json.following false
end
diff --git a/app/views/api/v0/users/show.json.jbuilder b/app/views/api/v0/users/show.json.jbuilder
index 7dfe48eb1..6e25b11e1 100644
--- a/app/views/api/v0/users/show.json.jbuilder
+++ b/app/views/api/v0/users/show.json.jbuilder
@@ -8,4 +8,4 @@ json.github_username @user.github_username
json.website_url @user.website_url
json.location @user.location
json.joined_at @user.created_at.strftime("%b %e, %Y")
-json.profile_image ProfileImage.new(@user).get(320)
+json.profile_image ProfileImage.new(@user).get(width: 320)
diff --git a/app/views/articles/_about_author.html.erb b/app/views/articles/_about_author.html.erb
index dc4e0a53d..5211f4f78 100644
--- a/app/views/articles/_about_author.html.erb
+++ b/app/views/articles/_about_author.html.erb
@@ -1,7 +1,7 @@
<% end %>
diff --git a/app/views/articles/_sticky_nav.html.erb b/app/views/articles/_sticky_nav.html.erb
index 95c6d50ed..d5bdceb1d 100644
--- a/app/views/articles/_sticky_nav.html.erb
+++ b/app/views/articles/_sticky_nav.html.erb
@@ -36,7 +36,7 @@
-
.get(90) %>)
+
<% end %>
-
+
<%= article.title %>
<% article.decorate.cached_tag_list_array.each do |tag| %>
@@ -120,7 +120,7 @@
<% end %>
-
+
<%= article.title %>
<% article.decorate.cached_tag_list_array.each do |tag| %>
diff --git a/app/views/articles/index.html.erb b/app/views/articles/index.html.erb
index 7d272806f..ce16e1fa5 100644
--- a/app/views/articles/index.html.erb
+++ b/app/views/articles/index.html.erb
@@ -100,7 +100,7 @@
-
+
diff --git a/app/views/articles/show.html.erb b/app/views/articles/show.html.erb
index 74214a6d0..7002ad4c0 100644
--- a/app/views/articles/show.html.erb
+++ b/app/views/articles/show.html.erb
@@ -111,7 +111,7 @@
<% if @organization %>
-
.get(50) %>)
<%= @organization.name %>
+
.get(width: 50) %>)
<%= @organization.name %>
<% end %>
@@ -122,7 +122,7 @@
-
+
<%= @user.name %>
diff --git a/app/views/articles/tags/_sidebar.html.erb b/app/views/articles/tags/_sidebar.html.erb
index 11ca16709..ff617cf09 100644
--- a/app/views/articles/tags/_sidebar.html.erb
+++ b/app/views/articles/tags/_sidebar.html.erb
@@ -54,7 +54,7 @@
<% @moderators.each do |user| %>
<% end %>
diff --git a/app/views/chat_channels/show.json.jbuilder b/app/views/chat_channels/show.json.jbuilder
index 25a9543f2..0facda140 100644
--- a/app/views/chat_channels/show.json.jbuilder
+++ b/app/views/chat_channels/show.json.jbuilder
@@ -2,7 +2,7 @@ json.messages @chat_messages.reverse do |message|
json.id message.id
json.user_id message.user_id
json.username message.user.username
- json.profile_image_url ProfileImage.new(message.user).get(90)
+ json.profile_image_url ProfileImage.new(message.user).get(width: 90)
json.message message.message_html
json.markdown message.message_markdown
json.edited_at message.edited_at
diff --git a/app/views/comments/_comment_proper.html.erb b/app/views/comments/_comment_proper.html.erb
index a00635cdc..1b4a18bc6 100644
--- a/app/views/comments/_comment_proper.html.erb
+++ b/app/views/comments/_comment_proper.html.erb
@@ -33,7 +33,7 @@
-
+
<%= user.name %>
@<%= user.username %>
diff --git a/app/views/dashboards/following_organizations.html.erb b/app/views/dashboards/following_organizations.html.erb index 1d43b7992..eef9e0f6b 100644 --- a/app/views/dashboards/following_organizations.html.erb +++ b/app/views/dashboards/following_organizations.html.erb @@ -13,7 +13,7 @@-
+
<%= organization.name %>
@<%= organization.username %>
diff --git a/app/views/dashboards/following_users.html.erb b/app/views/dashboards/following_users.html.erb index 57065e6a2..607d5d9b4 100644 --- a/app/views/dashboards/following_users.html.erb +++ b/app/views/dashboards/following_users.html.erb @@ -14,7 +14,7 @@-
+
<%= user.name %>
@<%= user.username %>
diff --git a/app/views/internal/comments/index.html.erb b/app/views/internal/comments/index.html.erb index 4e08d7460..c36c73d11 100644 --- a/app/views/internal/comments/index.html.erb +++ b/app/views/internal/comments/index.html.erb @@ -19,7 +19,7 @@<% if comment.user %> -
<%= comment.user.username %>
+
<%= comment.user.username %>
<% end %>
<% if comment.user && comment.user.twitter_username.present? %>
diff --git a/app/views/moderations/index.html.erb b/app/views/moderations/index.html.erb
index 2c36b0793..5d3dc09df 100644
--- a/app/views/moderations/index.html.erb
+++ b/app/views/moderations/index.html.erb
@@ -64,7 +64,7 @@
<%= article.title %>
@@ -271,7 +271,7 @@ <% end %> <% @articles.each do |article| %> -<%= article.title %>
diff --git a/app/views/partnerships/_form.html.erb b/app/views/partnerships/_form.html.erb index bdfe522e9..127db67b4 100644 --- a/app/views/partnerships/_form.html.erb +++ b/app/views/partnerships/_form.html.erb @@ -15,7 +15,7 @@ <% if !org.enough_credits?(Sponsorship::CREDITS[level]) %>What next?
-
Purchase Credits for @<%= org.slug %>
+
Purchase Credits for @<%= org.slug %>
<% if org.credits.unspent.size > 0 %>
@<%= org.slug %>
+
@<%= org.slug %>
+<%= form_tag "/partnerships" do %> @@ -97,7 +97,7 @@ <% end %> <%# NOTE: this currently can't be reached %> <% elsif level == "media" %> -
@<%= org.slug %>
+<%= form_tag "/partnerships" do %> @@ -113,7 +113,7 @@ <% end %> <%# NOTE: this currently can't be reached %> <% elsif level == "devrel" %> -
@<%= org.slug %>
+<%= form_tag "/partnerships" do %> diff --git a/app/views/social_previews/article.html.erb b/app/views/social_previews/article.html.erb index d1f48ea06..fe7a536a5 100644 --- a/app/views/social_previews/article.html.erb +++ b/app/views/social_previews/article.html.erb @@ -127,7 +127,7 @@
<%= @article.title %>
<%= @comment.title %>
-
+
<%= truncate @user.name, length: 32 %>
-
" />
+
" />
diff --git a/app/views/users/_organizations_area.html.erb b/app/views/users/_organizations_area.html.erb
index 4db73a075..a9b575897 100755
--- a/app/views/users/_organizations_area.html.erb
+++ b/app/views/users/_organizations_area.html.erb
@@ -8,7 +8,7 @@
<% @user.organizations.each do |organization| %>
-
+
<% end %>
diff --git a/app/views/users/_profile.html.erb b/app/views/users/_profile.html.erb
index 81cb20d6c..ab64f4643 100644
--- a/app/views/users/_profile.html.erb
+++ b/app/views/users/_profile.html.erb
@@ -45,7 +45,7 @@
<% if @user.profile_image_url.present? %>
-
+
<%= f.file_field :profile_image %>
<% end %>
diff --git a/app/views/users/_profile_header.html.erb b/app/views/users/_profile_header.html.erb
index 3fc9ed9ec..3ec72d827 100644
--- a/app/views/users/_profile_header.html.erb
+++ b/app/views/users/_profile_header.html.erb
@@ -14,7 +14,7 @@
-
+
@<%= @user.username %> diff --git a/app/views/users/_liquid.html.erb b/app/views/users/_liquid.html.erb index 24e15e158..bb289005e 100644 --- a/app/views/users/_liquid.html.erb +++ b/app/views/users/_liquid.html.erb @@ -8,7 +8,7 @@
diff --git a/app/views/users/show.html.erb b/app/views/users/show.html.erb index 85ddd1e47..189c663cb 100644 --- a/app/views/users/show.html.erb +++ b/app/views/users/show.html.erb @@ -28,7 +28,7 @@
-
+
diff --git a/spec/liquid_tags/link_tag_spec.rb b/spec/liquid_tags/link_tag_spec.rb index 1fa4507e9..55f476d19 100644 --- a/spec/liquid_tags/link_tag_spec.rb +++ b/spec/liquid_tags/link_tag_spec.rb @@ -31,7 +31,7 @@ RSpec.describe LinkTag, type: :liquid_tag do
-
+
diff --git a/spec/requests/api/v0/chat_channels_spec.rb b/spec/requests/api/v0/chat_channels_spec.rb
index ca201e73a..02cc7f83b 100644
--- a/spec/requests/api/v0/chat_channels_spec.rb
+++ b/spec/requests/api/v0/chat_channels_spec.rb
@@ -64,7 +64,7 @@ RSpec.describe "Api::V0::ChatChannels", type: :request do
expected_last_opened_at = Time.zone.parse(response_channel_users[user.username]["last_opened_at"]).to_i
response_user = response_channel_users[user.username]
- expect(response_user["profile_image"]).to eq(ProfileImage.new(user).get(90))
+ expect(response_user["profile_image"]).to eq(ProfileImage.new(user).get(width: 90))
expect(response_user["darker_color"]).to eq(user.decorate.darker_color)
expect(response_user["name"]).to eq(user.name)
expect(expected_last_opened_at).to eq(membership.last_opened_at.to_i)
diff --git a/spec/requests/api/v0/followers_spec.rb b/spec/requests/api/v0/followers_spec.rb
index c46552586..acde6f629 100644
--- a/spec/requests/api/v0/followers_spec.rb
+++ b/spec/requests/api/v0/followers_spec.rb
@@ -36,7 +36,7 @@ RSpec.describe "Api::V0::FollowersController", type: :request do
expect(response_follower["name"]).to eq(follower.name)
expect(response_follower["path"]).to eq(follower.path)
expect(response_follower["username"]).to eq(follower.username)
- expect(response_follower["profile_image"]).to eq(ProfileImage.new(follower).get(60))
+ expect(response_follower["profile_image"]).to eq(ProfileImage.new(follower).get(width: 60))
end
end
end
@@ -73,7 +73,7 @@ RSpec.describe "Api::V0::FollowersController", type: :request do
expect(response_follower["name"]).to eq(follower.name)
expect(response_follower["path"]).to eq(follower.path)
expect(response_follower["username"]).to eq(follower.username)
- expect(response_follower["profile_image"]).to eq(ProfileImage.new(follower).get(60))
+ expect(response_follower["profile_image"]).to eq(ProfileImage.new(follower).get(width: 60))
end
end
end
diff --git a/spec/requests/api/v0/followings_spec.rb b/spec/requests/api/v0/followings_spec.rb
index 52f701eac..1f13e9165 100644
--- a/spec/requests/api/v0/followings_spec.rb
+++ b/spec/requests/api/v0/followings_spec.rb
@@ -35,7 +35,7 @@ RSpec.describe "Api::V0::FollowingsController", type: :request do
expect(response_following["name"]).to eq(followed.name)
expect(response_following["path"]).to eq(followed.path)
expect(response_following["username"]).to eq(followed.username)
- expect(response_following["profile_image"]).to eq(ProfileImage.new(followed).get(60))
+ expect(response_following["profile_image"]).to eq(ProfileImage.new(followed).get(width: 60))
end
end
end
@@ -111,7 +111,7 @@ RSpec.describe "Api::V0::FollowingsController", type: :request do
expect(response_following["name"]).to eq(followed.name)
expect(response_following["path"]).to eq(followed.path)
expect(response_following["username"]).to eq(followed.username)
- expect(response_following["profile_image"]).to eq(ProfileImage.new(followed).get(60))
+ expect(response_following["profile_image"]).to eq(ProfileImage.new(followed).get(width: 60))
end
end
end
@@ -148,7 +148,7 @@ RSpec.describe "Api::V0::FollowingsController", type: :request do
expect(response_following["name"]).to eq(followed.name)
expect(response_following["path"]).to eq("/#{followed.path}")
expect(response_following["username"]).to eq(followed.name)
- expect(response_following["profile_image"]).to eq(ProfileImage.new(followed).get(60))
+ expect(response_following["profile_image"]).to eq(ProfileImage.new(followed).get(width: 60))
end
end
end
diff --git a/spec/requests/api/v0/users_spec.rb b/spec/requests/api/v0/users_spec.rb
index 3ef4dd7e2..0612add33 100644
--- a/spec/requests/api/v0/users_spec.rb
+++ b/spec/requests/api/v0/users_spec.rb
@@ -22,7 +22,7 @@ RSpec.describe "Api::V0::Users", type: :request do
expect(response_user["name"]).to eq(user.name)
expect(response_user["username"]).to eq(user.username)
expect(response_user["summary"]).to eq(user.summary)
- expect(response_user["profile_image_url"]).to eq(ProfileImage.new(user).get(90))
+ expect(response_user["profile_image_url"]).to eq(ProfileImage.new(user).get(width: 90))
expect(response_user["following"]).to be(false)
end
@@ -84,7 +84,7 @@ RSpec.describe "Api::V0::Users", type: :request do
end
expect(response_user["joined_at"]).to eq(user.created_at.strftime("%b %e, %Y"))
- expect(response_user["profile_image"]).to eq(ProfileImage.new(user).get(320))
+ expect(response_user["profile_image"]).to eq(ProfileImage.new(user).get(width: 320))
end
end
@@ -112,7 +112,7 @@ RSpec.describe "Api::V0::Users", type: :request do
end
expect(response_user["joined_at"]).to eq(user.created_at.strftime("%b %e, %Y"))
- expect(response_user["profile_image"]).to eq(ProfileImage.new(user).get(320))
+ expect(response_user["profile_image"]).to eq(ProfileImage.new(user).get(width: 320))
end
end
end
diff --git a/spec/requests/api/v0/webhooks_spec.rb b/spec/requests/api/v0/webhooks_spec.rb
index fcb4b22fd..40c039a72 100644
--- a/spec/requests/api/v0/webhooks_spec.rb
+++ b/spec/requests/api/v0/webhooks_spec.rb
@@ -94,8 +94,8 @@ RSpec.describe "Api::V0::Webhooks", type: :request do
expect(response_webhook_user["twitter_username"]).to eq(webhook.user.twitter_username)
expect(response_webhook_user["github_username"]).to eq(webhook.user.github_username)
expect(response_webhook_user["website_url"]).to eq(webhook.user.processed_website_url)
- expect(response_webhook_user["profile_image"]).to eq(user_profile_image.get(640))
- expect(response_webhook_user["profile_image_90"]).to eq(user_profile_image.get(90))
+ expect(response_webhook_user["profile_image"]).to eq(user_profile_image.get(width: 640))
+ expect(response_webhook_user["profile_image_90"]).to eq(user_profile_image.get(width: 90))
end
end