Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes to ensure answers shared to twitter post more reliably #227

Merged
merged 8 commits into from
Dec 25, 2021

Conversation

raccube
Copy link
Contributor

@raccube raccube commented Dec 25, 2021

Closes #99

@codecov
Copy link

codecov bot commented Dec 25, 2021

Codecov Report

Merging #227 (5704258) into master (fcd7217) will increase coverage by 1.18%.
The diff coverage is 70.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #227      +/-   ##
==========================================
+ Coverage   59.91%   61.10%   +1.18%     
==========================================
  Files          88       88              
  Lines        2068     2072       +4     
==========================================
+ Hits         1239     1266      +27     
+ Misses        829      806      -23     
Impacted Files Coverage Δ
app/workers/share_worker.rb 40.00% <25.00%> (-10.00%) ⬇️
app/controllers/ajax/answer_controller.rb 94.23% <100.00%> (+0.11%) ⬆️
app/models/services/twitter.rb 96.42% <100.00%> (+49.06%) ⬆️
app/helpers/markdown_helper.rb 48.00% <0.00%> (+8.00%) ⬆️
app/services/twittered_markdown.rb 46.15% <0.00%> (+46.15%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fcd7217...5704258. Read the comment docs.

it "posts a shortened tweet" do
service.post(answer)

expect(twitter_client).to have_received(:update!).with("#{'q' * 123}… — #{'a' * 124}… https://example.com/#{user.screen_name}/a/#{answer.id}")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please also add another one for testing unshortened texts

@nilsding
Copy link
Member

libidn-devel is installed on the hosts, so bundling should work.

@raccube raccube merged commit c773d43 into master Dec 25, 2021
@raccube raccube deleted the fix/tweet-length branch December 25, 2021 21:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Write proper text shortening utilities
3 participants