Commit graph

63 commits

Author SHA1 Message Date
Nick Taylor
7c1343be9e
Revert "Revert "Removed service worker (#12974)" (#13014)" (#13015)
This reverts commit 2416387fb4.
2021-03-17 10:57:56 -04:00
Molly Struve
2416387fb4
Revert "Removed service worker (#12974)" (#13014)
This reverts commit 4fb6230606.
2021-03-16 18:10:01 -05:00
Nick Taylor
4fb6230606
Removed service worker (#12974) 2021-03-16 15:55:31 -04:00
Fernando Valverde
13e335e172
Adds more exceptions to SW paths (#12971) 2021-03-11 11:01:59 -06:00
Fernando Valverde
e6a2df73bf
Bypass event.respondWith for some paths (#12953) 2021-03-09 16:06:26 -06:00
Ben Halpern
73125c0795
Reduce service worker functionality to minimal offline page (#12834)
* Reduce service worker functionality to minimal offline page

* Update docs for service workers

* Add comment to fix test

* Include incrementable static cache

* Add TODO comments about removal

* Fix trailing whitespace
2021-03-01 19:29:26 -05:00
Molly Struve
37f609e5c5
Return Additional Data Needed for Autocomplete (#12823)
* Return Additional Data Needed for Autocomplete

* return name instead of username twice
2021-02-25 10:55:46 -06: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
rhymes
d8bc399a56
Restore static error pages (#11882)
* Revert "Use static error files in serviceworker (#11806)"

This reverts commit 2c96c14021.

* Revert "Use custom, dynamic, error pages (#11744)"

This reverts commit 2ab0719501.

* Remove GitHub report prompt for good, see #11718

* Bump service worker cache version
2020-12-14 12:06:41 -05:00
Fernando Valverde
0ac3e83b0c
Remove resource_admin dashboards (Administrate) (#11792)
* First cleanup commit

* Email messages preview

* Tweak tests

* spec typo fix

* Remove lingering Administrate Fields & Abuse report link fix

* Add missing gemfile lock update

* Extract email_messages into its own controller & add test
2020-12-08 12:38:13 -06:00
Ben Halpern
2c96c14021
Use static error files in serviceworker (#11806)
* Use static error files in serviceworker

* Bump static cache version
2020-12-08 11:20:23 -05:00
rhymes
2ab0719501
Use custom, dynamic, error pages (#11744)
* Use ErrorsController to render error pages

* Hide GitHub bug report prompt from anything other than dev.to and forem.dev

* Update service worker to use 404 and 500

* Other fixes
2020-12-07 18:55:41 +01:00
Ben Halpern
d5546d6d6b
Don't do serviceworker asset caching in development (#11605) 2020-11-24 19:48:48 -05:00
Ben Halpern
575449b890
Include core assets in serviceworker cache (#11559) 2020-11-24 08:58:06 -05:00
Ridhwana
669d411feb
chore: remove future route (#11117) 2020-11-02 13:34:15 -05:00
Ridhwana
de16fac96e
[deploy] chore: remove /forem redirect (#11083) 2020-10-26 10:12:38 -04:00
Mac Siri
dc06625502
Ignore /images in service_worker (#10852) 2020-10-15 11:49:32 -04:00
Ben Halpern
431a00366d
Ensure serviceworker bypass only checks path (#10820) 2020-10-12 17:52:48 -04:00
Ben Halpern
b800b81c45
Skip service workers in development by default (#10617) 2020-10-07 14:23:11 +07:00
Mac Siri
c2e61074e1
Refactor: Extract app-shell unsupported paths (#10504) 2020-10-01 13:41:59 -04:00
Ben Halpern
3a469a99e2
[deploy] Enable admin-configured app_domain (#10206)
* Move app_domain from env var to siteconfig *within app area*

* Fix SiteConfig

* Don't change URL.domain yet

* Not use in fastly cache purge yet

* Session store magoo

* Revert domain issue

* Add SetCookie middleware

* Temporarily remove cookie middleware and release tasks

* Re-enable SetCookieDomain

* Add some more comments, get it ready for testing

* Remove host from url options and temporarily show errors

* Allow forwarded host to be cookie

* Fix typo

* Change invalidAuthenticityToken

* Properly set app domain

* Proper Fastly cache

* Remove config.app_domain

* Remove config.app_domain

* Explicitely set remember_user_token

* More play with cookies

* Fiddle with remember_user_token

* Add remember_user_token changes

* Monkeypatch devise

* Sessions controller

* Include rememberable

* Include rememberable

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Proper cookie monkeypatch

* Remove extra cookie code

* User sign in tweak

* Close the loop

* Experiment with carrierwave public_url

* Finalize carrierwave monkeypatch

* Remove async controller specs

* Change some tests

* Update domain test

* Remove temporary production.rb change

* modify cookie logic

* Remove unneeded changes

* Remove unneeded changes

* Explicitely pass host

* Fix linting

* Fix social image test

* Add some cookie tests

* Modify article url

* Fix canonical urls

* Fix typo

* Remove sessions controller

* Remove devise monkeypatch

* Add monkeypatch

* Remove elsif

* Update spec/helpers/application_helper_spec.rb

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

* Adjust remember_cookie_sync

* Remember user token experimentation

* Fiddle with devise

* Properly configure devise

* Fix typo

* Fix formatting issue

* Add comment about middleware

* Fix typo

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

* Remove commented-out code

Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-09-11 09:38:34 -04:00
Ben Halpern
ee1af652c0
Don't include locale in service workers (#10198) 2020-09-03 17:54:01 -04:00
Anna Buianova
0e8f48b5e7
Fixed new redirects (#10184) 2020-09-03 09:44:10 -04:00
Mac Siri
76de9a0317
[deploy] Replace #cloudinary with #optimized_image_url (#9876) 2020-08-21 14:46:00 -04:00
Josh Puetz
1c566e0ec4
[deploy] Move /internal to `/admin (#9639)
* First draft - all the big changes

* Changing some more references to 'internal'

* Relocate internal request tests to admin

* Relocate internal system tests to admin

* Fix trailing space

* Test fix

* Move queries from internal to admin

* Docs updates

* Rename internal stimuls controllers to admin (plus docs)

* Rename admin layout

* Fix routing after rebase

* Fixes for latest added admin interfaces

* Serviceworker ignore paths
2020-08-07 10:36:26 -04:00
Josh Puetz
cda18d0aa4
[deploy] Move Admin interface paths (#9576)
* Move administrate to /resource_admin

* Test fixes

* Update docs
2020-08-03 08:49:23 -04:00
Fernando Valverde
0dc2a6860e
Adds a default value to the shell version cache response in case it returns undefined (#9250) 2020-07-14 12:09:19 +02:00
Ben Halpern
7bb194b305
[deploy] Remove /rly code (#9192) 2020-07-08 07:55:33 -04:00
rhymes
d3a7f64d2b
Tell the service worker to skip /rss (#8944) 2020-06-29 09:30:56 -04:00
Ben Halpern
32ad7aa6d4
[deploy] Avoid running service workers on ios (#8889) 2020-06-25 08:55:38 -04:00
Fernando Valverde
b722c428da
Adds explicit quality params to cloudinary helper calls when specifying format (#8253) 2020-06-03 17:13:37 -04:00
Michael Kohl
7f75f99560
[deploy] Rename classified listings (#7910)
* Change models and related files

* Update controllers and specs

* More renaming

* Seek and destroy, I mean search and replace

* Round up the stragglers

* Ground control to Major Travis...

* More fixes

* PR feedback

* Various fixes

* Rename view

* Fix list query builder

* Unify request specs

* Fix some API spec errors

* Fix remaining API specs

* Make spec conform to API

* Fix leftover problems

* Fix JS tests

* Fix column name in select

* Fix API specs

* Fix search specs

* Paging Mr. Travis
2020-05-27 13:35:09 +00:00
Ben Halpern
59765d339f
Remove /new from serviceworkers (#7967)
* Remove /new from serviceworkers

* Use pathname
2020-05-19 18:04:22 -04:00
Brett Beutell
9431ab64b5
[deploy] Fix short-circuiting condition for caching of the shell in service worker 🔧 🐢 (#6960) 2020-05-08 10:15:48 -04:00
rhymes
f8a81956e2
Disable service worker on remaining hardcoded redirects (#7360)
* Disable service worker on shop redirect

* Add missing redirects exceptions
2020-04-17 18:53:44 +02:00
Molly Struve
1024e47738
exempt new search endpoints from the service worker (#7334) 2020-04-16 09:35:45 -05:00
Ben Halpern
2c28bcb2b2
[deploy] Bypass serviceworkers for /checkin (#7299) 2020-04-15 12:44:36 -04:00
Anna Buianova
2f9d6eab48
Add exceptions to the serviceworker code to fix redirects (#7156)
* Add exceptions to the serviceworker code to fix redirects
2020-04-08 18:54:10 +03:00
Ridhwana
e74890680a
Generalize meta content and copyright year (#6887)
* chore: remove the description

* feat: change the meta og:site_name property from The Practical DEV to The <COMMUNITY_NAME> Community consistently

* refactor: change the canonical link to be more dynamic using the <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %>

* refactor: update the path to be dynamic

* refactor: change some other meta properties to be dynamic

* refactor: update the index

* refactor: update the sitename to just read <%= ApplicationConfig["COMMUNITY_NAME"] %> Community

* feat: copyright year should be dynamic

* feat: change the meta og:url content to be dynamic by using <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> for the former part of the url

* feat: space

* refactor: move the copyright notice to a helper

* refactor: use the community_qualified_name helper!

* refactor: start year is already a string

* refactor: use app url helper instead of <%= ApplicationConfig["APP_PROTOCOL"] %><%= ApplicationConfig["APP_DOMAIN"] %> everywhere

* chore:oops

* refactor: Change  <meta name="twitter:image:src" content="http://i.imgur.com/B4JNl1w.png"> to `<meta name="twitter:image:src" content="<%= SiteConfig.main_social_image %>">` consistently.

* refactor: Replace  `<meta property="og:image" content="http://i.imgur.com/B4JNl1w.png" />` with `  <meta property="og:image" content="<%= SiteConfig.main_social_image %>" />`

* chore: update some other meta's

* feat: replace 'The Practical DEV' with 'DEV Community' and

* test: remove The :)

* test: copyright_notice

* fix: syntax error

* feat: name of community

* refactor: use app url

* fix: template strings

* fix: tag

* feat: update the app url parameters

* feat: add a community_name helper so we don't have to refer to an environment variable in the templates

* feat: take into account the case when the start year is a blank string

* feat: single quotes to double quotes

* test: add a test for the #community_name

* chore: update or codeclimate

* chore: amend the community helper

* refactor: use the community_name helper in here

* feat: update ApplicationConfig["COMMUNITY_NAME"]  with community_name

* fix: Time.current.year needs to be a string :(

* chore: extra space

* chore: change to use community_qualified_name
2020-03-31 16:15:57 +02:00
Ben Halpern
030e491cf4
Add logo_png SiteConfig for manifest etc. use (#6760) [deploy]
* Add logo_png SiteConfig for manifest etc. use

* Touch ups
2020-03-23 14:31:41 +01:00
Ben Halpern
bff4050c35
Add dynamic monthly sitemaps (#6704) [deploy]
* Initial sitemap work

* More sitemap progress

* Remove files

* Finalize monthly sitemap

* Update spec/models/organization_spec.rb

Co-Authored-By: Vaidehi Joshi <vaidehi.sj@gmail.com>

* Clean up approach

* Change tests

* Fix test not sure what problem was

Co-authored-by: Vaidehi Joshi <vaidehi.sj@gmail.com>
2020-03-19 17:20:23 -04:00
Ben Halpern
de27e7ed34
Allow community admins to alter site description (#6662) [deploy]
* Allow community admins to alter site description

* Fix typo
2020-03-16 15:34:49 -04:00
Molly Struve
1997e66741
Implement User Search backend (#6606) [deploy] 2020-03-12 14:57:10 -04:00
Mac Siri
80088c51ab
Skip /welcome in serviceworkers (#6561) [deploy] 2020-03-10 09:27:04 +01:00
Ben Halpern
1cd38b55fd
Skip /ahoy/ in serviceworkers (#6547) 2020-03-09 12:32:00 -04:00
rhymes
7e39262738
Disable service worker on /search endpoints (#6375) [deploy] 2020-03-04 10:45:03 -05:00
Ben Halpern
1dc1723709
Add field test gem to establish a/b testing (#6283) [deploy]
* Initial field test spec work

* Clean up specs

* Fix codeclimage

* Cleanups

* Update names

* Rename and remove need to pass logged in status

* Leadup to prod: two experiments

* Move test logic to controller and add tests

Co-authored-by: Josh Puetz <josh@grorichpuetz.com>
2020-03-03 10:21:29 -05:00
rhymes
6795be006d
Don't run the service worker on /enter (#6353) 2020-02-28 12:35:15 -05:00
rhymes
dfbc1b3791
Disable service worker on social previews (#6209) [deploy] 2020-02-20 17:39:17 -05:00
Alex
b81c2e8df3
Remove delayed_job (#6071) [deploy]
* Update adapter to sidekiq

* Remove delayed_jobs routes

* Remove delayd_jobs initializer and references

* Remove delayed_job_spec

* Remove bin/delayed_job

* Remove app/jobs/

* Migration to drop delayed_jobs table

* Remove delayed_job_web & delayed_job_active_record

* Update docs

* Remove reference to delayed_job dashboard

* Remove delayed_job settings from initializers

* Add delayed_job_admin back to reserved words list
2020-02-14 10:00:26 -08:00