1
0
Fork 0

Add abstract model Key

This commit is contained in:
Alex Kotov 2019-09-13 22:19:54 +05:00
parent 9be8f349f4
commit cd513e3256
Signed by: kotovalexarian
GPG key ID: 553C0EBBEB5D5F08
3 changed files with 13 additions and 1 deletions

5
app/models/key.rb Normal file
View file

@ -0,0 +1,5 @@
# frozen_string_literal: true
class Key < ApplicationRecord
self.abstract_class = true
end

View file

@ -1,6 +1,6 @@
# frozen_string_literal: true
class RSAKey < ApplicationRecord
class RSAKey < Key
PRIVATE_KEY_CLEAR_DELAY = 12.hours.freeze
attr_accessor :private_key_pem, :private_key_pem_secret

7
spec/models/key_spec.rb Normal file
View file

@ -0,0 +1,7 @@
# frozen_string_literal: true
require 'rails_helper'
RSpec.describe Key do
pending "add some examples to (or delete) #{__FILE__}"
end