* Upgrade Rails to 6.1
* Switch to unreleased bullet
* Run rails app:update
* Add deprecation notices after reading changelogs
* Fix app:update error
* Move middleware in the correct place
* Temporarily disable ransack which does not support Rails 6.1
* Remove wrongly merged file
* Re-run spring binstub
* Fix double quotes
* Track ransack branch with Rails 6.1 support
* Fix deprecation
* Switch to Ransack 2.4 which supports Rails 6.1 rc1
* Fix missing default params for the duration substitution
* Fix new behavior of relation.pluck with contradictory queries
* Fix uploaders specs by tracking rspec-rails main repo
* Disable bullet temporarily
* Fix remaining fixture_file_upload usages
* Add default seconds for video article duration
* Trigger Travis CI
* Upgrade Rails to 6.1.0.rc2
* Remove file deleted on master
* Add Rails 6.1 gem to Gemfile
* Trigger Travis CI
* Revert "Disable bullet temporarily"
This reverts commit cee0c2ce61fb72cbc16d52c94b12ee681e873031.
* Fix bullet version
* Upgrade to acts-as-taggable 7 and fix conflict
* Update Gemfile and rspec-* gems
* Fix nokogiri in Gemfile.lock
* Switch to rspec-rails main branch
* Remove leftover vendored cached items
* Fix path for Rails 6.1
* Use latest release of erb_lint
* Re-run rails app:update to incorporate new changes
* Disable erb_lint's ErbSafety checks
* Fix Gemfile.lock and re-add platform specific gems of Nokogiri
* Add mini_portile2 as well
* Fix latest merge conflict by removing now unused faraday_middleware
* Upgrade to Rails 6.1.3.1
* Regenerate Gemfile.lock and vendor/cache
* Add x86_64 linux gem
* Mark spec as flaky
* Revert "Mark spec as flaky"
This reverts commit 3caba94b33645f9b59c84ba78ee8df042fc7aee0.
Co-authored-by: Mac Siri <krairit.siri@gmail.com>
* write tests for invite-only mode and auth-providers
* text edits
* modify specs in light of new e2e database setup
* Still working things out
* Added the admin user name to the e2e fixture data.
* Added testid for config sections.
* Fixed up test to use cypress-testing-library APIs.
* Fixed unsetting invite only mode, still need to reset it at end of test.
* Small fix for local e2e development.
* Complete all tests; generalize updateAdminConfig cypress command
* correct spec
* Complete implementation
* Address code review comments
* address code review comments #2
Co-authored-by: Nick Taylor <nick@dev.to>
* Added custom seed task
* Added a test for the initial login for the intial admin of a forem instance.
* Renamed admin login seed data file.
* Pulled functions out of main Cypress plugin file and import them now.
* Added some comments.
* Added a comment about Cypress tasks requiring a return value to be considered successful.
* Moved admin_login_setup seed file to spec folder.
* Made change requests in regards to rake task.
* Fixed reference to SiteConfig
* Created the seeder class to be shared for all seed files.
* Added a missing param to function comment.
* Fixed seeder require in e2e test seed file.
* Fixed seeder require in seeds.rb. Why is Rails.root required?
* Added an environment guard for not being production in the e2e seed task.
* Made seeder require relative.
* Trying something for the Elastic Search issue in CI.
* Revert "Trying something for the Elastic Search issue in CI."
This reverts commit 7cb2a963c8ac1f9242c612a1b9fe8ff814605df6.
* Search indices are now removed via bundle exec rake search:destroy
* Now rake search:destroy is used in the Cypress task for resetting data as well.
* Moved Seeder class to app/lib
* Added cypress-rails
* Got two flows working with db rollbacks.
* Trimmed down the e2e dataset for now.
* Added a custom Cypress command to encompass test setup.
* removed unused e2e rake task
* added some user login/password e2e tests.
* Added a note about Cypress not cleaning cookies, so we do for the moment.
* Removed code no longer required.
* Removed comment in test that is no longer pertinent to the test suite.
* Removed data cleaning plugins as cypress rails gem handles it now.
* Added @citizen428's recommendation got raising an error if trying to seed production.
* Temporarily have paralleziation of e2e tests disabled to figure out cypres-rails/knapsack pro integration.
* Doh! Forgot a semi-colon in the Travis config.
* Added a comment about not integrating cypress-rails/knapsack pro right now.
* Removed knapsack pro npm package for now as we aren't using it.
* Reworded comment about cypress-rails/kanpsackpro.
* Removed seeding for tags to follow for onboarding in e2e seed data.
* Made pree2e script e2e:setup so it only runs explicitly when needed.
* Renamed bin/e2e to bin/e2e-ci.
* Created a new script for local e2e testing.
* Removed RAILS_ENV as it's in the e2e-ci script already.
* Fixed an auto corrected command.
* Fixed wording in e2e script prompt.
* Removed bundle exec rake data_updates:run that I had added. Doesn't appear to be necessary.
* Added missing new lines.
* Renamed e2e seed file and only use that one now. THere are no others.
* Some script cleanup.
* Added a check for the E2E environment so as to not pollute system tests.
* Now e2e test server cleanup occurs when the server shuts down.
* Put puts as this is really just for testing.
* Put environment variable in the proper place for runnning bundle exec.
* Added a check to only run for E2E tests.
* Some bash script formatting.
* Removed copy paste irrelevant comments.
* Updated e2e server shutdown message.
* Now a data-testid attribute is used for finding the user account errors panel.
* Made test selectors ignore casing of text.
* Removed prod paranoia check in e2e seed file.
* Refactored spec to use new cy.loginUser(user) command.
* Update app/lib/seeder.rb
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Fixed flakiness that @aitchiss was experiencing.
* Rubocop fix.
* Due to a Cypress issue, fixing cookie clearing with another tweak.
* Bumped the wait time to 500ms if cookies don't clear.
* Added a 'bundle check' to the bin/e2e script as suggested by @katiedavis.
* Removed some white space
Co-authored-by: Michael Kohl <citizen428@dev.to>
* Fixed e2e parallelization when no API token for Knapsack.
* Re-eneabled e2e tests in Travis.
* Checks for the KNAPSACK_PRO_TEST_SUITE_TOKEN_CYPRESS now.
* Use premade development image.
* Use prebuilt container for podman-compose too!
* Fix bundle bundle_finished path.
* Fix docker-compose to work with the Multistage Containerfile
Add root user for Forem containers, fix bundle_finished path and make
webpacker wait for the bundle to finish.
Switch Redis to redis:6.0.9-alpine
* Remove build steps and fix bundle path.
* Merge dev entrypoint into the main one.
* Use merged entrypoint.sh, remove old entrypoint directives, and fix a dockerize bug.
* Make sure unset BUNDLE_WITHOUT and remove without in bundle config.
* Unset BUNDLE_WITHOUT="development:test" as a global ENV.
Also ensure that we remove the without directives for development and testing.
This will make sure that the right gems are installed for each environment.
Removed some unneeded COPYs and remove a commented out RUN.
* Fix ENTRYPOINT on development and testing containers.
* Fix entrypoint and command on rails container.
* Ignore bundle_finished file.
* Fix REDIS_ env vars and adjust podman-compose file.
* Change bundle_finished path and update Yarn docker-compose command.
* 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
* Merge conflict resolved
* fix chat ui height
* fix no console
Co-authored-by: Sarthak Sharma <7lovesharma7@gmail.com>
* Refactor:Remove ENVied Gem in Favor of Default application.yml
* Copy sample_application.yml for Travis
* Create .env_sample file, Warn of missing ENV variables, ignore .env file
* Use dotenv For ENV variables and create Rake Task to Populate
* Update docs to copy .env_sample file
* make application config a bit more resilient
* update more documentation and only initialize dotenv in dev and test
* Update doc code snippet types and refactor rake task and app config
* remove push defaults
* Make initializers more resilient, remove unused ENV from travis
* Exit new rake task if application.yml does not exist, include dotenv in docs
* Fix schema.rb
* Add service objects for base and link fields
* Add link fields to seeds
* Make placeholder a keyword argument
* Add work fields
* Add explanation column to profile fields
* Add coding fields
* Switch from inheritance to mixin
* Add email checkbox to base fields
* Add branding fields
* Add spec for ProfileFields::FieldDefinition
* Move migration back into correct location
* Rename column from explanation to description
* Rename attribute in mixin
* chore: rename from explanation to description
* Add ProfileFields::ImportFromCsv
* Simplify ProfileFields::ImportFromCsv
* Add comment about disabled cop to spec
* Add TODO comment to Rake task
* Document mixin
* Add groups to profile fields
Co-authored-by: Ridhwana <ridhwana.khan16@gmail.com>
This PR moves the away from the dev specific naming to forem w/r/t container
things. Also moves to the Forem quay.io org.
* Move to Forem from DEV
* Add in assets and packs directories.
* 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>
* Move from Alpine Linux to Fedora Linux.
This changes the base container image away from Alpine Linux to
Fedora Linux to address some musl libc issues with some of our gems.
It also moved the main file to a Containerfile and symlinks the Dockerfile
to it. This makes our container setup less Docker-centric as Linux users
most likely will be using Podman as their container runtime.
Lastly, it moves the WORKDIR from /usr/src/app to /opt/apps/devto.
The Linux FHS states that /opt is the spot for Optional application
software packages and /usr/src is for kernel source code.
https://en.wikipedia.org/wiki/Filesystem_Hierarchy_Standard
/opt Optional application software packages
/usr/src Source code, e.g., the kernel source code with its header files.
Also, if SELinux becomes a thing in our future, moving this makes it
easier to manage contexts out of /opt rather than /usr/src.
* Adjust the Containerfile a bit to add some missing packages, make it
more generic and move env vars to the docker-compose.
* Move the Dockerfile to a symlink to the Containerfile.
We need to be able to support more than just Docker for a container
runtime. Moving everything to a Containerfile and symlinking the
Dockerfile helps users run runtimes such as Podman.
* Add in new entrypoint files and fix the app path in docker-entrypoint.sh
* Refactor the docker-compose.yml file so it doesn't build the main
application container three times in a row. We can use the same
container for web, webpacker, and sidekiq.
Also make the volume names very explicit on what their contents and add
in SELinux context support with :Z
* Fix ELASTICSEARCH_URL.
* Remove the absolute path on ip binary and add in iproute to Containerfile.
* Symlink the Dockerfile to Containerfile and add in a container-compose.yml file
for usage with podman-compose. We are waiting for this issue to get resolved
https://github.com/containers/libpod/issues/6153
and for podman-compose to mature a bit more. A user using podman-compose can use
podman-compose -f container-compose.yml
to launch the DEV container stack with Podman.
* Update the .gitignore file to reflect the new container volumes.
* Fix the entrypoint script on the Containerfile and clean up a bunch of things.
* Rework the Containerfile to prep it to run as a non-root user. We have to wait
for this issue to get fixed:
https://github.com/containers/libpod/issues/6153
for Linux users and then we can uncomment the USER line so we are running Rails
as a non-root user. :toot:
* This reworks the compose files so each task that is needed to start the app has
a correct wait command with dockerize. It also adds in containers for doing
yarn and bundle things for development. Since we mount the code directory inside
the container we lose our pre-containerized gems and node_modules.
This means users can run:
Linux
podman-compose -f container-compose.yml up
Mac
docker-compose up
and it should correctly build the app stack with containers!
* Clean up old container related things.
* Add in some container pre-reqs and my name to the "Core team" section! :toot:
* Adjust the seed and sidekiq compose entries so they do not use the web entrypoint
and set the REDIS_URL and REDIS_SESSIONS_URL env vars for seed.
Add in some echos to the entrypoint.sh.
Also set docker-compose to use :delegated on mount points to speed things up.
https://docs.docker.com/storage/bind-mounts/#configure-mount-consistency-for-macos
* Just call yarn install --dev on the yarn container.
* Update documentation to support Docker and Podman as Container Engines and
move the page from docker to containers to reflect the fact not all users run
their containers via Docker.
There are dozens of us... DOZENS!
* Set --local on bundle config so it just impacts this Ruby app.
* Renamed bin/docker-setup to bin/container-setup to reflect the fact that that
we can use Podman as a container engine. I also refactored it so it does some
basic pre-flight checks for docker and docker-compose or podman and
podman-compose to make sure users have a container engine installed.
* Set cache_all_platforms true for bundler.
* Bump docker-compose dockerize -timeout to 45min for slower macOS hardware.
* Move to the consolidated app_initializer:setup rake task for bootstrapping the
app.
* Update docs/installation/readme.md
* Let's cache our gems in vendor/cache!
This PR adds in bundle package caching which will help speed up deployments by
caching all of the gems that we use in our git repo. This was done with the
following commands on a fresh repo clone:
bundle install
bundle package --all
This cached all of our gems in vendor/cache and when you do a bundle install to
update gems from the Gemfile, it will update our gem cache too.
You can read more about bundle package here:
https://bundler.io/man/bundle-package.1.html
* Add in bundle config set cache_all true to bin/setup so it gets set for everyone.
* Unset DATABASE_URL in .gitpod.yml
* Only run bin/setup once
* Try alternative approach for unsetting DATABASE_URL
* Update bin/setup
* Consistently use db_url
* Fix bug caused by typo (= instead of ==)