Commit graph

89 commits

Author SHA1 Message Date
Anna Buianova
4d413af4cc
Keep published_at when updating author of a scheduled article from the dashboard (#18653) 2022-11-01 16:49:59 +03:00
Anna Buianova
f3d2d1b156
Fix a spec failing because of the daylight savings (#18661) 2022-10-31 17:23:09 +03:00
Anna Buianova
9d755a9d2f
Save list of previously-published articles when user is subject to an "un-publish all" action (#18535)
* Moved logging and deleting comments to Moderator::UnpublishAllArticlesWorker

* Added logging for admin action (unpublish_all_articles)

* Extracted code from UnpublishAllArticlesWorker to the service

* Make it possible to add a note while unpublishing all via admin action

* Added ability to add notes for unpublishing all from moderator action panel

* Fixed setting slug for the AuditLog on unpublishing + spec
2022-10-06 14:17:20 +03:00
Anna Buianova
6ef1968377
Made published_at immutable after an article has been published once (#18384)
* Don't change published_at for articles that have already been published (even if unpublished later)

* Removed unused code related to changing published_at

* Added specs for updating published_from_feed articles, fixed specs

* Removed old validation

* Added specs for article validation published_from_feed

* Added and reorganized specs for the Article model (setting published_at)

* Remove the commented code, added a spec

* Added specs for unpublishing

* Removed unused update_published_at from article attributes spec

* Fixed nullifying published_at seconds when republishing from rich editor
2022-08-30 11:32:06 +03:00
Anna Buianova
ad270fc842
Fix updating articles from scheduled to published (immediately) (#18331)
* Fixed publishing scheduled articles when removing published at date

* Fixed specs for editor v1
2022-08-15 08:53:31 -04:00
Anna Buianova
656d698da1
Modify datetime picker for scheduling articles (#18153)
* Accept separate date and time for published_at

* Separate date and time inputs for published_at in post options (scheduling)

* Removed the commented line

* Removed unused htmlFor publishedAt

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Added aria-label for published at date

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Added aria-label for published at time

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Added htmlFor for schedule label

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
2022-07-21 13:53:54 +03:00
Anna Buianova
2c166b65df
Change "posted on" to "scheduled for" on the scheduled articles preview page (#18177)
* Improved information about article posted/scheduled

* Added specs for sheduled/posted label

* Scheduled to => scheduled for
2022-07-20 16:09:34 +03:00
Anna Buianova
ff76cdd3c5
Scheduling articles (#17939)
* Article query spec for scheduled articles

* Added scheduled article badge on the user dashboard

* Added published_at field to editor options

* Accept and validate published_at from editor

* Refactor published_at validation

* Allow 1-minute difference in published_at

* Notice on an unpublished article page

* Added specs for 'Click to edit' link on scheduled article preview page

* ContextNotification model

* Articles::Publish worker

* Added specs for articles publish worker

* Schedule publish articles worker

* Added tests to check for scheduled posts in feeds

* Don't allow managing scheduled articles

* Don't send notifications for scheduled articles

* Set published_at in Articles::Updater when publishing

* Published_at value in post options

* Pass timezone and set published_at accordingly

* Limit setting published_at to the future

* Readonly published_at for articles that were already published

* Chagning published_at format in editor v1 (start)

* Changed published_at format in frontmatter, specs

* Added specs for updating published_at from frontmatter

* Fixed accepting past published_at for articles published_from_feed

* Enabled published_at validation: don't allow updating published_at for already published articles

* Validate published_at on create

* Added a spec for updating published_at for exported articles

* Fixed specs related to creating articles with past published_at

* Fixed specs related to past published_at for articles

* Added a hack so that admins would be able to update published_at

* Switch button text schedule/publish when changin publishedAt

* Fixed saving published_at with timezone

* Added a feature flag for scheduling articles

* Default text in markdown editor depends on feature flag

* Enable article editor cache again

* Fixed the default value in the markdown editor

* Fix sitemaps spec

* Removed tooltip

* Fixed articles update specs

* Added missing locales

* Fixed article create specs

* Fixed spec

* Removed commented code

* Returned enabling extensions in the schema

* Returned accidentally deleted constraint

* Make articles query spec more stable

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>

* Removed commented code

* Removed unused code

* A clearer policy

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>

* Use StringInquirer for article current state

* Added a note and todo to articles factory past trait

* Remove duplicated PropType

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Refactor query in the Articles::PublishWorker

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Refactor articleForm.jsx

Co-authored-by: Mac Siri <krairit.siri@gmail.com>

* Removed specs that are no longer relevant

* Removed useless onKeyUp on a hidden input

* Refactored articleForm

* Hide scheduling from post options when published_at is readonly

* Run sends notifications worker every 5 minutes instead of every minute

Co-authored-by: Jeremy Friesen <jeremy.n.friesen@gmail.com>
Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
2022-07-07 17:32:49 +03:00
Anna Buianova
6a229f00b7
Fixed removing notifications on admin unpublishing (#18047) 2022-07-06 18:35:20 +03:00
Daniel Uber
e992d7db83
Add minimal test on rss feed response (#17221)
* Add minimal test on rss feed response

* Update date to string conversion to avoid deprecation

It wouldn't make sense to use a deprecated method here.
2022-04-12 16:59:40 -05:00
Mac Siri
8379232bb3
Fix missing dc:creator on RSS feed (#16898)
* Fix missing dc:creator on RSS feed

* Update spec

* Remove aggregate_failures
2022-03-16 17:15:15 -04:00
Mac Siri
9be5c8c6b0
Routine Rubocop fixes (#16838) 2022-03-09 09:32:50 -05:00
Ryan Palo
40639ea602
Fix RSS feed validity issue (#16418) (#16517) 2022-02-22 09:22:05 -06:00
Ben Halpern
66b32215f3
Small win: Add "Feature post" button alongside new "admin actions" drawer in mod panel. (#16544)
* Initial hack

* Begin functionality implementation

* Add proper route

* Finish up

* Fix test and formatting

* Fix test vars

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/views/moderations/actions_panel.html.erb

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>

* Update app/controllers/articles_controller.rb

Co-authored-by: Michael Kohl <me@citizen428.net>

* Update file to not use keys that are not needed

* Finalize featured logic

Co-authored-by: Suzanne Aitchison <suzanne@forem.com>
Co-authored-by: Michael Kohl <me@citizen428.net>
2022-02-17 12:43:27 -05:00
Jeremy Friesen
42b39da1a8
Ensuring an admin can confirm delete a user's post (#16485)
Prior to this commit, the admin could delete the post but were blocked
by the "delete confirm".  The blocker was because we scoped the finding
of an article to the current user.

With this commit, the admin should be able to confirm the deletion of an
article.

Closes #16461
2022-02-09 11:28:58 -05:00
Jeremy Friesen
a65954107f
Refactoring to add helper method (#16064)
* Refactoring to add helper method

Prior to this commit, we made view level calls to service modules.  This
refactor provides convenience methods on the model.

Furthermore, it addresses a few Rubocop violations that "come along for
the ride."

* Ensuring cached entity squaks like User

* Fixing broken spec

* Fixing typo
2022-01-12 11:21:44 -05:00
Michael Kohl
06d6b68d9d
Remove webhooks and related code (#15827) 2021-12-28 10:56:37 +07:00
Josh Soref
0403e78f08
Spelling (#15702)
* spelling: access

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: additional

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: administrative

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: aggregate

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: assigns

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: attributes

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: autocomplete

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: because

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: between

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: bootstrap

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: calculating

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: captcha

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: character

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: chosen

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: commenter

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: competitor

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: componentize

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: contrast

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: corresponding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: description

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: destroyed

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: destroys

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: discussion

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: episode

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: escaped

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: evaluates

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: expired

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: explicitly

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: facebook

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: fragment

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: functionality

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: improper

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: incentive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: interfere

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: latest

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: message

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: minimum

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: moderator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mouseover

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: mutual

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: nonexistent

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: notification

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occasionally

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occurrence

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: occurs

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: octokit

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: offset

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: omitted

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: opacity

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organization

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: organizations

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overridden

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: override

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: overriding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: prefill

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: previous

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: profile

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: recycling

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: registered

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: repositories

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: rescuing

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: response

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: returns

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: second

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: separator

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: services

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subscriber

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: subscription

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: success

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: successful

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: successfully

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: suppress

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: test

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: thought

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: uniqueness

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unknown

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unproductive

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unreachable

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: unsuccessful

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utilities

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: utility

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: valid

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: voluntarily

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: vomited

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: website

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

* spelling: withholding

Signed-off-by: Josh Soref <jsoref@users.noreply.github.com>

Co-authored-by: Josh Soref <jsoref@users.noreply.github.com>
2021-12-07 06:59:10 -07:00
Michael Kohl
c7ba9d81db
Clean up feed-related code (#14707)
* Start cleaning up feed code

* Move published_articles_by_tag to service

* Add timeframe and latest feed services

* fixup! Move published_articles_by_tag to service

* Move constant to correct location

* Fix spec
2021-09-17 09:23:32 +07:00
Michael Kohl
6dfabd578f
Rename SiteConfig to Settings::General (#13573)
* Rename SiteConfig

* More renaming

* Update spec

* Update mandatory settings mapping

* More renaming

* e2e test fixes

* You have a rename, and you have a rename

* Spec fix

* More changes

* Temporarily disable specs

* After-merge update

* Undo rename for migration

* undo rename of DUS

* Fix DUS

* Fix merge problem

* Remove redundant DUS

* Fix specs

* Remove unused code

* Change wrong class name

* More cleanup

* Re-add missing values to constant

* Fix constant

* Fix spec

* Remove obsolete fields

* Add accidentally removed field

* Update spec

* Move methods from Settings::General to ForemInstance

* Remove unneeded model

* Change mentions of 'site config'
2021-05-21 14:45:37 +02:00
Michael Kohl
b7ff9aadd1
Clean up SiteConfig (#13738)
* Remove obsolete SiteConfig values

* Remove DUS

* fixup! Remove obsolete SiteConfig values

* fixup! Remove obsolete SiteConfig values

* Add DUS for removing SiteConfig values

* Fix specs

* Fix specs

* Clean up more DUS

* Update DUS

* Fix remaining spec

* Remove leftover spec

* Fix more specs

* Fix spec

* Remove deprecated spec

* Rearrange specs

* Temporarily disable specs
2021-05-18 09:38:31 +07:00
Michael Kohl
1c7de11bef
Split Settings::UserExperience (#13495)
* Add Settings::UserExperience

* Add DUS

* Update usage

* Add controller

* Add e2e test

* Fix specs
2021-04-28 13:29:25 +07:00
Vaidehi Joshi
4e14350438
Remove SheCoded Specific Code (#13363)
Closes https://github.com/forem/forem/issues/13212.
2021-04-12 11:04:58 -07:00
rhymes
fa20539238
Adjust default Forem's RSS feed algorithm to allow non featured articles (#13247)
Since we've removed Buffer related algorithm, posts aren't automatically featured
anymore, leaving the RSS feed pretty empty. The default view should also include
those posts, above a minimum score, that are not featured.
2021-04-06 17:05:35 +02:00
Vaidehi Joshi
95055b2a89
Remove pro role + expose analytics to all users via dashboard (#13156)
* Remove pro role on user, expose pro dashboard to all users as analytics

* Remove pro from Elasticsearch mappings

* Update user role docs to use :trusted over :pro

* Remove pro from Role model spec

* Remove more references to pro, as noted by @rhymes
2021-03-30 15:02:18 -07:00
Jamie Gaskins
68025ae472
Optimize Article.published scope to use an index (#13071)
* Optimize Article.published scope

The index on `articles.published` is not being invoked due to lack of
diversity in the values in that column (it only has 2 possible values
because it's a boolean).

The index on `articles.published_at` is extremely diverse and will be
invoked any time it can reduce the scope of a query by an order of
magnitude or more.

On DEV, this does not change the row count for the scope:

    irb(main):001:0> Article.where(published: true).count == Article.where(published: true).where(Arel.sql("published_at < now()")).count
    => true

The query plan for the `Articles::Feeds::LargeForemExperimental` service
invoked in the `Stories::FeedController#show` endpoint goes from this:

    Planning Time: 0.271 ms
    Execution Time: 329.258 ms

to this:

    Planning Time: 0.330 ms
    Execution Time: 0.468 ms

This is a reduction in query time of 99.7%

* Set published_at in articles factory

An article that is published should always have a `published_at`
timestamp

* Use Time.current for Zonebie

* Add clarifying comment to Article.published scope

* Generate timestamp in Ruby instead of SQL

I think using transactions for specs was interfering with comparing
timestamps generated in SQL, so this commit generates the timestamp in
Ruby.

* Move published_at outside of the transient block

This was causing articles to be marked as `published_at` right now even
if `published_at` was specified in the `FactoryBot.create` call.

* published_at: nil is no longer the factory default

* published_at is no longer nil by default

* published_at is no longer nil by default

* We didn't actually want to clear this published_at

This was intentionally left out to show that published_at does not get
cleared when we flip published true->false.
2021-03-23 13:07:27 -04:00
Anna Buianova
10a02f46d4
Articles update refactoring (#12913)
* Start refactoring articles update

* Articles update refactoring

* Added a couple of tests for Articles::Updater

* Reorganized code in Articles::Updater and ::Attributes a bit

* A couple of more tests for Articles::Attributes

* Reverted changed in the articles_controller

* Edited_at in Articles::Attributes

* Use Articles::Updater in ArticlesController

* Tests for notifications when published/unpublished an article

* Removed old code

* Return result object from Articles::Updater

* Don't reset articles collection when no series was passed

* Fixed sending notifications when published an article the first time

* Fix articles collection when updating

* Fix setting attributes for articles update

* Spec for articles update via api failure

* More tests for Articles::Updater

* More specs for articles updating

* Pass article instead of article_id to articles updater to avoid loading an article twice

* Remove the redundant check in the articles_controller

* Articles::Attributes refactoring
2021-03-10 13:08:36 +03:00
Anna Buianova
1fb86379f0
Specs for article collection update (#12766) 2021-02-22 10:14:52 +00:00
Michael Kohl
bdd4bd34aa
Fix infinite redirect loop for articles (#12652)
* Update logic in handle_possible_redirect

* Rearrange code

* Add spec
2021-02-17 08:54:54 +07:00
C Çağrı Özkan
2b3b31a88e
Add ability to get latest articles on RSS feed (#11956)
* Add query string option for filtering latest articles

* Show last featured articles on /feed/latest

* Add handle_latest_feed method

* Add support for page query

* Use better naming

* Use functionailty of LargeForemExperimental#latest_feed instead of calling the service

* Include 'not featured articles' on feed

* Cleanup
2021-01-06 18:53:06 +01:00
Julianna Tetreault
ca6ba1af7d
Replace collective_noun with community_name (#11846) [deploy]
* Removes collective_noun and collective_noun_disabled from app

* Config Generalization: replaces community_qualified_name with community_name
  - Generalizes SiteConfig after the removal of collective_noun field
  - Updates copy where necessary to be readable with community_name
  - Makes the community_name SiteConfig description more explicit
  - Adds flexibility for Admins by removing appended "community"

* Adds a data_update script to remove collective_noun and collective_noun_disabled

* Removes appended community from stories_controller.rb

* Removes unnecessary quotation marks around SiteConfig.community_name.to_s

* Makes SiteConfig community_name description more explicit

* Removes topic from #email_from and replaces arg with _

* Removes argument from #email_from (facepalm)

* Reverts changes to application_mailer and notify_mailer_spec

* Removes default "Community" topic from application_mailer and makes topic optional

* Refactors #prepopulate_new_form to resolve Code Climate failures

* Refactors #email_from even further by use of a ternary operator per review suggestion

* Simplifies the data_update script used to remove collective_noun per review request

* Adds a data_update script to append community to community_name

* Updates data_update script to correctly append Community to community_name

* Removes RemoveCollectiveNounFromConfig and updates other script

* Removes superfluous false from data_update script

* Updates data_update script to be more idiomatic
2020-12-28 09:34:17 -07:00
Jonathan Yeong
977f4d8840
Add image composite element to feed if user exists (#10739) [deploy]
* Add image composite element to feed if user exists

If the feed is a tag or the latest feed, user won't exist and we don't want to
render an <image> tag in the feed.

* Use profile_image_90 to limit the width and height

* Add tests for feed; address cr comments

* Fix typo

* Address rubocop issues

* Fix another typo

* Fix tests

Co-authored-by: rhymes <rhymes@hey.com>
2020-12-17 10:27:45 -07:00
Jacob Herrington
d479834344
Do not set SiteConfig values in specs (#11125) 2020-10-27 15:56:31 -04:00
Jacob Herrington
c91c07920f
Add config option for Forem collective noun (#11107)
Not everyone will want to use "Community" to describe their Forem, so
now they have some flexibility there.
2020-10-27 12:45:52 -04:00
Vaidehi Joshi
c4efee10bf
Do not require meta_keywords to be set (#10721)
* Remove extra character from meta_keywords in /listings/index.html.erb

* Remove meta_keywords from MANDATORY_CONFIGS

* Add and use meta_keywords_tag helper

* Use modern tag syntax instead of deprecated syntax

* Add and use meta_keywords_default helper

* Add and use meta_keywords_article helper

* Remove * from meta_keywords_field.label

* Update meta_keyword specs to account for no keywords being set
2020-10-08 10:51:25 -04:00
Vaidehi Joshi
52fd043c33
[deploy] Limit articles created by newer users (#10686)
* Limit articles created by newer users

* Fix typo in test
2020-10-06 21:02:05 -04:00
Mac Siri
9ebd742712
[deploy] Reintroduce sticky_nav changes (ab81f36 & 7f92855) (#10263)
* Revert "[deploy] Revert removal of unneeded eager load (if needed) (#10179)"

This reverts commit 11c7b148da.

* Revert "[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)"

This reverts commit 5657067e55.
2020-09-09 15:33:13 -04:00
Arit Amana
b79766f697
[deploy] [Admin Tooling] Allow admins unpublish articles from the Mod Actions Panel (#10038) 2020-09-02 16:08:08 -05:00
Molly Struve
5657067e55
[deploy] Revert "Migrate ProfileImage to Images::Profile (#10055)" (#10149)
This reverts commit ab81f36a38.
2020-09-01 18:28:58 -05:00
Mac Siri
ab81f36a38
[deploy] Migrate ProfileImage to Images::Profile (#10055) 2020-09-01 17:16:03 -04:00
rhymes
36358293ce
[deploy] Add foreign keys to models related to Organization (#9933)
* Add foreign keys to models related to Organization

* Fix specs

* Use on_delete: :cascade for listings -> organizations FK
2020-08-25 20:20:47 +02:00
Mac Siri
76de9a0317
[deploy] Replace #cloudinary with #optimized_image_url (#9876) 2020-08-21 14:46:00 -04:00
Ben Halpern
6c71369df5
[deploy] Add community_name to site config (#9864)
* Add community_name to site config

* Fix a spec

* Remove SiteConfig from constants

* Change subjects to method

* Fix subjects method

* Fix linting
2020-08-19 14:54:40 -04:00
rhymes
f5d35c6506
Rubocop: Enable and fix Style/StringConcatenation (#9844) 2020-08-18 14:50:15 +02:00
Vaidehi Joshi
63816035bb
Add X-Accel-Expires header to support Nginx caching (#9655) [deploy]
* Replace  in Cache-Control header to support Nginx caching

* Add 'X-Accel-Expires' header for Nginx caching

* Remove max-age directive from remaining specs

* Update caching header specs to test against x-accel-expires header
2020-08-13 14:24:50 -07:00
Molly Struve
b40af82b66
Flaky Spec Fix:Remove let_it_be Test Prof Helper (#9556)
* Flaky Spec Fix:Remove let_it_be Test Prof Helper

* Spec cleanup and fixes
2020-07-29 11:31:01 +02:00
Molly Struve
bc5e114ce9
Flaky Spec Fix:Remove let_it_be To Prevent Bad Database State Failing Specs (#9512) 2020-07-26 12:32:32 -05:00
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Michael Kohl
fb27f52ed0
[deploy] Display banner if site hasn't been configured (PRE DEPLOYMENT TASKS) (#8435) 2020-07-07 07:37:04 -05:00
rhymes
a3bfb375ef
Routine rubocop fixes (#9155)
* Refactoring and rubocop -a

* rubocop --auto-gen-config
2020-07-06 15:15:34 +02:00