Commit graph

53 commits

Author SHA1 Message Date
Ben Halpern
1ae10d7e6f
Remove hardcoded /badge page that is DEV-only ✂️✂️✂️ (#16303)
* Remove hardcoded /badge page that is DEV-only

* Remove /badge test

* Remove scheduled job
2022-01-27 13:29:05 -05:00
Jeremy Friesen
f3bc5e5db2
Fixing Rubocop's auto-correct recommendations (#16098)
```shell
$ bundle exec rubocop --auto-correct
```
2022-01-13 21:40:19 -05:00
Lewis Sparlin
30b36ab014
I18n copy on Tags index page (#14891)
* Move hard-coded Tags index copy to [en,fr] locale files

* Use tags.pluralize for a better page title implementation

* Add better french translations

* Once more fr translation fix

* Remove .pluralize from title i18n
2021-10-08 10:21:06 +07:00
Ben Halpern
d85f07c00d
Fix legacy sitemap logic (#14926)
* Fix legacy sitemap logic

* Add aggregate failures

* Fix formatting

* Adjust robots.txt spec

* Fix index minimum to >=
2021-10-07 08:59:16 -04:00
rhymes
8b4a909aac
Rubocop fixes (#14868) 2021-09-30 13:22:09 -04:00
Andy Zhao
3b81172c56
Remove docs from repo ✂✂✂ (#14579)
* Remove docs ✂✂✂✂

* Remove all references to docs and gitdocs

* Update docs.forem.com to developers.forem.com

* Remove .gitdocs_build/

* Update yarn.lock
2021-08-23 17:23:42 -04: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
5e05f0fd92
✂✂✂ Remove shop_url from SiteConfig ✂✂✂ (#13773)
* Remove shop_url from SiteConfig

* Add data update script
2021-05-18 09:03:05 +07:00
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
Vaidehi Joshi
5907ff6b2d
Update /contact page with links to filing bug reports + forem.dev (#12475) 2021-01-29 06:40:24 -05:00
Ridhwana
f87ff8e2ae
feat: allow the contact page to be overridden by pages (#10924) 2020-10-19 16:16:56 -04:00
rhymes
2d881ef571
Routine rubocop fixes (#10237) 2020-09-08 12:06:47 -04:00
Diogo Osório
4b8a725681
Fixes brakeman open redirect warnings at pages_controller (#10095)
When redirecting to the welcome, challenge and checkin articles,
breakman was complaining about a potential open redirect vulnerability
due to the fact that the redirect URL comes from a string stored in the
database.

This commit silences breakman by explicitly parsing the database article
path (via `URI.parse`) and explicitly stating that only the `path`
portion of the URI is to be used (== in an unlikely event of an absolute
URI pops up from the db record, the user-agent will still be instructed
to be redirected to a page under the app's domain).
2020-08-31 13:39:04 -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
Ridhwana
a1cd1c1e34
dev.docs spec fix (#9668)
* chore; update spec

* oops
2020-08-07 17:46:58 +02: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
rhymes
5b62811c98
[deploy] Rubocop: fix violations of Layout/LineLength (#9197) 2020-07-08 08:36:36 -05:00
Ben Halpern
7bb194b305
[deploy] Remove /rly code (#9192) 2020-07-08 07:55:33 -04: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
d25a506b6d
Replace deprecated content_type with media_type (#8846) 2020-06-23 10:09:18 -05:00
Josh Puetz
71fba61ae2
Properly return json (#8395) [deploy] 2020-06-10 17:38:50 -05:00
Josh Puetz
d33322f8e4
Add json template to Pages (#8357)
* Add json template to pages

* Add jsonb field, tweak form
2020-06-10 09:42:15 -05:00
Ridhwana
8140e46ceb
Add some placeholder pages (#7441)
* feat: add placeholders for some routes

* about_listings_url

* feat: tag-moderation

* chore: about_listings_url test

* chore: use post a job url

* chore: add pages methods

* chore: just reordered stuff

* oops forgot to save - oh man

* chore: change to single quotes

* chore: hopefully retrigger cc

* chore: update tests

* feat: PR suggestions:)

* chore: spec
2020-04-28 15:55:59 +02:00
Jitendra Rajpurohit
7656d10e2b
Generalized shop url by creating SiteConfig field for it (#7262)
* added shop_url to SiteConfig

* fixed issue in show config erb file

* add spec for shop_url SideConfig

* added spec

* handles blank shop_url case

* code review changes
2020-04-15 16:28:34 -04:00
Michael Kohl
0d59f92670
Add CodeNewbie staff redirect (#7272) 2020-04-14 20:54:42 -04:00
Anna Buianova
c975838013
[deploy] Replaced overriden pages with placeholders (#7210)
* Remove dev-specific info from a couple of pages

* Replace hardcoded pages that are already overriden on prod with placeholders

* Fix pages' specs
2020-04-10 12:48:21 -04:00
Anna Buianova
406cc95fcd
Remove /sponsorship-info (#7213) 2020-04-10 17:29:09 +03:00
Anna Buianova
b2a2f4bee5
Remove dynamic /live page (#7130)
* Removed dynamic /live page
2020-04-07 17:36:21 +03:00
Mac Siri
6d4925a17d
Ignore referer on /report-abuse if it's SW.js (#6295) [deploy] 2020-02-26 10:18:22 -05:00
Ben Halpern
82f2281b1c
Create dynamic robots.txt page (#5794) [deploy]
* Create dynamic robots.txt page

* Add tests and remove cachebust
2020-01-28 16:49:34 -05:00
rhymes
35526bef9b API: OpenAPI 3 spec and auto generated docs (#3650) 2019-08-12 11:36:04 -04:00
Andy Zhao
b4e493ec30 Redirect to actual latest published thread for /welcome (#3488) 2019-07-15 17:03:47 -04:00
Andy Zhao
04ce7738ab Add /challenge redirect (#3368) 2019-07-02 16:27:39 -04:00
Ben Halpern
456931f208
Further generalize pages and site Twitter handle (#3177)
* Further generalize pages and site Twitter handle

* Add footer mod change

* Remove giveaways dead code
2019-06-16 00:59:11 -04:00
rhymes
a8b7f6eea4 Analytics: refactoring for speed improvements (#3072)
* Use proper auth chain before checking parameters

* Refactor AnalyticsController

* Add a bunch of test and rewrite reactions counts with a single query

* Add tests for follows totals

* Use round and add more refactoring

* Add tests to group by day to fallback during refactoring

* Use group by to calculate comments count by day

* Use group by to calculate follows count by day

* Use group by to calculate reactions stats by day

* Use group by to calculate page_views stats by day

* Move calculations per day back in the cached block

* Add a few comments and a little bit of refactoring

* Add indexes (concurrently) for analytics

* Make tests more time robust

* Use a date range cache related to the requesting user or org

* Freezing time in UTC should help when tests are ran on time zones over the day line

* Remove explicit returns

* Page title is escaped, guard against that

* Move Analytics service spec in the proper place
2019-06-10 09:27:39 -04:00
Ben Halpern
ae47e8db2c
Add API portal (#2915)
* Add API portal

* Change title tag
2019-05-21 12:46:52 -04:00
Andy Zhao
97040ab603 Remove membership and stripe subscription routes (#2741) 2019-05-07 11:37:21 -04:00
Ben Halpern
5891b2ea58
Add application "page" model (#2657)
* Generate page model

* Add page model

* Conditionally modify html rendering
2019-05-02 18:24:06 -04:00
Ben Halpern
4b91dd5912
Make a couple changes to Twitch MVP before push (#2622) 2019-04-29 18:53:09 -04:00
rhymes
04d2bb4190 Remove last remnants of Flipflop (#2585) 2019-04-26 19:26:45 -04:00
Ben Halpern
92b24a9978
Add html_variant split testing to /badge (#1763)
* Add /badge html_variant

* Fix some of the linting
2019-02-08 12:45:14 -04:00
Andy Zhao
88cd4c13f3 Remove all flipflop related code (#1358)
* Remove all flipflop related code

* Undo an amend

* Comment out one last test

* Remove last test
2018-12-18 16:01:18 -05:00
Mac Siri
06e0cbabbb Revert "Replace Flipflop with Sail (#841)"
This reverts commit 21870e805a.
2018-12-18 13:44:40 -05:00
Vinicius Stock
21870e805a Replace Flipflop with Sail (#841)
* Replace Flipflop with Sail

* Address PR comments

* Bump sail version to latest

* Bump Sail to latest version

* Move setting creation to config/sail.yml

* Bump Sail to latest version

* Use correct limit for cast_type in schema

* Update Sail's route
2018-12-18 12:42:30 -05:00
Ben Halpern
14bba5e4d5
Adjust button style/placement on desktop (#1288)
* Adjust button style/placement on desktop

* Change opacity on side comments

* Adjust css for side article actions

* Adjust opacity

* Adjust opacity

* Adjust opacity

* Fix test language

* Remove opacity deal
2018-12-11 13:08:43 -05:00
rhymes
e588fa7ece Code cleanups (#659)
* Initial automatic cleanup with rubocop

* Fix syntax error introduced by rubocop

* Cleanup seeds file

* Cleanup lib folder

* Exclude bin folder because it contains auto generated files

* Make Rubocop a little bit more chatty

* Block length should not include comments in the count

* Cleanup config folder

* Cleanup specs

* Updated Rubocop version and generated a todo file

* Fix broken ArticlesApi spec

* Fix tests

* Restored rubocop pre-commit hook
2018-08-07 11:00:13 -04:00
Ben Halpern
92a541a517
Add a couple specs for notifications and pages (#522)
* Add a couple specs

* Remove stream VCR from notifications_spec

* Add github readme spec

* Add notifications count specs

* Add guards in notifications controller

* Fix test

* Fix test
2018-06-29 14:14:36 -04:00