Skip to content

Commit

Permalink
change ogpr gem to own fork in order to fix an issue with chinese cha…
Browse files Browse the repository at this point in the history
…racters showing up
  • Loading branch information
pessi-v committed Jul 4, 2024
1 parent 02ac7f7 commit 8fa792a
Show file tree
Hide file tree
Showing 6 changed files with 25 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ gem 'faraday_middleware'
gem 'feedjira'

# a ruby library to fetch and parse meta tags which represent OpenGraph Protocol and TwitterCard.
gem 'ogpr'
gem 'ogpr', git: 'https://github.com/pessi-v/ogpr', branch: 'master'

# Addressable is an alternative implementation to the URI implementation that is part of Ruby's standard library.
# It is flexible, offers heuristic parsing, and additionally provides extensive support for IRIs and URI templates.
Expand Down
18 changes: 12 additions & 6 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
GIT
remote: https://github.com/pessi-v/ogpr
revision: 0cf586b4eee4d655be40f196eae3c82c78aa301b
branch: master
specs:
ogpr (1.1.0)
nokogiri (~> 1.8)
rest-client (~> 2.1.0)

GEM
remote: https://rubygems.org/
specs:
Expand Down Expand Up @@ -155,7 +164,7 @@ GEM
rake (>= 13)
guess_html_encoding (0.0.11)
http-accept (1.7.0)
http-cookie (1.0.5)
http-cookie (1.0.6)
domain_name (~> 0.5)
httpclient (2.8.3)
i18n (1.14.5)
Expand Down Expand Up @@ -184,7 +193,7 @@ GEM
matrix (0.4.2)
mime-types (3.5.2)
mime-types-data (~> 3.2015)
mime-types-data (3.2024.0507)
mime-types-data (3.2024.0702)
mini_mime (1.1.5)
minitest (5.23.1)
msgpack (1.7.2)
Expand Down Expand Up @@ -214,9 +223,6 @@ GEM
racc (~> 1.4)
nokogiri (1.16.5-x86_64-linux)
racc (~> 1.4)
ogpr (1.1.0)
nokogiri (~> 1.8)
rest-client (~> 2.1.0)
pg (1.5.6)
pg_search (2.3.6)
activerecord (>= 5.2)
Expand Down Expand Up @@ -395,7 +401,7 @@ DEPENDENCIES
importmap-rails
jbuilder
node-runner (~> 1.2)
ogpr
ogpr!
pg (~> 1.1)
pg_search
puma (>= 5.0)
Expand Down
5 changes: 5 additions & 0 deletions app/assets/stylesheets/config/_reset.scss
Original file line number Diff line number Diff line change
Expand Up @@ -106,4 +106,9 @@ sup {

hr {
border: var(--border);
}

.line {
height: 1px;
border-top: var(--border);
}
4 changes: 0 additions & 4 deletions app/models/source.rb
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,3 @@ def update_articles_source_name
articles.update_all(source_name: name)
end
end

Source.find_each do |source|
Source.reset_counters(source.id, :articles)
end
4 changes: 2 additions & 2 deletions app/views/articles/list.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
.list_view_desktop
- @articles.each do |article|
= render 'article_small_image_headline_summary_preview', article: article
hr
.line

.list_view_mobile
- @articles.each do |article|
= render 'article_image_headline_summary', article: article
hr
.line
9 changes: 5 additions & 4 deletions app/views/sources/_source.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,11 @@ css:
p
= source.url

p
strong
'Articles:
= source.articles_count
= link_to(articles_by_source_path(source.name), data: {turbo: false})
p
strong
'Articles:
= source.articles_count

p
strong
Expand Down

0 comments on commit 8fa792a

Please sign in to comment.