Commit graph

625 commits

Author SHA1 Message Date
rhymes
6cd64c4071
Rubocop: enable and fix Style/Send and Style/Next (#9366)
* Enable and fix Style/Send

* Enable and fix Style/Next

* Fix private cookies send

* Fix merging indentation issues
2020-07-20 16:28:00 +02:00
Michael Kohl
a4dadfb728
Standardize ActiveRecord order clauses (#9395)
* Change simple order clauses

* Change nested order clauses
2020-07-20 10:00:51 -04:00
Sarthak Sharma
3addb64326
[deploy] 🚀 Feature: Chat channel membership manager component (#8945)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* Merge conflict resolved

* fix video content issue

* add UI for membership management

* add api to update memberahip role

* add methods for manage membership

* Add integration test cases

* add emoji for admin

* Open member profile in sidecar only

* 🐞 Problem with direct channel sidecar

* 🐞 Few other UI enhancements

* fix mod typo

* add limit upto 4 for display active memberships

* fix UI issues

* fix action ui for membership

* fix sidebar redirection issue

* fix svg buttons

* add test cases

* fixed broken spec

* fix PR suggestions

* remove not used code

* fix typo

* fix PR suggestion

* fix typos

* add invitation url expiry

* fix specs

* fix PR suggestions

* removed unused gem

* remove presenter format

* handle invitation link expiry with redis

* fix PR suggestions

* user can view non-discoverable channel invitation link

* fix typos

* remove commented code

* add spacing

* PR suggestions

* remove class from button

* replace componentDidMount with commen function

* remove action button for single membership

* add chat message on update role

* add spece between lines

Co-authored-by: Narender Singh <narender2031@gmail.com>
Co-authored-by: Fernando Valverde <fdov88@gmail.com>
2020-07-20 08:08:31 -04:00
Molly Struve
62d43a1ce7
[deploy] Refactor: Remove Block Model and All Related Code (#9370) 2020-07-17 15:32:39 -05:00
Josh Puetz
73a3bcc68a
Attempt to turn off Flipper UI CSRF protections (#9360) [deploy]
* Turn off flipper ui CSRF

* Turn off CSRF protection in Flipper UI
2020-07-16 21:56:11 -05:00
Josh Puetz
e9cafe5de6
Add logging to Flipper UI (#9355) [deploy] 2020-07-16 11:47:54 -05:00
rhymes
f1ec04a0c9
Rubocop: move dot in multi-line calls to leading position (#9262) 2020-07-16 15:51:11 +02:00
Alex
204fb51f14
[deploy] Remove path redirects (#9350)
* Remove path_redirect menu item

* Remove path_redirects_controller

* Remove path_redirect routes

* Remove PathRedirect model

* Remove internal views

* Remove path_redirects from seed file

* Remove PathRedirect factory

* Remove specs

* Migration to drop table and update schema
2020-07-16 09:35:42 -04:00
Josh Puetz
9ce75250ff
Attempt to fix Flipper-UI (#9320) [deploy]
* Upgrade redis-store, attempt to fix flipper ui

* Remove explicit Gemfile require for redis-store, use URL.url

* Re-add use of URL 🤦
2020-07-15 22:13:40 -05:00
Ben Halpern
da6a6739e5
[deploy] Invite users to join and create password (#9294)
* Initial invitation work

* Add more invitation code

* Add proper registration page

* Fix up tests

* Fix failings

* Fix spec

* Add self-serve auth config

* Add registered condition

* Change profile image call and registered_at test

* Change comment

* Fix copy test

* Stub emojipedia

* Linting

* Add registered at to factory

* Ensure registered for user tag

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Slight changes

* Update recover password flow

* Update app/views/internal/invitations/index.html.erb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update app/controllers/internal/invitations_controller.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>

* Update db/schema.rb

Co-authored-by: Michael Kohl <citizen428@dev.to>
2020-07-15 11:37:19 -04:00
Molly Struve
66c70d38e8
[deploy] Bug Fix: Validate GIFs Frames and Add MiniMagick Timeout (#9319) 2020-07-15 09:49:24 -05:00
Jacob Herrington
bf0ec3271a
Add /forem redirect (#9317) 2020-07-14 17:23:28 -04:00
Molly Struve
25f739b389
[deploy] Optimization:Change Log Level in Prod to Info (#9257) 2020-07-10 15:51:11 -05:00
Molly Struve
628c16fd79
[deploy] Bug Fix: Setup STDOUT Logger bc we need it (#9256) 2020-07-10 14:25:21 -05:00
rhymes
8126c5c2c1
Rubocop: Address Metrics/BlockLength violations (#9246)
* Address Metrics/BlockLength violations

* Add jbuilder to package auto correct
2020-07-10 13:53:32 -04:00
Molly Struve
8377620e31
[deploy] Refactor:Use if/else When Selecting Production Log Strategy (#9224) 2020-07-10 11:53:48 -05:00
rhymes
ffc96db209
Rubocop: fix additional violations in todo file (#9218) 2020-07-09 10:25:44 -04:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Alex
9f9236164c
[deploy] Add subscriptions to the dashboard (#9161)
* Add /dashboard/subscriptions route

* Dashboard controller updates

* Update ArticlePolicy with subscriptions?

* Update article row view in dashboard

* Add subscriptions view

* Add specs

* Add comment for pagination limit

* Use cached user_subscriptions count

* Add spec for cache counter

* Add path helper
2020-07-08 08:31:03 -04:00
Ben Halpern
7bb194b305
[deploy] Remove /rly code (#9192) 2020-07-08 07:55:33 -04:00
Mac Siri
9607549312
Use custom UglifierCompressor to enable source-maps (#9188) 2020-07-08 11:55:53 +02:00
Molly Struve
1f74836b45
Feature: Label Honeybadger Env with APP_DOMAIN (#9180) 2020-07-07 10:25:00 -04:00
Molly Struve
fbdce03712
[deploy] Feature: Filter Sensitive Data From Production Logs (#9181) 2020-07-07 09:49:57 -04:00
rhymes
683f45d1e7
[deploy] Fix pro link for organization users (#9144)
* Fix pro link for org users

* Remove useless empty line
2020-07-05 18:17:03 -04:00
Raphael Noriode
1a4dba2475
API: Fetch article by slug (#8929)
* Add check to id param to use slug if passed

* modify to use slug in a different action

* wrote test for this api endpoint

* update test to check array equality
the test also checks if the first tag in the parsed list is the same as the first tag in the article
2020-07-01 10:58:45 +02:00
rhymes
5eaeb584b3
Routine rubocop fixes (#9015)
* rubocop -a

* Routine rubocop fixes
2020-06-30 16:38:39 -04:00
dependabot-preview[bot]
56736aab15
[deploy] Bump flipper, flipper-active_record and flipper-ui (#8966)
* Bump flipper, flipper-active_record and flipper-ui

Bumps [flipper](https://github.com/jnunemaker/flipper), [flipper-active_record](https://github.com/jnunemaker/flipper) and [flipper-ui](https://github.com/jnunemaker/flipper). These dependencies needed to be updated together.

Updates `flipper` from 0.17.2 to 0.18.0
- [Release notes](https://github.com/jnunemaker/flipper/releases)
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.17.2...v0.18.0)

Updates `flipper-active_record` from 0.17.2 to 0.18.0
- [Release notes](https://github.com/jnunemaker/flipper/releases)
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.17.2...v0.18.0)

Updates `flipper-ui` from 0.17.2 to 0.18.0
- [Release notes](https://github.com/jnunemaker/flipper/releases)
- [Changelog](https://github.com/jnunemaker/flipper/blob/master/Changelog.md)
- [Commits](https://github.com/jnunemaker/flipper/compare/v0.17.2...v0.18.0)

Signed-off-by: dependabot-preview[bot] <support@dependabot.com>

* Bump flipper, flipper-active_record and flipper-ui (Update vendor/cache)

* Removed outdated flipper UI configuration

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
Co-authored-by: Josh Puetz <josh@dev.to>
2020-06-30 08:19:27 -05:00
Molly Struve
4e0fee644c
[deploy] Feature: Setup Admin Area to Update Vault Secrets (#8935) 2020-06-29 15:08:09 -05:00
Nick Taylor
a7938ed287
Fixed a bunch of linting issues in components (#8921) 2020-06-26 10:26:02 -04:00
Mac Siri
ea7d843f35
[deploy] Update Honeybadger's assetsUrl (#8916) 2020-06-25 18:58:20 -04:00
Mac Siri
967f00793a
Add @honeybadger-io/webpack for source-map upload (#8899) 2020-06-24 20:42:28 -04: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
40f54e317f
[deploy] Use Action Mailer parameterized syntax (#8853) 2020-06-23 13:48:41 -05:00
Alex
8714a36d27
[deploy] User subscriptions API and backend updates (#8779)
* Create "blank" EmailSubscriptionTag

* Refactor liquid_tags_used with spec

* Create /user_subscriptions#create

- Update liquid tag name to UserSubscriptionTag

* Add rate limiting and specs

* Add counter_culture for user_subscriptions

* Update /async_info/base_data

- Alphabetize user_data
- Add email
- Add subscription_source_article_ids
- Cache subscription_source_article_ids on User model

* Add stale email check and specs

* Change user_email to subscriber_email for clarity

* Restrict UserSubscriptionTag

* Rename RESTRICTED_TAGS to RESTRICTED_LIQUID_TAGS

* Make TODO comment more clear

* Refactor error responses and update specs

* Update type to source_type in error message

* Use constantize over safe_constantize

* Add check for active source

* Refactor checking of current_user's subscriptions

- Remove data from async_info
- Create a new service to fetch/cache a user's existing subscriptions

* Restrict email in base_data to admin roles

* Oops! Rename liquid tag file

* Change error back to result...oops!

* It's not goodbye, it's see you later. RIP email :/

* Add current_email to /user_subscriptions/base_data

* Revert adding current_email

* Undo async_info_controller changes/fix conflict

* Move params to constant

* Refactor SubscriptionCacheChecker

* Remove duplicate status code in JSON response

* Remove duplicate status code for #subscribed

* Use response.parsed_body

* Remove user guard in SubscriptionCacheChecker
2020-06-23 13:43:32 -04:00
Andy Zhao
75e5151292
[deploy] Remove github from reserved words (#8860) 2020-06-23 13:36:12 -04:00
Vaidehi Joshi
439f92cf66
[deploy] Mask ip addresses + no cookies in ahoy (#8843) 2020-06-22 20:54:43 -04:00
Vaidehi Joshi
9fd565d71e
Only track server-side events when needed (#8839) [deploy]
Ensures that we don't create new visits for non-logged-in users, bots,
and users with cookies disabled on every site visit. This will only
allow server-side visits when there is an event to be tracked.
2020-06-22 15:57:20 -07:00
Vaidehi Joshi
c4d9c4aed9
Remove trailing slashes from URLs to improve SEO (#8836) [deploy] 2020-06-22 13:44:58 -07:00
Molly Struve
3d4a079572
[deploy] Refactor: Remove Additional Content Box Code (#8776) 2020-06-22 10:36:23 -05:00
rhymes
36786cf554
Rails 6: enable zeitwerk autoloader (#8766)
* More loading fixes

* Go back to OpenStruct

* Shuffle things around

* Remove obsolete patches and unneeded requires

* Disable config.add_autoload_paths_to_load_path

* Fix pre-require errors

* Config not reloader
2020-06-22 16:27:55 +02:00
Julianna Tetreault
426d3191e8
Add a Broadcast Show View (#8769) [deploy]
* Add #show to the Broadcasts::Controller and to routes.rb
  - Adds a show method to the Broadcasts Controller
  - Adds a show route to routes.rb

* Add a show view for Broadcasts
  - Adds show.html.erb to /internal/broadcasts
  - Repurposes code from index.html.erb for show view
  - Repurposes code from edit.html.erb for show view

* Rewrite /internal/broadcasts index to use a table
  - Formats /internal/broadcasts with a table
  - Removes on-hover functionality from show.html.erb

* Refactor Broadcast resources in routes.rb

* Redirect to #show on create and update for Broadcasts

* Add the Destroy Broadcast button to the Broadcast show view

* Remove style preventing Broadcast preview

* Add Broadcast styling back and add display: block to stylesheet

* Add display: flex to .broadcast-wrapper in layout.scss

* Remove superfluous slashes from opening tags
2020-06-18 15:51:45 -06:00
Vaidehi Joshi
904f0dac78
Add ahoy + welcome notification tracking (#8758) [deploy]
* Set up ahoy gem, add ahoy-js

* Import ahoy.js into base.js.erb

* Add trackNotification function to notifications/index.html.erb

* Add sanitized_broadcast_id helper

* Use sanitized_broadcast_id in broadcast partial

* Add specs around tracking welcome notifications

* Remove optional fields from Ahoy::Visit migration + table

* Fiddle with trait to see if it helps with CI failures

* Disable geocode tracking in ahoy

* Stub out SiteConfig in notifications page spec
2020-06-18 13:40:14 -07:00
Dmitry Maksyoma
be07697d6d
Adapt dev env to run on a remote box (#8232)
* Adapt dev env to run on a remote box

* webpack-dev-server ignores CLI arguments, so switched to environment
  variables.
* Dynamically determine remote webpack host via APP_DOMAIN environment
  variable, defined in application.yml.
* Setup content security policy to allow connecting to webpack on a
  remote box, defined by APP_DOMAIN environment variable.

* Make Webpacker listen on 0.0.0.0

* Account for APP_DOMAIN port

* Add support for URI scheme and tests

* Fix a spec by disabling a Rubocop linter
2020-06-18 13:01:49 +02:00
Josh Puetz
62fdf6f897
Let's try this again (#8747) 2020-06-17 18:34:40 -04:00
rhymes
7309478420
Rails 6 autoloader: prepare liquid tags code (#8707)
* Move liquid patches to lib/liquid

* Rename classes properly
2020-06-17 16:50:14 +02:00
Michael Kohl
ac3c12f574
Update config.hosts for GitPod (#8677)
* fake gitpod dockerfile commit

* install ruby 2.7.1 to different directory

* remove fakevar

* affix node version to 12.16.3

* try setting explicit version

* Add GitPod workspace URL to config.hosts

Co-authored-by: snackattas <zach.attas@gmail.com>
2020-06-15 17:18:33 +02:00
narender2031
e78a0078a7
[deploy] Refactor 🚀 : Replaced Chat Channel Setting page with Preact component. (#8271)
* Feature 🚀 : Ability to delete messages in chat channels

- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime

* Minor Bug 🐞: Show message action only for current user

- User can delete or edit their own messages

* Test cases added

* Bug 🐞: Update message id for receiver

Message id was not sent to receiver by pusher

* Refactoring🛠: Message controller refactoring

* Test Cases📝 : Specs for Delete message added

* Feature 🚀 : Ability to edit messages

* Test Cases📝 : Specs for Edit message added

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* Merge conflict resolved

* 🐞 Channel List bug in mobile view

* changes in joining request responses

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* changes in api for remove membership

* 🛠Optimizing for CodeClimate

* 🛠Optimizing again for CodeClimate

* 🛠Optimizing again 2 for CodeClimate

* 🛠 Added more test cases

* 🛠 Optimizing code

* 🚀 Action to open setting page added

* 🛠  Dummy page added for chat setting

* add JSON routes for chat channel settings

* Integrate chat channel settings API with UI

* 🐞 Channel List bug in mobile view

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* 🐞 Channel List bug in mobile view

* 🛠  Request Managers Frontend ready

* changes in routes for adding and removing remembership

* 🚀 New routes implemented for request manager

* fix issues

* 🛠Optimizing again for CodeClimate

* 🚀 Action to open setting page added

* 🛠  Dummy page added for chat setting

* add JSON routes for chat channel settings

* Integrate chat channel settings API with UI

* Fix PR requested changes

* Add JSDoc documentation to exported functions

* fix/add rspec test cases

* refactor channelSettinngs render part

* add test cases for chat channel settings component

* fix code-climate

* add rest component tests

* add more test coverage

* fix code-climate bugs

* add API function test

Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
2020-06-10 16:58:37 -04:00
Andy Zhao
5f336d9aee
[deploy] Add crayons to reserved words (#8386) 2020-06-10 12:16:06 -04:00
rhymes
71d53873d1
Use Rails 6 new features in the code (#8342)
* Use pick instead of pluck first

* Use touch_all instead of update_all

* Use destroy_by instead of where.destroy_all

* Use scopes

* Fix db:seed:replant

* Remove ActiveSupport::Cache::RedisCacheStore expires_in cache
2020-06-08 16:06:29 -04:00