* Create migrations
* Create PageRedirect model
* Refactor migration and add timestamps
* Add routes for internal/page_redirects
* Add index controller action and view
* Change background color of version in /internal
* Add page_redirect factory and index specs
* Fix specs
* Use ransack for search
* Alphabetize internal sidenav
* Rename spec
* Add edit view with destroy button
* Refactor page_redirect form partial
* Update error messages and fix redirect
* Small fixes and hookup new and create
* Specs FTW
* Fix migration, overridden --> source
* Add PageRedirect model specs
- Validate presence of status
* Update routes
* Code climate fixes
* Add old_slug_url and new_slug_url helper methods
* Prevent updating old_slug, refactor _form
* Add URLs to index view for slugs
* Better spec wording
* Change version to badges and add to edit view
* Update destroy response
* slug --> path 🙈
* Add PageRedirects to seed file
* Fix seed file
* ACTUALLY fix the seed file
* slug --> path in PageRedirect factory
* Remove bug fix from seeds file
* Move menu items to controller constant
* Update source type validation in model spec
* Rename page_redirect --> path_redirect
* Add AuditLog for admin create, destroy, and update
* Remove redundant index
* Cleanup old name of page_redirect
* Remove old model
* Update AuditLog to :internal
* Titleize search placeholder task in internal
* Add comment to explain MENU_ITEMS constant
* Add warning text on edit page about many updates
* Remove default and allow null on source
* Fix comment
* Add path_redirect validations and model specs
- Validate old_path != new_path
- Validate new_path isn't an existing redirect
* Display Jobs Banner if User Searches jobs or job
* Add period to end of sentence
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* reword site config description
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Change SiteConfig display field name to display_jobs_banner
* dont forget the specs
Co-authored-by: Andy Zhao <17884966+Zhao-Andy@users.noreply.github.com>
Co-authored-by: Ridhwana <Ridhwana.Khan16@gmail.com>
* Add dual booting logic to Gemfile
This might be helpful for the Rails 6.0 upgrade project.
* Add more than one gemfile to Travis' configuration
We want to see how the application behaves with more than one Rails versions:
- Gemfile -> Rails 5.2
- Gemfile.next -> Rails 6.0
This will help us figure out what needs to be addressed before migrating to Rails 6.0.
If you want to read more about this technique (dual booting) you can check out this page: https://www.fastruby.io/blog/upgrade-rails/dual-boot/dual-boot-with-rails-6-0-beta.html
* Fix joins
* Upgrade Gemfile.next.lock
* Make sure we're installing the correct versions of gems
* Add Rails 6 notes
* Update rubocop in Gemfile.next.lock
* Fix organization spec
* Fix page_views_spec
* Add Rails 6 and run rails app:update
* Remove some tricks
* Remove Gemfile.next for now
* Fix .content_type deprecation
* Fix deprecation of .where.not NAND/NOR behavior
* Fix deprecation of parameterized emails
* Fix specs
* Remove next flag for now
* Fix spec (hopefully)
* Add wait_for_javascript
* Fix spec, thanks @maestromac!
* Try without wait for javascript hack
* Remove unnecessary bin/update
* Remove file that snuck in the rebase
* Update the vendored gems
* Replace migrate+db:setup with db:prepare
* Update vendored gems
* Fix Gemfile.lock and update vendored stuff
* Fix Gemfile.lock to be the same as master's minus the changes
Co-authored-by: rhymes <rhymesete@gmail.com>
* Add #destroy to Broadcasts::Controller and destroy route to routes.rb
* Adds destroy method w/ corresponding flash messages to controller
* Adds destroy route to Broadcast routes in routes.rb
* Add destroy button to internal/broadcasts edit view
* Adds destroy action to broadcasts/edit.html.erb
* Adds deletion confirmation to broadcasts/edit.html.erb
* Add tests around deleting broadcasts in broadcasts_spec.rb
* Adjust #destroy in Broadcasts::Controller to be a conditional
* Add an exclamation point to #destroyin Broadcasts::Controller
* Add uniqueness validation to broadcast titles in broadcast.rb
* WIP: properly test title uniqueness in broadcast_spec.rb
* Add unique index for title and type_of on Broadcasts
* Adds a unique index to the Broadcasts table
* Adds broadcast.rb to .rubocop_todo.yml
* Resolve merge conflicts
* Add spec around duplicate broadcasts in broadcasts_spec.rb
* Adjust broadcast to be inactive in broadcasts_spec.rb
* Feature 🚀 : Ability to delete messages in chat channels
- Sending message ID to frontend
- Deleting Message
- Use pusher to delete message realtime
* Minor Bug 🐞: Show message action only for current user
- User can delete or edit their own messages
* Test cases added
* Bug 🐞: Update message id for receiver
Message id was not sent to receiver by pusher
* Refactoring🛠: Message controller refactoring
* Test Cases📝 : Specs for Delete message added
* Feature 🚀 : Ability to edit messages
* Test Cases📝 : Specs for Edit message added
* 🐞 Channel List bug in mobile view
* changes in joining request responses
* 🛠 Request Managers Frontend ready
* changes in routes for adding and removing remembership
* 🚀 New routes implemented for request manager
* fix issues
* changes in api for remove membership
* Merge conflict resolved
* 🐞 Channel List bug in mobile view
* changes in joining request responses
* 🛠 Request Managers Frontend ready
* changes in routes for adding and removing remembership
* 🚀 New routes implemented for request manager
* fix issues
* changes in api for remove membership
* 🛠Optimizing for CodeClimate
* 🛠Optimizing again for CodeClimate
* 🛠Optimizing again 2 for CodeClimate
* 🛠 Added more test cases
* 🛠 Optimizing code
* 🛠 vscode file changed
* 🛠 Updated schema as requested
Co-authored-by: Parasgr-code <paras.gaur@skynox.tech>
* This change allows access to api/health_checks if you are coming from localhost
or 127.0.0.1. Pretty sweet huh?
The reason for this change is because I want to easily get to these healthcheck
end points from localhost without having to get the health-check-token beforehand.
Buttttt.... this addition has some issues. You can spoof the host header pretty
easily:
https://daniel.haxx.se/blog/2018/04/05/curl-another-host/
I thought about doing `return if !request.ssl? && request.local?`
to check of the request was over https or not. Any localhost healthcheck we do
directly to puma will be over http. Checking for TLS seemed like a logical next
check, but since we force https on the edge and not necessarily from the edge to
Puma the Host header can still be spoofed to get at these end points.
More info on host header attacks and what Rails 6 is doing about it:
https://github.com/rails/rails/issues/29893
While I do think it is a good idea to protect these healthcheck end points from
the outside world, I do want to be able to get to them easily locally. WWYD?
* Fix Health Check spec by stubbing request
Co-authored-by: mstruve <mollylbs@gmail.com>
* Implement Reddit liquid tag
* Set reddit content in locals
* Change Reddit liquid tag content layout
I decided a UI similar to the Stack Exchange tag would be better.
Now the Reddit tag looks a bit similar.
* Add tests for RedditTag
* Add reddit liquid tag example to docs
Also emphasize notice about compilation of article when using any
liquid tag
* Parse markdown text reddit content for RedditTag
* Display date RedditTag post was published
* Remove file location comments
* Change order of conditional for Reddit liquid tag
Sometimes the attribute `post_hint` might be null and neither condition
would apply.
* Add example to use Reddit liquid tag
* Change reddit svg icon for Reddit liquid tag
* handle and verify status of Reddit links
Here we make sure the passed link is a valid one in terms of URI composition (e.g. protocol)
but also that the URL is one that points to existing content in Reddit.
If the URL isn't returning anything but a successful response code (200) then
we treat it as an invalid one.
* Do not use VCR for RedditTag specs
The generated cassette for this tag was really huge (6000+ lines).
Using mocks (as in the MediumTag spec) still does the job and without
that huge VCR file.
* Remove index line from schema.db
* Improve RedditJsonFromUrlService
- Change User-Agent in requests to one read from app configuration
- Remove Reddit URL check by making a GET request
- Add regexp to validate URL looks like a Reddit URL
* Move RedditJsonFromUrlService methods to RedditTag
Also changed the way the request was being mocked. Previously, it was by
mocking the service class now I'm mocking HTTParty directly and returning
the JSON structure Reddit uses.
* 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!
* 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
* 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
* Add download_broadcast to generator.rb
* Adds memoized download_broadcast method
* Adds send_download_notification method
* Adds send_download_notification to call method
* Add download_app to broadcasts.rb and seeds.rb
* Adds download_app broadcast info and copy to factory
* Adds download_app copy to seeds
* Add specs around #send_download_app_notification in generator_spec.rb
* Fix quotes around copy
* Remove extra space within copy
* 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
* Rubocop unique index cop needs a static list of columns
* Add unique index on organizations secret
* Add unique index on chat_channel_memberships chat_channel_id
* Add unique index to chat_channel slug
* Add unique index to badge_achievements badge_id