Commit graph

18 commits

Author SHA1 Message Date
Daniel Uber
8276d1d8c6
Remove profile admin feature flag (#17194)
Remove test cases built around it (modified when the guards were removed).
2022-04-11 09:27:35 -05:00
Daniel Uber
2ddefcbba5
Remove guard clauses and update expectations (#17138) 2022-04-08 15:20:19 -05:00
Jeremy Friesen
765df66084
Scoping the :listing routes to feature (#16406)
This commit builds on the conditional rendering of navigation links by
adding a routing constraint to all :listing routes.

The impact is, if we were to disable the listing feature (e.g.,
`FeatureFlag.disable(:listing_feature_enabled)`) all requests to `GET
/listings` (and those drawn in the [config/routes/listings.rb][1] file)
would return a 404 response.

Related to forem/rfcs#291, #16335, #16338, #16362.

Testing this change:

1. Start your local application (e.g. `$ bin/startup`)
2. Go to http://localhost:3000/listings
3. You should get a Successful response.
4. Now disable the feature (e.g. `$ bin/rails r \
   "FeatureFlag.disable(:listing_feature_enabled)"`)
5. Refresh http://localhost:3000/listings
6. You should get an `ActiveRecord::RecordNotFound` error; because the
   application is now looking for a user or org named "listings"; in other
   words we're not routing `GET "/listings"` to `listings#index` controller
   action.
7. Now enable the feature (e.g. `$ bin/rails r \
   "FeatureFlag.enable(:listing_feature_enabled)"`)
8. Refresh http://localhost:3000/listings
9. You should get a Successful response.
10. Goto 4

This commit is intended to be the penultimate change before we toggle
the listings section off by default.

[1]:c2ce2c32d5/config/routes/listing.rb (L1)
2022-02-04 10:13:56 -05:00
Jeremy Friesen
4fa2d25924
Ensuring that test's URL methods are similar (#16348)
Prior to this commit, in test, we had two different answers to "what is
the host of this application?"  For Rails generates
URLs (e.g. `root_url`) we would get one answer.  For our custom
`URL.url("/")` we got another answer.

This resolves and patches that up.

Closes #16347
2022-01-31 09:18:13 -05: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
Fernando Valverde
121603a44b
Replace Pusher Beams with Rpush PN delivery ✂️ ✂️ (#13588)
* Remove feature flag

* Remove Pusher Beams implementation

* Remove Pusher Beams require from initializer

* Adds consumer apps to sidebar + consider :admin_restructure

* Fix routes + PN target URL

* Remove old file that sneaked in

* Adds docs

* docs tweaks

* Apply suggestions from code review

Co-authored-by: rhymes <rhymes@hey.com>

Co-authored-by: rhymes <rhymes@hey.com>
2021-05-05 08:37:20 -06:00
Fernando Valverde
cf3bde4259
Add mobile push notifications to Forem (#12419)
* First commit with iOS PN working

* RPush cleanup worker + unique jobs config

* Remove rpush tables from schema.rb

* PR feedback

* Feature flag and test for route

* Tests and feature flag PushNotification ::Send

* Update app/controllers/devices_controller.rb

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

* Update spec/routing/devices_routes_spec.rb

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

* Update spec/services/push_notifications/send_spec.rb

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

* PR feedback

* Set Rpush driver and url

* More PR feedback

* Apply suggestions from code review

Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>

* PR feedback from Rhymes

* Don’t double render

* Sure

Co-authored-by: Josh Puetz <hi@joshpuetz.com>
Co-authored-by: Josh Puetz <josh@dev.to>
Co-authored-by: Michael Kohl <citizen428@dev.to>
Co-authored-by: Jamie Gaskins <jgaskins@gmail.com>
2021-03-12 14:08:18 -06:00
Ridhwana
a61f88fc16
Adds a feature flag for Data Update Scripts (#12641)
* feat: add a feature flag for data update scripts

* feat: write some tests for it

* chore: oops

* stub the data update scripts out wherever the profile admin is

* chore: remove some unneeded ones

* refactor: use call_original

* feat: add a feature flag to all the Forems (but not enable it as yet)
2021-02-10 18:22:27 +02:00
rhymes
3f47e8e695
Redirect old settings routes to new ones (#11681) 2020-11-30 16:54:31 +01:00
rhymes
1bb53651b0
Replace calls to Flipper with FeatureFlag (#11386) 2020-11-12 14:15:33 +01:00
Michael Kohl
7b6c5b60c1
Add feature flag for profile admin section (#11149)
* Add feature flag for profile admin section

* Fix spec description

* Also remove profile admin link from sidebar

* Disable profile admin routes based on feature flag

* Minor fixes

* Remove unnecessary object from spec

* Refactor AdminHelper

* Fix specs

* Fix remaining specs
2020-11-02 08:48:18 +07:00
Alex
2a5a933ed1
Add routes for i18n (#10193)
* Add routes

* Update all_routes spec

* Add i18n route specs

* Add docs

* Docs cleanup

* Add note about fragment caching
2020-09-03 17:11:07 -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
b830cdc5b8
Remove harcoded shop strings (#7319) 2020-04-16 14:51:23 +02:00
Tim Lange
3494264404 Enabled rubocop/lint (#2130)
* WIP: Enabled rubocop/lint

* FIX: Fixed failing test

* FIX: Small change to return

* FIX: Changed indent
2019-03-21 10:53:44 -04: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
Yechiel Kalmenson
c121dd63d3 Yechiel/feature/add route for shop (#468)
* add test for /shop route

* route /shop to shop.dev.to
2018-06-21 13:14:13 -04:00
Mac Siri
301c6080e3 Initial commit 2018-02-28 16:11:08 -05:00