Example Rails 6 app with Mongoid, Devise, RSpec and Cucumber.
- ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-darwin20]
- Use double-splat for hash args like:
args = {k:"v"}; method(**args)
; see: https://piechowski.io/post/last-arg-keyword-deprecated-ruby-2-7/
- works great!
# macOS bigsur
# 1) install
$ brew tap mongodb/brew
$ brew install mongodb-community
# 2) start on background process
$ brew services run mongodb-community
# show version
$ mongo --version
MongoDB shell version v4.4.3
Build Info: {
"version": "4.4.3",
"gitVersion": "913d6b62acfbb344dde1b116f4161360acd8fd13",
"modules": [],
"allocator": "system",
"environment": {
"distarch": "x86_64",
"target_arch": "x86_64"
}
}
- "Login/Logout" vs "Sign in/Sign up"(default); see: https://stackoverflow.com/questions/3827011/devise-custom-routes-and-login-pages
- "Unpermitted parameters"; see: https://stackoverflow.com/questions/35668465/devise-unpermitted-parameters#52802005
- run:
rake
- run:
rake cucumber
- help:
rake -T cucumber
- run:
rake spec
- help:
rake -T rspec
- https://circleci.com/docs/2.0/circleci-images/#mongodb
- https://circleci.com/developer/orbs/orb/circleci/ruby?version=0.1.0
When compiling assets for production on a remote server, such as a continuous integration environment, it's recommended to use
yarn install --frozen-lockfile
to install NPM packages on the remote host to ensure that the installed packages match the yarn.lock file. -- https://github.com/rails/webpacker#deployment
- Original Cucumber and RSpec tests forked from https://github.com/RailsApps/rails3-devise-rspec-cucumber
(for README)
- Ruby version
- System dependencies
- Configuration
- Devise modules
- Database/Mongoid
- How to run the test suite
- Services (job queues, cache servers, search engines, etc.)
- Deployment instructions
https://github.com/awesome/rails6-mongoid-devise-rspec-cucumber/blob/master/LICENSE.md