What does it do? If the Ruby interpreter comes across that magical line, it’ll stop execution and start a REPL (read-evaluate-print-loop), allowing us to dynamically type Ruby code, which gets evaluated, and we can see the result! Amazing stuff.
If you didn’t know, Rails’ asset precompile is supposed to be almost instant when assets are unchanged. So then why is it taking so long for our builds regardless? It turns out that Sprockets leverages a cache directory holding partial asset artefacts which can be instantly compiled into production assets. Whenever the original assets change, these artefacts are invalidated and as a result the build process has to start from scratch.
dy, then either no one else has noticed, or they’re too scared to touch it… to use it in production, but don’t hold back thinking that the process will fix or improve itself. If a part of your development cycle isn’t living up to your expectations, and it hasn’t been fixed already, then either no one else has noticed, or they’re too scared to touch it. So heed the wise words of Master Yoda and don’t fear digging deeper.
When Rails completes the asset precompile, it appends a fingerprint to each compiled asset. For example,
application.js might be compiled to
application-7d25452ceb63594739af24cde73b6499.js where the fingerprint section (
7d..99) is the hash of the content of the file. This just means that if you run the precompile twice without changing anything, the exact same file will be generated, with the exact same file name. Not only does that help with cache busting, but it also means we can keep a historical set of uniqu…
…number via SMS. A popular asymmetric encryption algorithm is used to encrypt and compress the data. Many would argue that it is not a good idea to leave private keys on the app without a considerable amount of obfuscation. Though the amount of obfuscation is a subjective discussion (you can never be too sure!) — it worked fine for our use case. Private keys are used to i) Sign messages that are being encrypted, so that the server knows that n…
… pools, and any other OIDC or SAML provider, including Active Directory Federated Services (AD FS). Using IAM is also the only current method that allows both unauthenticated and authenticated requests within the same API.