Commit graph

3372 commits

Author SHA1 Message Date
Jacob Herrington
c669ac4e86 Expand the contributing guide (#4947)
* Add 80 character linewrap

* Expand the contributing guide [ci skip]

This commit includes a couple of expansions on the contributing guide
including some notes concerning documentation and the code of conduct.

There are also some small mechanical fixes and a link or two was fixed.
2019-11-29 13:51:38 -05:00
Anna Buianova
cfd5434d6c User deletion by email (#4863) [deploy]
* Action to request account deletion by email

* Confirmation page for user destroy

* Remove some of the old destroy user code

* System tests for user destroy

* Moved user destroy tokens to redis

* Change tests according to the new user destroy token storage (in redis)

* Added info about the link to user delete confirmation email

* Remove blank like from schema.rb

* Delete user destroy token on user delete

* Update confirm user destroy js
2019-11-29 13:47:11 -05:00
jeffin sam
f023a00d9f add html_css_to_image to RedisRailsCache (#4753) [deploy] 2019-11-28 09:44:31 -05:00
Ben Halpern
5bcdeb5162
Fix black-on-black etc. buttons and update social preview cards (#4954)
* Fix black-on-black etc. buttons and update social preview cards

* Change up font family details

* Fix org badges

* Adjust fonts for user name

* Add roboto to font stack

* Adjust gradiant
2019-11-28 09:39:07 -05:00
Jacob Herrington
845b07aae3 Update readme formatting (#4943)
* Update readme to adopt expected markdown wrapping

In another commit (7d0aeee), we chose to lean on Prettier for
linewrapping markdown files at 80 characters. The reasoning is explained
in that commit message, but briefly: enforcing linewrapping in
documentation files makes the git history cleaner over time, allowing
more specific git blames and more context for people working on
documentation in the future.

This commit applies that same change to the README.

* Remove duplicated documentation [ci skip]

The information regarding installation is available at docs.dev.to,
maintaining that information here is duplication and very likely to fall
out of sync (for example, the readme is currently missing the Redis
dependency) with current information.

Therefore, it's probably better to just remove this stuff and link
directly to our more complete documentation so that people aren't
misled by potentially out of date information in the readme.
2019-11-27 09:53:55 -05:00
Ben Halpern
b938dab91b
Add ApplicationMetalController to relevant controllers (#4937)
* Add ApplicationMetalController to relevant controllers

* Add request forgery protection to metal

* Remove logger call

* Add logger keyword and skip protect_from_forgery in test

* Uncomment main_image in test
2019-11-26 16:29:07 -05:00
sibi
b7e890e382 Cleanup JS part as suggested under users/_accounthtml.erb (#4876) [deploy] 2019-11-26 16:21:25 -05:00
Ben Halpern
eaf6ea2f4b
Update pageviews count less often in page_views_controller (#4945) [deploy] 2019-11-26 14:11:47 -05:00
Molly Struve
3be406290a
Store FollowChecker responses to Avoid Multiple db Hits (#4886) [deploy] 2019-11-26 13:03:19 -06:00
rhymes
0ffa127481 Refactor session_current_user_id in a shared concern (#4936) 2019-11-26 13:21:56 -05:00
rhymes
c08e5f0a25 Remove rubyzip initializer (#4935) [deploy]
No longer necessary on Rubyzip 2
2019-11-26 11:25:16 -05:00
rhymes
87116dcc56 Increase efficiency in models/article_spec.rb (#4882) [deploy]
* Add test sampler

* Use let! and let_it_be for article_spec.rb

* Regroup and restructure expectations and tests

* Move private methods in private

* Decrease the needed objects in .seo_boostable test

* Re-use the user

* Newlined
2019-11-26 10:32:39 -05:00
Anthony Musyoki
2537670968 Refactor raise_error(specific_error) expectation (#4912)
* Refactor raise_error(specific_error) expectation

The full RSpec warining is
```
WARNING: Using `expect { }.not_to raise_error(SpecificErrorClass)` risks false positives,
since literally any other error would cause the expectation to pass,
including those raised by Ruby (e.g. NoMethodError, NameError and ArgumentError),
meaning the code you are intending to test may not even get reached.
Instead consider using `expect { }.not_to raise_error` or `expect { }.to raise_error(DifferentSpecificErrorClass)`.
```

* Refactor jsitor tests to test behaviour

As pointed out by @rhymes, the previous tests were not
testing actual behaviour. This is an attempt at improving the tests.
2019-11-26 08:46:33 -05:00
Jacob Herrington
7d0aeeefe5 Improve the clarity of the docs and fix Prettier config (#4899)
* Improve format and clarity of the docs [ci skip]

While this change produces a lot of git noise by enacting what seems
like an arbitrary linewrap on most of the files in the documentation it
will result in better version control and tracking of the changes in the
documentation.

For example, as it currently stands, if one was to make a
PR to move a comma in a sentence because each paragraph in most of the
files is on a single line, that small change would look in the git
history like the author had modified the entire paragraph. In reality,
this author just moved a comma.

This change also includes a significant number of modifications to the
more article-esque docs. Many of these docs were written in a sort of
stream-of-conciousness and aren't as easy to read as they could be.
Hopefully this is the first of several readability changes. If we could
get these docs to a more accessible reading level, we would probably see
an increase in contributions. :)

* Delegate markdown wrapping to Prettier

* Add linewrapping explanation in the docs [ci skip]
2019-11-26 08:40:53 -05:00
Ben Halpern
4dabe265c6
Fix linting (#4933) [deploy] 2019-11-26 08:35:34 -05:00
Ben Halpern
481871f127
Revert Redis fragment cache (#4932) [deploy] 2019-11-25 19:33:30 -05:00
Ben Halpern
befefd08d0
Remove extra dependencies for PageViewsController (#4923) [deploy]
* Remove extra dependencies for PageViewsController

* Fix strongparams and fix typo

* Fix spec

* Remove unnecessary page_view param

* Remove additional unnecessary page_view

* Create ApplicationMetalController for shared Metal behavior

* Revert rand numbers to ensure apples-to-apples perf compare

* Whoops, revert change revert

* Clarify comment
2019-11-25 19:06:34 -05:00
Molly Struve
e5d438efb0 Move organization profile image cache to Redis (#4930) [deploy] 2019-11-25 18:19:04 -05:00
Molly Struve
59e9971d06 move bottom_content article content to Redis (#4927) 2019-11-25 18:17:19 -05:00
Molly Struve
441c216e66 remove article-main-reactions cache key (#4928) 2019-11-25 18:16:43 -05:00
dependabot-preview[bot]
0b9ccaad06 Bump rubyzip from 1.3.0 to 2.0.0 (#4915) 2019-11-25 17:03:22 -05:00
Callum Williams
337e66fdd7 Fix light outline around sidebar profile picture in night mode (#4799)
Use theme-container-background over $tan for sidebar profile picture background. This prevents ugly rendering with the night theme in Firefox.
2019-11-25 15:18:38 -05:00
dependabot-preview[bot]
ee860857c1 Bump twilio-ruby from 5.29.0 to 5.29.1 (#4919) [deploy] 2019-11-25 15:06:30 -05:00
dependabot-preview[bot]
bc956a1681 Bump inline_svg from 1.5.2 to 1.6.0 (#4917) 2019-11-25 15:04:17 -05:00
dependabot-preview[bot]
c14c02d440 Bump rouge from 3.12.0 to 3.13.0 (#4914) 2019-11-25 15:03:22 -05:00
dependabot-preview[bot]
41def72da7 Bump pusher-js from 5.0.2 to 5.0.3 (#4909) [deploy] 2019-11-25 14:14:55 -05:00
dependabot-preview[bot]
d4969b3dbe Bump aws-sdk-lambda from 1.31.0 to 1.32.0 (#4916) 2019-11-25 14:14:17 -05:00
rhymes
213e7bebab Routine rubocop fixes (#4924)
Ran rubocop -a and rubocop --auto-gen-config
2019-11-25 14:13:22 -05:00
dependabot-preview[bot]
4760a6de9f Bump rubocop-rspec from 1.36.0 to 1.37.0 (#4918) 2019-11-25 10:44:39 -05:00
dependabot-preview[bot]
cf403aba6c Bump eslint-config-prettier from 6.6.0 to 6.7.0 (#4908) 2019-11-25 10:43:34 -05:00
dependabot-preview[bot]
34991f405b Bump rspec-retry from 0.6.1 to 0.6.2 (#4913) 2019-11-25 10:42:49 -05:00
Molly Struve
477bc00676
Update reading list updated_at cache key timestamp (#4885) [deploy] 2019-11-25 09:28:29 -06:00
Jacob Herrington
d2112adcbf Delete a commented out system spec (#4905)
This test was commented out, but I don't see much information in the
commit message as to why. The Pull Request which this commit was merged
from seems to be lost as well.

This test does seem to pass when it's not commented out, but there must
have been a reason it was commented out.

That being said, the test isn't really *testing* much functionality.
Essentially, it just asserts that a page with the word "settings" on it
renders from several different approaches. This might be problematic
because a false positive would be quite easy.

In light of those things, it makes sense to me that this test should be
removed.
2019-11-25 08:20:13 -05:00
Takuma
18df55284e fix typo (#4896) 2019-11-25 08:16:35 -05:00
Jacob Herrington
5624b2e7f9 Add a link for Twitter developer access [ci skip] (#4891) 2019-11-25 08:16:16 -05:00
rhymes
71b25f9bc7 Enable AES-256-GCM on encrypted messages (#4826) [deploy] 2019-11-22 16:54:28 -05:00
Molly Struve
091392cf1f Remove webpush gem and code (#4883) 2019-11-22 16:46:11 -05:00
Ben Halpern
36479f09c3
Replace current_user.id with session_current_user_id (#4880) [deploy]
* Replace current_user.id with efficient_current_user_id in high-leverage areas

* Update name of efficient_current_user_id

* Replace user_signed_in? in pageviews

* Remove unneeded ?
2019-11-22 14:27:43 -05:00
Jacob Herrington
e79ad764bd Onboarding test love (#4878)
* Reduce code duplication in onboarding tests

* Update variable names for consistency

* Improve test descriptions and format

* Refactor a useless test

This test was fairly pointless, but hopefully with this refactor it
could detect a regression? Although, I think it's really just testing
the that the Preact framework's state mechanism is working the way we
expect it to, but it might be worth leaving this test in.
2019-11-22 14:23:57 -05:00
Molly Struve
61753715f1
Remove Service Worker Desktop Notification Code (#4881) [deploy] 2019-11-22 12:47:14 -06:00
rhymes
c9a07faf6a Add script to display and migrate environment variables to SiteConfig (#4865) [deploy] 2019-11-22 10:18:22 -05:00
leewynne
5b50d52b5f Replaced hard coded AWS region in carrierwave.rb and sitemaps.rb. Updated legacy migration files to include pre rails 5 version (this resolved new instances on Heroku) (#4874) [deploy]
* missing rails version 4.2 added to pre 5 migrations

* updated carrierwave.rb and sitemap.rb with AWS_DEFAULT_REGION
2019-11-22 09:07:59 -05:00
Ben Halpern
c817ac0192
Fix missing series in article edit form (v2) (#4867) [deploy] 2019-11-22 08:33:55 -05:00
Jacob Herrington
c6c5421163 Javascript automated testing and a11y doc (#4873)
* Add jext-axe package and introduce a11y testing

Automated a11y testing is NOT comprehensive. We cannot expect this to
even scratch the surface of potential a11y issues.

However, we can expect to find a percentage of issues that are currently
flying under the radar. Adopting some automation around a11y testing
also allows us to use CI to find a11y regressions -- which should be
really handy.

I've never really used Jest before, and Preact seems to make it a little
more complicated, but as far as I can tell, this is a decent way to add
at least some minor automated a11y testing.

* Add doc about automated a11y tests
2019-11-22 08:32:01 -05:00
Spencer
e5ee2f9013 Mod tooling: add tags via /mod (#4750) [deploy]
* added tests to specs

* added view logic

* added controller/model functionality

* minor tweak to tagadjustment view

* adjusted mod view to reduce query

* added instance variables to controller

* show already adjusted tags in mod view

* removed unnecessary ifs from mods controller

* catch and display errors to tag adjustment forms

* update specs and refactor
2019-11-21 16:32:32 -05:00
Jacob Herrington
10426fbef5 Delete a commented out test (#4875) 2019-11-21 15:14:12 -05:00
dependabot-preview[bot]
5d688fc0a6 Bump acts-as-taggable-on from 6.0.0 to 6.5.0 (#4854) 2019-11-21 14:56:28 -05:00
shaneblackburn
9d7817b025 Disable like button b/w click & backend response (#4869) [deploy] 2019-11-21 12:31:40 -06:00
rhymes
c8903876c6 Upgrade docs Ruby version to 2.6.5, same as the main app (#4872) 2019-11-21 08:16:13 -05:00
John Curcio
157a6f1ef1 Add pagination to followers and following page in dashboard (#258) (#4375) [deploy]
* Add infinite scroll to followers list (#258)

* Refactor fetchNext function for clarity (#258)

* Sepparate following tab into multiple tabs to support infinite scroll (#258)

* Add infinite scroll to following pages (#258)

* Add tests to infinite scroll api

* Refactor dashboard loading text

* Refactor infine scroll function

* Fix duplicated entries problem in infinite scrolling

* Switch randomized attributes to sequential to avoid InvalidRecord error

* Add acceptance tests for infinite scroll

* Remove unused following method

* parameterize limit per page for followers and followings

* Split follows endpoint into followers and followings

* Authenticate user with api key in followers and followings

* Split followers endpoint into users and organizations

* Add redundant html to sublist partial

* Speed up infinite scroll tests

* Refactor api json responses to use partials

* Authenticate api user before follows create

* Resolve conflicts on scrolling js

* Improve partials organization and fix organization username bug

* Improve readability of unauthorized test

* Use let! to create scrolling test data

* Fix not working podcasts link

* Refactor initScrolling to remove linting errors

* Fix codeclimate coding style issue

* Test tags forms and podcasts hyperlinks

* Fix eslint issue with double equals

* Improve before_action usage and readability
2019-11-20 18:21:18 -05:00