Skip to content

Commit

Permalink
remove timestamps from header/message entities and repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Jammjammjamm committed Nov 16, 2022
1 parent 656cf7f commit c6ba8be
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 19 deletions.
10 changes: 2 additions & 8 deletions lib/inferno/entities/header.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,8 @@ module Entities
# @return [String] header value
# @!attribute type
# @return [String] request/response
# @!attribute created_at
# @return [Time]
# @!attribute updated_at
# @return [Time]
class Header < Entity
ATTRIBUTES = [:id, :request_id, :name, :type, :value, :created_at, :updated_at].freeze
ATTRIBUTES = [:id, :request_id, :name, :type, :value].freeze

include Inferno::Entities::Attributes

Expand All @@ -39,9 +35,7 @@ def to_hash
request_id:,
type:,
name:,
value:,
created_at:,
updated_at:
value:
}.compact
end
end
Expand Down
6 changes: 1 addition & 5 deletions lib/inferno/entities/message.rb
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,8 @@ module Entities
# @return [String]
# @!attribute message
# @return [String]
# @!attribute created_at
# @return [Time]
# @!attribute updated_at
# @return [Time]
class Message < Entity
ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type, :created_at, :updated_at].freeze
ATTRIBUTES = [:id, :index, :message, :result_id, :result, :type].freeze
TYPES = ['error', 'warning', 'info'].freeze

include Inferno::Entities::Attributes
Expand Down
3 changes: 0 additions & 3 deletions lib/inferno/repositories/headers.rb
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ class Model < Sequel::Model(db)

def before_create
self.id = SecureRandom.uuid
time = Time.now
self.created_at ||= time
self.updated_at ||= time
super
end

Expand Down
3 changes: 0 additions & 3 deletions lib/inferno/repositories/messages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,6 @@ class Model < Sequel::Model(db)

def before_create
self.id = SecureRandom.uuid
time = Time.now
self.created_at ||= time
self.updated_at ||= time
super
end

Expand Down

0 comments on commit c6ba8be

Please sign in to comment.