Commit graph

5558 commits

Author SHA1 Message Date
rhymes
70dc2429bc
Add timestamps to broadcasts (#8181)
* Add timestamps to broadcasts

* Update schema version
2020-06-01 18:11:38 +02:00
rhymes
552c581412
Revert "[deploy] Upgrade nvm to use node 12.17 (#8209)" (#8219)
This reverts commit 3233558c5d.
2020-06-01 11:54:47 -04:00
Molly Struve
38634e5316
[deploy] Optimization: Remove Comment Count From Aysnc user_data (#8174) 2020-06-01 10:38:57 -05:00
dependabot-preview[bot]
23d7fa6ac1
[deploy] Bump twilio-ruby from 5.35.0 to 5.36.0 (#8202)
* Bump twilio-ruby from 5.35.0 to 5.36.0

Bumps [twilio-ruby](https://github.com/twilio/twilio-ruby) from 5.35.0 to 5.36.0.
- [Release notes](https://github.com/twilio/twilio-ruby/releases)
- [Changelog](https://github.com/twilio/twilio-ruby/blob/master/CHANGES.md)
- [Commits](https://github.com/twilio/twilio-ruby/compare/5.35.0...5.36.0)

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

* Bump twilio-ruby from 5.35.0 to 5.36.0 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-01 10:36:27 -05:00
dependabot-preview[bot]
91acad3231
Bump mini_racer from 0.2.10 to 0.2.14 (#8203)
* Bump mini_racer from 0.2.10 to 0.2.14

Bumps mini_racer from 0.2.10 to 0.2.14.

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

* Bump mini_racer from 0.2.10 to 0.2.14 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-01 10:35:26 -05:00
Nick Taylor
a72831b952
Import jest-axe matchers via setupFilesAfterEnv config property (#8217)
* Now expect is extended for jest-axe via the jest setupFilesAfterEnv config property.

* Renamed a test setup file for jest.
2020-06-01 16:37:32 +02:00
Molly Struve
699f9c8144
[deploy] Optimization:Use Scope and current_user to Get Notification Count (#8177) 2020-06-01 09:27:46 -05:00
dependabot-preview[bot]
a3c62df266
Bump dogstatsd-ruby from 4.8.0 to 4.8.1 (#8200)
* Bump dogstatsd-ruby from 4.8.0 to 4.8.1

Bumps [dogstatsd-ruby](https://github.com/DataDog/dogstatsd-ruby) from 4.8.0 to 4.8.1.
- [Release notes](https://github.com/DataDog/dogstatsd-ruby/releases)
- [Changelog](https://github.com/DataDog/dogstatsd-ruby/blob/master/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dogstatsd-ruby/compare/v4.8.0...v4.8.1)

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

* Bump dogstatsd-ruby from 4.8.0 to 4.8.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-01 09:26:35 -05:00
dependabot-preview[bot]
317377cca9
Bump blazer from 2.2.2 to 2.2.4 (#8204)
* Bump blazer from 2.2.2 to 2.2.4

Bumps [blazer](https://github.com/ankane/blazer) from 2.2.2 to 2.2.4.
- [Release notes](https://github.com/ankane/blazer/releases)
- [Changelog](https://github.com/ankane/blazer/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ankane/blazer/compare/v2.2.2...v2.2.4)

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

* Bump blazer from 2.2.2 to 2.2.4 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-06-01 09:26:11 -05:00
Josh Puetz
f165c47b34
Add feature flag support to Pages (#8149)
* Add 'feature_flag' field to pages table, form

* Add 'exist?' to FeatureFlag

* Test for feature flag when loading custom pages

* Refactor FeatureFlag.enabled? to check both boolean and user gates

* Ugly test fixes

* PR feedback and refactoring

* PR refactor: don't require database table!
2020-06-01 09:23:19 -05:00
rhymes
3233558c5d
[deploy] Upgrade nvm to use node 12.17 (#8209) 2020-06-01 09:48:16 -04:00
Gagan Lokesh
3b188d349a
Fix database seeding issue (#8191) (#8192)
Error description: `NoMethodError: undefined method `limit' for nil:NilClass`
2020-05-31 13:30:33 -05:00
Molly Struve
8e0828d86b
[deploy] Optimization: Remove Unused Fields From Async user_data, optimize a couple other methods (#8173) 2020-05-31 13:21:32 -05:00
Molly Struve
e1b99b1b96
[deploy] Generate Random Health Check Tokens on App Setup (#8178)
Co-authored-by: rhymes <rhymesete@gmail.com>
2020-05-30 14:11:02 -05:00
Ridhwana
af6d2325e6
Site configuration improvements (#8157)
* feat: alphabetize the site config page

* chore: move twitter hashtag into social media and rename Mailchimp list ID's to Newsletter

* chore: reorder the site config

* fix: don't show a broken image when the value does not exist

* if there are 3 or more parameters lets move it to its own method

* chore: empty line

* fix: seems like we couldn't update the token

* chore: amend the test to mimic the order on the site config

* chore: oops - add back the welcome_notifications_live_at
2020-05-30 11:42:27 +02:00
Molly Struve
b6a88778ad
Optimization:Remove followed_organization_ids from Async user_data (#8176) 2020-05-30 11:40:21 +02:00
Ben Halpern
5ad7d6ee4e
Update copy on editor help (#8166) 2020-05-30 11:30:35 +02:00
Julianna Tetreault
fa3caaf513
Enqueue feed_customization_notification (#8160)
* Set notification_enqueued to true in #send_feed_customization_notification

* Fix typo in generator_spec.rb

* Add comment about enqueuing notification in generator.rb

* Update app/services/broadcasts/welcome_notification/generator.rb

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-05-29 13:08:46 -06:00
Vaidehi Joshi
a4be185720
Leverage announcement broadcasts (#8150) [deploy]
* Differentiate between welcome + announcement broadcasts

* Allow admins to filter between these two types in the `/internal/broadcasts` UI.
* Ensure that the index endpoint fetches the correct Broadcast models.

* Only allow one Announcement broadcast to be created at a time

* Also add some `announcement` and `welcome` scopes on the `Broadcast` class.
* Add flash[:success] messages in BroadcastsController.

* Add some tests for Announcement broadcast validations

* Remove unused active_announcement_params method

* Order Broadcasts by title, optimization improvements

* Fix missing closing tags in broadcast specs
2020-05-29 11:38:41 -07:00
Ben Halpern
064dd26df4
[deploy] Change text in failing PUBLISH test (#8162) 2020-05-29 13:48:30 -04:00
Ben Halpern
9de9c57c63
Remove unnecessary "action-space" for non-signed-in users (#8159)
* Remove published-at for narrow screens

* Action space

* revert published-at-thing
2020-05-29 13:48:14 -04:00
dependabot-preview[bot]
927c0429c0
[deploy] Bump @babel/plugin-transform-react-jsx from 7.9.4 to 7.10.1 (#8126)
Bumps [@babel/plugin-transform-react-jsx](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-transform-react-jsx) from 7.9.4 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-plugin-transform-react-jsx)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-29 11:56:32 -05:00
dependabot-preview[bot]
5f6b770395
Bump twilio-video from 2.4.0 to 2.5.0 (#8127)
Bumps [twilio-video](https://github.com/twilio/twilio-video.js) from 2.4.0 to 2.5.0.
- [Release notes](https://github.com/twilio/twilio-video.js/releases)
- [Changelog](https://github.com/twilio/twilio-video.js/blob/master/CHANGELOG.md)
- [Commits](https://github.com/twilio/twilio-video.js/compare/2.4.0...2.5.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-29 11:56:14 -05:00
Molly Struve
d93c987246
Dependabot/bundler/rspec rails 4.0.1 With Vendor Cache (#8144)
* Bump rspec-rails from 4.0.0 to 4.0.1

Bumps [rspec-rails](https://github.com/rspec/rspec-rails) from 4.0.0 to 4.0.1.
- [Release notes](https://github.com/rspec/rspec-rails/releases)
- [Changelog](https://github.com/rspec/rspec-rails/blob/master/Changelog.md)
- [Commits](https://github.com/rspec/rspec-rails/compare/v4.0.0...v4.0.1)

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

* Bump rspec-rails from 4.0.0 to 4.0.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-29 11:53:28 -05:00
ludwiczakpawel
a161d3ce31
[deploy] Redesign article editor (#7524) 2020-05-29 11:59:37 -04:00
Mac Siri
e812f995fe
[deploy] Remove redundant ActsAsTaggableOn::Taggable::Cache (#8102) 2020-05-29 10:27:13 -04:00
Mac Siri
25c1f9210f
Remove redundant include of CloudinaryHelper (#8136) 2020-05-29 10:26:46 -04:00
Molly Struve
15d2dd0b3a
Remove cached_followed_tag_names From Async User Data (#8148) 2020-05-29 10:24:26 -04:00
Michael Kohl
c3f3575dcf
Make DB seeding idempotent (#8153) 2020-05-29 10:21:00 -04:00
rhymes
689fb6efb6
Routine rubocop fixes (#8137)
* Update gems

* rubocop -a

* rubocop --auto-gen-config
2020-05-29 11:56:52 +02:00
rhymes
5e3f645d29
Fix WikipediaTag tag regexp (#8139) 2020-05-29 10:59:12 +02:00
dependabot-preview[bot]
6b2cfd53da
[deploy] Bump kaminari from 1.2.0 to 1.2.1 (#8120)
* Bump kaminari from 1.2.0 to 1.2.1

Bumps [kaminari](https://github.com/kaminari/kaminari) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/kaminari/kaminari/releases)
- [Changelog](https://github.com/kaminari/kaminari/blob/master/CHANGELOG.md)
- [Commits](https://github.com/kaminari/kaminari/compare/v1.2.0...v1.2.1)

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

* Bump kaminari from 1.2.0 to 1.2.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:48:48 -05:00
dependabot-preview[bot]
9d652b38cf
Bump @babel/plugin-proposal-class-properties from 7.8.3 to 7.10.1 (#8131)
Bumps [@babel/plugin-proposal-class-properties](https://github.com/babel/babel/tree/HEAD/packages/babel-plugin-proposal-class-properties) from 7.8.3 to 7.10.1.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/master/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.10.1/packages/babel-plugin-proposal-class-properties)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:47:42 -05:00
dependabot-preview[bot]
4f1f7ccb41
Bump lint-staged from 10.2.4 to 10.2.6 (#8124)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 10.2.4 to 10.2.6.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Commits](https://github.com/okonet/lint-staged/compare/v10.2.4...v10.2.6)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:45:32 -05:00
dependabot-preview[bot]
76c8c917e5
[deploy] Bump ddtrace from 0.35.2 to 0.36.0 (#8119)
* Bump ddtrace from 0.35.2 to 0.36.0

Bumps [ddtrace](https://github.com/DataDog/dd-trace-rb) from 0.35.2 to 0.36.0.
- [Release notes](https://github.com/DataDog/dd-trace-rb/releases)
- [Changelog](https://github.com/DataDog/dd-trace-rb/blob/master/CHANGELOG.md)
- [Commits](https://github.com/DataDog/dd-trace-rb/compare/v0.35.2...v0.36.0)

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

* Bump ddtrace from 0.35.2 to 0.36.0 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:13:55 -05:00
dependabot-preview[bot]
fcb71ab2cc
Bump vcr from 5.1.0 to 6.0.0 (#8121)
* Bump vcr from 5.1.0 to 6.0.0

Bumps [vcr](https://github.com/vcr/vcr) from 5.1.0 to 6.0.0.
- [Release notes](https://github.com/vcr/vcr/releases)
- [Changelog](https://github.com/vcr/vcr/blob/master/CHANGELOG.md)
- [Upgrade guide](https://github.com/vcr/vcr/blob/master/Upgrade.md)
- [Commits](https://github.com/vcr/vcr/compare/v5.1.0...v6.0.0)

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

* Bump vcr from 5.1.0 to 6.0.0 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:13:15 -05:00
dependabot-preview[bot]
1dd048cd30
Bump sitemap_generator from 6.1.0 to 6.1.1 (#8123)
* Bump sitemap_generator from 6.1.0 to 6.1.1

Bumps [sitemap_generator](https://github.com/kjvarga/sitemap_generator) from 6.1.0 to 6.1.1.
- [Release notes](https://github.com/kjvarga/sitemap_generator/releases)
- [Changelog](https://github.com/kjvarga/sitemap_generator/blob/master/CHANGES.md)
- [Commits](https://github.com/kjvarga/sitemap_generator/compare/v6.1.0...v6.1.1)

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

* Bump sitemap_generator from 6.1.0 to 6.1.1 (Update vendor/cache)

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:12:37 -05:00
Molly Struve
234ae0f308
Update vendor cache gems (#8146) 2020-05-28 14:37:36 -05:00
Molly Struve
773a2d322b
Add Missing Vendor Gems from Dependabot Merges (#8145) 2020-05-28 14:32:21 -05:00
dependabot-preview[bot]
abe36378f4
Bump activerecord-import from 1.0.4 to 1.0.5 (#8118)
Bumps [activerecord-import](https://github.com/zdennis/activerecord-import) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/zdennis/activerecord-import/releases)
- [Changelog](https://github.com/zdennis/activerecord-import/blob/master/CHANGELOG.md)
- [Commits](https://github.com/zdennis/activerecord-import/compare/v1.0.4...v1.0.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:18:29 -04:00
dependabot-preview[bot]
2c5fa60d39
Bump erb_lint from 0.0.32 to 0.0.33 (#8117)
Bumps [erb_lint](https://github.com/Shopify/erb-lint) from 0.0.32 to 0.0.33.
- [Release notes](https://github.com/Shopify/erb-lint/releases)
- [Commits](https://github.com/Shopify/erb-lint/compare/v0.0.32...v0.0.33)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:11:52 -04:00
dependabot-preview[bot]
077ce3fc2d
Bump fog-aws from 3.6.4 to 3.6.5 (#8115)
Bumps [fog-aws](https://github.com/fog/fog-aws) from 3.6.4 to 3.6.5.
- [Release notes](https://github.com/fog/fog-aws/releases)
- [Changelog](https://github.com/fog/fog-aws/blob/master/CHANGELOG.md)
- [Commits](https://github.com/fog/fog-aws/compare/v3.6.4...v3.6.5)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 15:11:42 -04:00
Nick Taylor
5c6e547187
Updated Storybook packages (#8141) 2020-05-28 14:56:26 -04:00
Joe Doss
284b6ee1e1
Update dependabot.yml (#8143) 2020-05-28 13:45:47 -05:00
Jacob Herrington
79bc4929e6
Remove unclear comment (#8138)
This is probably pedantic, but I believe this comment is unclear. There
is also a typo removed by this commit.
2020-05-28 12:53:04 -05:00
Joe Doss
a913103e7d
Update dependabot.yml (#8140) 2020-05-28 12:30:26 -05:00
Joe Doss
a607cbbf41
Update vendor/cache After Dependabot (#8135)
* Create dependabot.yml with 

bundle config cache_all_platforms true
bundle config set cache_all true

so we cache gems in the workflow.
2020-05-28 12:15:43 -05:00
Joe Doss
aa49cb1cfe
Bugfix for #7663 and refactor of container setup (#7747)
* Move from Alpine Linux to Fedora Linux.

This changes the base container image away from Alpine Linux to
Fedora Linux to address some musl libc issues with some of our gems.

It also moved the main file to a Containerfile and symlinks the Dockerfile
to it. This makes our container setup less Docker-centric as Linux users
most likely will be using Podman as their container runtime.

Lastly, it moves the WORKDIR from /usr/src/app to /opt/apps/devto.
The Linux FHS states that /opt is the spot for Optional application
software packages and /usr/src is for kernel source code.

https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard

/opt Optional application software packages
/usr/src Source code, e.g., the kernel source code with its header files.

Also, if SELinux becomes a thing in our future, moving this makes it
easier to manage contexts out of /opt rather than /usr/src.

* Adjust the Containerfile a bit to add some missing packages, make it
more generic and move env vars to the docker-compose.

* Move the Dockerfile to a symlink to the Containerfile.

We need to be able to support more than just Docker for a container
runtime. Moving everything to a Containerfile and symlinking the
Dockerfile helps users run runtimes such as Podman.

* Add in new entrypoint files and fix the app path in docker-entrypoint.sh

* Refactor the docker-compose.yml file so it doesn't build the main
application container three times in a row. We can use the same
container for web, webpacker, and sidekiq.

Also make the volume names very explicit on what their contents and add
in SELinux context support with :Z

* Fix ELASTICSEARCH_URL.

* Remove the absolute path on ip binary and add in iproute to Containerfile.

* Symlink the Dockerfile to Containerfile and add in a container-compose.yml file
for usage with podman-compose. We are waiting for this issue to get resolved

https://github.com/containers/libpod/issues/6153

and for podman-compose to mature a bit more. A user using podman-compose can use

podman-compose -f container-compose.yml

to launch the DEV container stack with Podman.

* Update the .gitignore file to reflect the new container volumes.

* Fix the entrypoint script on the Containerfile and clean up a bunch of things.

* Rework the Containerfile to prep it to run as a non-root user. We have to wait
for this issue to get fixed:

https://github.com/containers/libpod/issues/6153

for Linux users and then we can uncomment the USER line so we are running Rails
as a non-root user. :toot:

* This reworks the compose files so each task that is needed to start the app has
a correct wait command with dockerize. It also adds in containers for doing
yarn and bundle things for development. Since we mount the code directory inside
the container we lose our pre-containerized gems and node_modules.

This means users can run:

Linux
podman-compose -f container-compose.yml up

Mac
docker-compose up

and it should correctly build the app stack with containers!

* Clean up old container related things.

* Add in some container pre-reqs and my name to the "Core team" section! :toot:

* Adjust the seed and sidekiq compose entries so they do not use the web entrypoint
and set the REDIS_URL and REDIS_SESSIONS_URL env vars for seed.

Add in some echos to the entrypoint.sh.

Also set docker-compose to use :delegated on mount points to speed things up.

https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos

* Just call yarn install --dev on the yarn container.

* Update documentation to support Docker and Podman as Container Engines and
move the page from docker to containers to reflect the fact not all users run
their containers via Docker.

There are dozens of us... DOZENS!

* Set --local on bundle config so it just impacts this Ruby app.

* Renamed bin/docker-setup to bin/container-setup to reflect the fact that that
we can use Podman as a container engine. I also refactored it so it does some
basic pre-flight checks for docker and docker-compose or podman and
podman-compose to make sure users have a container engine installed.

* Set cache_all_platforms true for bundler.

* Bump docker-compose dockerize -timeout to 45min for slower macOS hardware.

* Move to the consolidated app_initializer:setup rake task for bootstrapping the
app.

* Update docs/installation/readme.md
2020-05-28 12:11:51 -05:00
Ridhwana
1a40e10df8
Update the tag moderation email (#8048)
* feat: update the tag mod text

* feat: channel slug

* feat: updates

* feat: update text

* chore: change
2020-05-28 17:46:41 +02:00
dependabot-preview[bot]
293a9d7c86
Bump rubocop-performance from 1.5.2 to 1.6.0 (#8116)
Bumps [rubocop-performance](https://github.com/rubocop-hq/rubocop-performance) from 1.5.2 to 1.6.0.
- [Release notes](https://github.com/rubocop-hq/rubocop-performance/releases)
- [Changelog](https://github.com/rubocop-hq/rubocop-performance/blob/master/CHANGELOG.md)
- [Commits](https://github.com/rubocop-hq/rubocop-performance/compare/v1.5.2...v1.6.0)

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

Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com>
2020-05-28 10:38:16 -05:00