Michał Krzysztof Feiler
8dc4c952d7
[deploy] Add "functional.cafe" to Mastodon list ( #5737 )
2020-01-27 11:56:01 -05:00
Ændrew Rininsland
5bd51f9cf5
Adds 4estate.media to Mastodon instance whitelist ( #5625 )
2020-01-21 08:59:52 -05:00
Mike Coutermarsh
9f983e271c
Increase cache TTL for social preview images ( #5471 ) [deploy]
...
* Increase cache TTL for social preview images
These are expensive to generate + don't change often. We can have a long cache.
Ideally, they would never expire, and get auto evicted by redis when space fills up. But I don't think a `nil` ttl is possible when a default
is set in the Rails config (see production.rb).
So I set it to a real long value. + test to guard against it accidently being changed.
* Try a cache expiration of 6.weeks as suggested by @mstruve in PR
2020-01-17 17:06:06 -05:00
Aaron Moat
ba230ecab6
Allow language-xxx class detection on pre tags in ReverseMarkdown ( #5299 )
...
* Allow language-xxx class detection on pre tags in ReverseMarkdown
Solves thepracticaldev/dev.to#5298
* Remove comment
2020-01-02 11:23:44 -05:00
Molly Struve
7c650dcb1c
Remove RedisRailsCache and replace with Rails.cache ( #5059 ) [deploy]
2019-12-10 13:11:08 -06:00
Mac Siri
8e9c26b6ab
Add fosstodon to mastadon whitelist ( #4992 )
2019-12-03 08:50:20 -05:00
jeffin sam
f023a00d9f
add html_css_to_image to RedisRailsCache ( #4753 ) [deploy]
2019-11-28 09:44:31 -05:00
jeffin sam
7cc5ef5e40
Write to RedisCache to avoid cache miss in add html_css_to_image ( #4821 ) [deploy]
2019-11-15 13:09:18 -05:00
Josh Bran
5e32dcd9db
Update constants.rb ( #4394 )
2019-10-14 09:15:09 -04:00
Alessandro Diogo Brückheimer
c8b6c9c095
Prepend non-url paths with https://dev.to ( #4306 )
2019-10-11 12:34:42 -04:00
Michel
7d530cf002
Fix invalid anchored links due to "//" prefix. ( #4340 )
2019-10-09 13:57:58 -04:00
Yash Dave
328d27ff41
Fix links without http(s) ( #4155 ) [ci skip]
2019-10-07 09:52:07 -04:00
Paula
bff87da43c
Add cybre.space instance ( #4218 )
2019-10-03 12:55:35 -04:00
R¥
5358533139
Add hackers.town to allowed Mastodon instances ( #3642 )
2019-08-06 10:37:35 -04:00
Ben Kooiman-Cox
7fe6cd296b
Add linuxrocks.online to Mastodon whitelist ( #3068 )
2019-06-07 10:02:49 -04:00
Bolarinwa Balogun
5b0340351b
Fix non-english characters delete on tags ( #2579 )
2019-04-29 17:33:14 -04:00
Mario See
4ca70f202e
add phpc.social to mastodon list ( #2352 )
2019-04-10 10:58:05 -04:00
Abraham Williams
9cb40e546b
Enables Rails cops ( #2186 )
...
* Enable Rails cops
* Fix Rails/DynamicFindBy
* Fix Rails/HttpStatus
* Fix Rails/Blank
* Fix Rails/RequestReferer
* Fix Rails/ActiveRecordAliases
* Fix Rails/FindBy
* Fix Rails/Presence
* Fix Rails/Delegate
* Fix Rails/Validation
* Fix Rails/PluralizationGrammar
* Fix Rails/Present
* Fix Rails/Output
* Fix Rails/Blank
* Fix Rails/FilePath
* Fix Rails/InverseOf
* Fix Rails/LexicallyScopedActionFilter
* Add Rails/OutputSafety to TODO
* Add Rails/HasManyOrHasOneDependent to TODO
* Add Rails/SkipsModelValidations to TODO
2019-03-25 09:25:55 -04:00
Brylie Christopher Oxley
1a10a344f3
Add social.coop ( #2170 )
2019-03-22 16:44:28 -04:00
Mike Coutermarsh
dd84051ce4
Social Card upgrade - Part 1 ( #2090 )
...
* Add HtmlCssToImage for generating images
This will be used by social_previews to convert the templates into images.
Setup a fallback image primarily for local dev, so that this won't cause
errors if authentication is missing.
Caching is setup to use contents of the html/css. So it with
autobust/generate a new image whenever the markup changes.
* Update Article social preview template to not be random
+ Being random breaks caching (since we generate cachekey by a SHA of html content)
+ Use Roboto for when generating via HTML/CSS to Image
* Update Tag social preview template to not be random
+ Make rand deterministic so it doesn't break caching
* Update user social preview template for html/csstoimage
* Update shecoded template to work with both url2png and htmlcsstoimage
* Add ability to respond to .png for social previews controller
When adding .png to the url, these routes will now generate an image and
redirect to it.
This leaves the existing pages as they were, so we're backwards
compatible with all the existing links out in the world.
* Fix merge conflicts
* Remove some duplication
* Improve spec descriptions/read better
* clean up setting template with a ternary
2019-03-22 16:28:02 -04:00
cyrillefr
a2fcbdc4a4
Enable performance rubocop cops ( #2140 )
2019-03-21 16:01:45 -04:00
Keshav Biswa
8d57d45ecc
Rubocop Style cops enabled ( #2056 )
...
* Rubocop enabled style/alias
* Enabled Style/ArrayJoin Cop
* Enabled Style/Attr
* Enabled Case Equality
* Enabled CharacterLiteral
* Enabled ColonMethodCall Cop
* Enabled CommentAnnotation cop
* Enabled PreferredHashMethods Cop
* Enabled DoubleNegation Cop
* Enabled EachWithObject Cop
* Enabled EmptyLiteral Cop
* Enabled EvenOdd Cop
* Enabled IfWithSemicolon Cop
* Enabled Lambda and LambdaCall Cop
* Enabled LineEndConcatenation Cop
* Enabled ModuleFunction Cop;
* Enable NegatedIf and NegatedWhile Cop
* Enabled NilComparison Cop
* Enabled Not Cop
* Enabled NumericLiterals Cop
* Enabled OneLineConditional Cop
* Enabled PercentLiteralDelimiters Cop
* Excluded internal/users_controller from negated_if cop
* Reverted the double negation change from github_issue_tag and github_issue.rb"
* Enabled PerlBackrefs Cop
* Changed Regexp.last_match(1) to Regexp.last_match(0)
* Enabled proc cop
* Enabled RaiseArgs Cop
* Reverted Regexp.last_match(0) to Regexp.last_match(1)
* Enabled SelfAssignment Cop
* Enabled SingleLineMethods Cop
* Enabled SpecialGlobalVars Cop
* Enabled VariableInterpolation Cop
* Enabled WhenThen Cop
* Enabled WhileUntilModifier Cop
* Enabled WordArray Cop
* Enabled IfUnlessModifier Cop
* Enabled GuardClause Cop
2019-03-15 18:33:54 -04:00
David Celis
1ceda51e88
Add xoxo.zone to the allowed Mastodon instances ( #2009 )
2019-03-08 16:00:02 -05:00
Michał Krzysztof Feiler
73b909a1fd
Add "101010.pl" to Mastodon list ( #1612 )
2019-01-22 15:37:56 -05:00
Michał Krzysztof Feiler
5ff204c4ed
Add "bsd.network" to Mastodon list ( #1611 )
2019-01-21 17:39:32 -05:00
rhymes
6553f08d94
Rubocop cleanups ( #1415 )
...
* Update rubocop-todo.yml with new violations
* Fix Layout/EmptyLine* rules
* Fix Layout/Indentation* rules
* Fix remaining Layout/* rules
* Fix Lint/DuplicateMethods by removing unused accessor
* Fix Lint/IneffectiveAccessModifier
* Fix Lint/MissingCopEnableDirective
* Re-run rubocop auto gen config
* Fix Layout/RescueEnsureAlignment
* Fix Naming/* rules
* Fix some RSpec/* rules
* Fix typos
* Fix RSpec/LetBeforeExamples
* Series should only be an attr_writer, not an attr_accessor
* Fix RSpec/InstanceVariable
* Fix RSpec/InstanceVariable
* Fix RSpec/RepeatedDescription and RSpec/RepeatedExample
* Fix Style/ClassAndModuleChildren
* Fix Style/ConditionalAssignment
* Fix some Style/* rules
* Trigger Travis CI build because failing tests are not failing locally
* Revert "Fix Style/ClassAndModuleChildren"
This reverts commit 1686801d8a1516ba1894f79e24401a20dea65f99.
2019-01-02 11:20:02 -05:00
Brian Kephart
5a4f894e84
Add ruby.social to Mastadon safelist ( #1302 )
2018-12-11 10:30:01 -05:00
rhymes
96d01b20a2
Use allow/allowed instead of whitelist ( #1296 )
...
* Use allow/allowed instead of whitelist
* Remove duplication in comment
2018-12-10 13:16:16 -05:00
Conlin Durbin
121d0b1561
Add "radical.town" to Mastodon list ( #1279 )
2018-12-07 11:56:34 -05:00
Nick Taylor
86e55c2b6d
Added toot.cafe to Mastodon whitelist ( #1268 )
2018-12-06 14:08:55 -05:00
Martin Riedel
9fb2cd8d16
Add infosec.exchange to mastodon whitelist. ( #1262 )
...
* Add infosec.exchange to mastodon whitelist.
* fix codeclimate error
alignment was off;
tab instead of spaces has been used;
2018-12-05 09:55:02 -05:00
Tim Krueger
f016ee3b7f
Add two German instances ( #1260 )
...
'ruhr.social' and 'chaos.social' are two mastodon instances hosted in Germany.
2018-12-05 09:11:14 -05:00
Michael Kohl
ffd24f791e
Add Mastodon URL to profile ( #1137 )
2018-12-04 13:24:53 -05:00
Jason Yu
3af90f1d0e
remove punctuations in header anchor links ( #1219 )
...
* remove punctuations in header anchor links
* remove punctuations first
* added test case for punctuation headings
2018-11-29 15:16:09 -05:00
Ben Halpern
031a3bd751
Fix parsing error in header tags. ( #1180 )
...
* Strip HTML from anchor link in header names
* Skip one test which is not passing for unknown reasons
2018-11-22 12:48:46 -05:00
Gabriel Lebec
1e2749be24
feat(markdown): add ids to headers ( #713 )
...
* feat(markdown): add anchors for headers
* Fix markdown anchors impl and spec
* Fixes tests for markdown anchors
* Use name for anchors instead of IDs
* Fix approval file
* Remove emojis in links and hyphenate only spaces
2018-11-20 18:17:07 -05:00
Yechiel Kalmenson
37e0059ade
open markdown links in new tab (take 2) ( #512 )
...
* open links in chats in new tabs
* fixed target_blank vulnerability
* add test to make sur links are being generated with target _blank
* add test for target blank vulnerability
* add rel and target to the whitelisted attributes
* add the link attributes to HTMLRouge#link
2018-07-11 15:04:03 -04:00
Mac Siri
8d36c74d3c
Move HTMLRouge into lib ( #403 )
...
* Move HTMLRouge into lib
* Fix lint
2018-06-12 16:53:58 -04:00
Mac Siri
dd958ba40c
Move custom TagParser into lib ( #399 )
2018-06-08 13:44:52 -04:00
Mac Siri
9cbc209d62
Monkey-patched ReverseMarkdown's :text & :pre ( #353 )
2018-05-25 14:03:59 -04:00