<commit_before># Attributes:
# * file [binary]     - Firmware binary file contents
# * size [integer]    - Size of the binary file
# * version [string]  - Version of the binary file
#
# * id [integer, primary, not null] - primary key
# * created_at [datetime, not null] - creation time
# * updated_at [datetime, not null] - last update time

class Firmware < ActiveRecord::Base

  self.table_name = 'firmwares'

  before_validation :set_size

  validates :version, presence: true,
                      uniqueness: true,
                      format: { with: /[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}(-[0-9a-fA-F]{7,40})?/,
                                message: 'Please use semantic versioning format' }<commit_msg>Remove firmware version uniqueness check<commit_after># Attributes:
# * file [binary]     - Firmware binary file contents
# * size [integer]    - Size of the binary file
# * version [string]  - Version of the binary file
#
# * id [integer, primary, not null] - primary key
# * created_at [datetime, not null] - creation time
# * updated_at [datetime, not null] - last update time

class Firmware < ActiveRecord::Base

  self.table_name = 'firmwares'

  before_validation :set_size

  validates :version, presence: true,
                      format: { with: /[0-9]{0,3}\.[0-9]{0,3}\.[0-9]{0,3}(-[0-9a-fA-F]{7,40})?/,
                                message: 'Please use semantic versioning format' }
{'fraction_non_alphanumeric': 0.13749114103472715, 'fraction_numerical': 0.024096385542168676, 'mean_word_length': 2.706036745406824, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5287097', 'n_tokens_mistral': 459, 'n_tokens_neox': 434, 'n_words': 130}