Continuous integration(CI) allowed you to test your code automatically whenever there is any commit towards the feature/main branch or any pull request comes in. This is great because sometimes you forgot to run tests cases locally before pushing the changes.
To set up GitHub Actions for our project we’ll need a workflow file. Workflows are made up of one or more jobs and can be scheduled or triggered by an event. The workflow can be used to build, test, package, release, or deploy a project on GitHub. You can read more about GitHub Actions here. …
MessageEncryptor is a simple way to encrypt values which get stored somewhere you don’t trust. The ciphertext and initialization vector are base64 encoded and returned to you. For more details, you can check out the official ruby doc here
Upgrading from Rails 4 to Rails 5 we also need to take care of
ActiveSupport::MessageEncryptor. The behavior of the key is changed in Rails 5 and Ruby 2.4.2 and above.
For example, if you simply want to encrypt and decrypt the values in Rails 4 and ruby 2.2.0
Now in rails, 5 key should be 32 bytes only, so it…
SameSite is the new recommended way to keep your website secure. It’d make
CSRF even more secure. The
SameSite attribute allows servers to assert that a cookie shouldn’t be sent along with cross-site requests. This change provides some protection against cross-site request-forgery attacks.
In simple terms, cookies that don’t include the
Secure labels won’t be accessible by third parties. This behaviour change was rolled out by Google on February 4, 2020.
If you’ve moved your development environment to Docker and you’re on a Mac, you might have noticed your web application stacks are slower than another native environment you’ve been used to. The fact of the matter is, Docker for Mac has terribly slow IO performance compared to on Linux machines.
Developing with docker under OSX/Windows is a huge pain, since sharing your code into containers slows down the code-execution. To solve the performance issue we can use
docker-sync. To show how to set up the docker-sync with our application let’s take an example of a Rails application.
In my rails…
Ruby on Rails | React | AWS | Solr | JQuery