Commit graph

64 commits

Author SHA1 Message Date
Arnold Chand
df172702df
update: add mastodon.online to the whitelist (#9104)
This will whitelist mastodon.online url, so users from the
mastodon.online instance can link their profile within their dev.to
profile page.
2020-07-03 18:30:54 -04:00
Molly Struve
4e0fee644c
[deploy] Feature: Setup Admin Area to Update Vault Secrets (#8935) 2020-06-29 15:08:09 -05:00
Molly Struve
9fb2a7c6b2
[deploy] Remove Vault ENV variables from Envfile so they arent Required in Prod (#8895) 2020-06-24 15:02:16 -05:00
Molly Struve
0767c34379
[deploy] Feature: Setup Vault and AppSecrets Wrapper Class (#8891) 2020-06-24 14:13:37 -05:00
rhymes
4ab6d02d2f
Routine rubocop fixes (#8346)
* rubocop -a

* rubocop --auto-gen-config
2020-06-08 17:37:25 +02:00
rhymes
fa22f346e4
Add merveilles.town to list of Mastodon instances (#7983) 2020-05-20 17:48:46 -04:00
Liz Fong-Jones
a6305fd0a3
[deploy] Honeycomb instrumentation: distinguish between literal vs prefix matching for sampling (#7936) 2020-05-19 09:49:41 -05:00
Liz Fong-Jones
8309e0af2a
[deploy] remove additional cruft (#7929) 2020-05-18 13:11:14 -05:00
Molly Struve
dbb5c752ab
[deploy] Sample Noisy Honeycomb Spans (#7891) 2020-05-18 10:36:01 -05:00
rhymes
3d313efbd6
Fix profile page rendering when a username contains spaces (#7787) 2020-05-13 08:37:50 +02:00
Ben Halpern
3f61cce32b
[deploy] Render json+ld as proper json (#7404) 2020-04-21 14:16:21 -04:00
Molly Struve
91972dd2c4
ensure that when Tag and ActsAsTaggableOn::Tag are updated their respective related docs are as well (#7218) 2020-04-14 08:38:09 -05:00
rhymes
34848a4209
Upgrade Rubocop to 0.81 (#7219)
* Upgrade rubocop to 0.81.0

* Reordered rubocop file and updated it

* Regenerate todo

* Correct some things

* Fix specs
2020-04-11 10:10:04 +02:00
Michael Kohl
eeed7f6c54
Introduce URL.sanitized_referer helper (#7122) [deploy]
* Introduce URL.sanitized_referer helper

* Make service worker path a constant

* Simplify redirect logic

* Actually use helper

* Remove random file
2020-04-07 17:57:13 +02:00
Molly Struve
29b1d0c32c
[deploy] Index Tags on Creation to via ActsAsTaggableOn in Elasticsearch (#7104) 2020-04-07 10:14:24 -05:00
rhymes
f2b0be2043
Add Slack messengers: part 2 (#6916)
* Add Slack::Messengers::ArticlePublished

* Add Slack::Messengers::ReactionVomit

* Add Slack::Messengers::CommentUserWarned

* Add missing URL helpers

* Add Slack::Messengers::ArticleFetchedFeed

* Remove callback condition

* Build, don't create
2020-04-03 17:00:06 +02:00
Ben Halpern
e35d55c422
Add pagination to tag pages for better SEO crawling (#6771) [deploy]
* Add pagination to tag pages for better SEO crawling

* Modify system specs

* Add some tests

* Finalize tests

* Fix things up

* Add url helpers
2020-03-27 10:34:42 -04:00
rhymes
cfb64a1c68
Add URL module and article_url, user_url helpers (#6833)
* Add AppURL with .article and .user

* Use URL.url and URL.user

* Add article_url and user_url helpers
2020-03-25 13:54:45 -04:00
rhymes
88aa28eedf
Move App into app/lib (#6830) [deploy]
* Move App into app/lib

* Oops
2020-03-25 09:48:35 -04:00
rhymes
2b31a9b9ee
Allow different casings to be specified for syntax highlighting (#6354) 2020-02-28 12:36:27 -05:00
Molly Struve
cf94f76ccd
Notify slack when release phase fails (#6300) [deploy] 2020-02-27 10:50:59 -05:00
rhymes
fc09716709
Use builtin Rails index_exists? for indices (#6293) 2020-02-26 11:05:23 -05:00
Molly Struve
607d8d71de
Add index missing check to podcast migration (#6292) [deploy] 2020-02-25 12:29:19 -05:00
Outvi V
2452f1564b
ALLOWED_MASTODON_INSTANCES: Add moe.cat (#6289) 2020-02-25 08:34:49 -05:00
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
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