Commit Graph

10 Commits

Author SHA1 Message Date
Nick Thomas 013f7cd24c
Inherit from ApplicationRecord instead of ActiveRecord::Base 2019-03-28 16:18:23 +00:00
gfyoung 388cb319d5 Enable frozen string for app/models/**/*.rb
Partially addresses #47424.
2018-08-03 01:44:16 -07:00
Stan Hu 61df812ac6 Fix attr_encryption key settings
attr_encrypted does different things with `key` depending on what mode you are using:

1. In `:per_attribute_iv_and_salt` mode, it generates a hash with the salt:
c3a62c4a9e/lib/encryptor.rb (L77).
There is no need to truncate the key to 32 bytes here.

2. In `:per_attribute_iv` mode, it sets the key directly to the password, so
truncation to 32 bytes is necessary.

Closes #47166
2018-06-02 05:24:59 -07:00
Stan Hu b5c706326a Upgrade to Ruby 2.4.4
Fixes that make this work:

* A change in Ruby (ce635262f5)
requires passing in the exact required length for OpenSSL keys and IVs.

* Ensure the secrets.yml is generated before any prepended modules are
loaded. This is done by renaming the `secret_token.rb` initializer to
`01_secret_token.rb`, which is a bit ugly but involves the least impact on
other files.
2018-05-29 15:19:33 -07:00
Jacopo 181cd299f9 Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
2017-11-16 17:58:29 +01:00
bikebilly 8d7fbd09dc Change new occurrencies of n1-default-4 2017-11-07 09:46:04 +01:00
Shinya Maeda a99ad59e65 Remove 10.3 comments (Tracked by a tech debts issue). Refactor spec factory name. Use ArgumentError 2017-11-06 23:06:10 +09:00
Shinya Maeda 478e59fe8d specs for models. Improved details. 2017-10-30 03:48:45 +09:00
Shinya Maeda d0cff7f585 This works 2017-10-23 11:36:35 +03:00
Kamil Trzcinski e1d12ba9b9 Refactor Clusters to be consisted from GcpProvider and KubernetesPlatform 2017-10-23 08:57:52 +03:00