<commit_before>module DockerCookbook
  class DockerContainer < DockerBase
    resource_name :docker_container

    property :container_name, String, name_property: true
    property :repo, String, default: lazy { container_name }
    property :tag, String, default: 'latest'
    property :command, [Array, String, nil], coerce: proc { |v| v.nil? ? nil : ::Shellwords.shellwords(v) }
    property :attach_stderr, [TrueClass, FalseClass], default: false, desired_state: false
    property :attach_stdin, [TrueClass, FalseClass], default: false, desired_state: false
    property :attach_stdout, [TrueClass, FalseClass], default: false, desired_state: false
    property :autoremove, [TrueClass, FalseClass], default: false, desired_state: false
    property :cap_add, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) }
    property :cap_drop, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) }
    property :cgroup_parent, String, default: ''
    property :cpu_shares, Integer, default: 0
    property :cpuset_cpus, String, default: ''
    property :detach, [TrueClass, FalseClass], default: true, desired_state: false
    property :devices, Array, default: []
    property :dns, Array, default: []
    property :dns_search, Array, default: []
    property :domain_name, String, default: ''
    property :entrypoint, [Array, String, nil], coerce: proc { |v| v.nil? ? nil : ::Shellwords.shellwords(v) }
    property :env, UnorderedArrayType, default: []
    property :env_file, [Array, String], coerce: proc { |v| coerce_env_file(v) }, default: [], desired_state: false
    property :extra_hosts, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) }
    property :exposed_ports, PartialHashType, default: {}
    property :force, [TrueClass, FalseClass], default: false, desired_state: false
    property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false
    property :hostname, String
    property :ipc_mode, String, default: ''
    property :kernel_memory, [String, Integer], coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :labels, [String, Array, Hash], default: {}, coerce: proc { |v| coerce_labels(v) }
    property :links, UnorderedArrayType, coerce: proc { |v| coerce_links(v) }
    property :log_driver, %w( json-file syslog journald gelf fluentd awslogs splunk etwlogs gcplogs none ), default: 'json-file', desired_state: false
    property :log_opts, [Hash, nil], coerce: proc { |v| coerce_log_opts(v) }, desired_state: false
    property :init, [TrueClass, FalseClass, nil]
    property :ip_address, String
    property :mac_address, String
    property :memory, [String, Integer], coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :memory_swap, [String, Integer], coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :memory_swappiness, Integer, default: 0
    property :memory_reservation, Integer, coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :network_disabled, [TrueClass, FalseClass], default: false
    property :network_mode, String, default: 'bridge'
    property :network_aliases, [String, Array], default: [], coerce: proc { Array(v) }
    property :oom_kill_disable, [TrueClass, FalseClass], default: false
    property :oom_score_adj, Integer, default: -500
    property :open_stdin, [TrueClass, FalseClass], default: false, desired_state: false
    property :outfile, String
    property :port_bindings, PartialHashType, default: {}
    property :pid_mode, String, default: ''
    property :privileged, [TrueClass, FalseClass], default: false
    property :publish_all_ports, [TrueClass, FalseClass], default: false
    property :remove_volumes, [TrueClass, FalseClass], default: false
    property :restart_maximum_retry_count, Integer, default: 0
    property :restart_policy, String
    property :runtime, String, default: 'runc'
    property :ro_rootfs, [TrueClass, FalseClass], default: false
    property :security_opt, [String, Array], coerce: proc { |v| v.nil? ? nil : Array(v) }<commit_msg>Fix undefined method `v' for DockerContainer<commit_after>module DockerCookbook
  class DockerContainer < DockerBase
    resource_name :docker_container

    property :container_name, String, name_property: true
    property :repo, String, default: lazy { container_name }
    property :tag, String, default: 'latest'
    property :command, [Array, String, nil], coerce: proc { |v| v.nil? ? nil : ::Shellwords.shellwords(v) }
    property :attach_stderr, [TrueClass, FalseClass], default: false, desired_state: false
    property :attach_stdin, [TrueClass, FalseClass], default: false, desired_state: false
    property :attach_stdout, [TrueClass, FalseClass], default: false, desired_state: false
    property :autoremove, [TrueClass, FalseClass], default: false, desired_state: false
    property :cap_add, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) }
    property :cap_drop, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) }
    property :cgroup_parent, String, default: ''
    property :cpu_shares, Integer, default: 0
    property :cpuset_cpus, String, default: ''
    property :detach, [TrueClass, FalseClass], default: true, desired_state: false
    property :devices, Array, default: []
    property :dns, Array, default: []
    property :dns_search, Array, default: []
    property :domain_name, String, default: ''
    property :entrypoint, [Array, String, nil], coerce: proc { |v| v.nil? ? nil : ::Shellwords.shellwords(v) }
    property :env, UnorderedArrayType, default: []
    property :env_file, [Array, String], coerce: proc { |v| coerce_env_file(v) }, default: [], desired_state: false
    property :extra_hosts, [Array, nil], coerce: proc { |v| Array(v).empty? ? nil : Array(v) }
    property :exposed_ports, PartialHashType, default: {}
    property :force, [TrueClass, FalseClass], default: false, desired_state: false
    property :host, [String, nil], default: lazy { ENV['DOCKER_HOST'] }, desired_state: false
    property :hostname, String
    property :ipc_mode, String, default: ''
    property :kernel_memory, [String, Integer], coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :labels, [String, Array, Hash], default: {}, coerce: proc { |v| coerce_labels(v) }
    property :links, UnorderedArrayType, coerce: proc { |v| coerce_links(v) }
    property :log_driver, %w( json-file syslog journald gelf fluentd awslogs splunk etwlogs gcplogs none ), default: 'json-file', desired_state: false
    property :log_opts, [Hash, nil], coerce: proc { |v| coerce_log_opts(v) }, desired_state: false
    property :init, [TrueClass, FalseClass, nil]
    property :ip_address, String
    property :mac_address, String
    property :memory, [String, Integer], coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :memory_swap, [String, Integer], coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :memory_swappiness, Integer, default: 0
    property :memory_reservation, Integer, coerce: proc { |v| coerce_to_bytes(v) }, default: 0
    property :network_disabled, [TrueClass, FalseClass], default: false
    property :network_mode, String, default: 'bridge'
    property :network_aliases, [String, Array], default: [], coerce: proc { |v| Array(v) }
    property :oom_kill_disable, [TrueClass, FalseClass], default: false
    property :oom_score_adj, Integer, default: -500
    property :open_stdin, [TrueClass, FalseClass], default: false, desired_state: false
    property :outfile, String
    property :port_bindings, PartialHashType, default: {}
    property :pid_mode, String, default: ''
    property :privileged, [TrueClass, FalseClass], default: false
    property :publish_all_ports, [TrueClass, FalseClass], default: false
    property :remove_volumes, [TrueClass, FalseClass], default: false
    property :restart_maximum_retry_count, Integer, default: 0
    property :restart_policy, String
    property :runtime, String, default: 'runc'
    property :ro_rootfs, [TrueClass, FalseClass], default: false
    property :security_opt, [String, Array], coerce: proc { |v| v.nil? ? nil : Array(v) }
{'fraction_non_alphanumeric': 0.12666911674629425, 'fraction_numerical': 0.0024500796275878966, 'mean_word_length': 4.92883079157589, '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': '790974', 'n_tokens_mistral': 2577, 'n_tokens_neox': 2501, 'n_words': 770}