<commit_before>#
# Cookbook Name:: systemd
# Library:: SystemdCookbook
#
# Copyright 2016 The Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'pathname'

module SystemdCookbook
  UNITS ||= %w(
    automount
    device
    mount
    path
    scope
    service
    slice
    socket
    swap
    target
    timer
  ).freeze

  BUS_ONLY_UNITS ||= %w( scope ).freeze

  DAEMONS ||= %w(
    journald
    logind
    networkd
    resolved
    system
    timesyncd
    user
  ).freeze

  UTILS ||= %w(
    binfmt
    bootchart
    coredump
    modules
    sleep
    sysctl
    sysuser
    tmpfile
  ).freeze

  NETS ||= %w(
    link
    netdev
    network
  )
  module Common
    ABSOLUTE_PATH ||= {
      kind_of: String,
      callbacks: {
        'is an absolute path' => -> (spec) { Pathname.new(spec).absolute? }
      }
    }.freeze
    SOFT_ABSOLUTE_PATH ||= {
      kind_of: String,
      callbacks: {
        'is an absolute path' => lambda do |spec|
          Pathname.new(spec.gsub(/^\-/, '')).absolute?
        end
      }
    }.freeze
    ARCH ||= {
      kind_of: String,
      equal_to: %w(
        x86
        x86-64<commit_msg>fix merge conflict<commit_after>#
# Cookbook Name:: systemd
# Library:: SystemdCookbook
#
# Copyright 2016 The Authors
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

require 'pathname'

module SystemdCookbook
  UNITS ||= %w(
    automount
    device
    mount
    path
    scope
    service
    slice
    socket
    swap
    target
    timer
  ).freeze

  BUS_ONLY_UNITS ||= %w( scope ).freeze

  DAEMONS ||= %w(
    journald
    logind
    networkd
    resolved
    system
    timesyncd
    user
  ).freeze

  UTILS ||= %w(
    binfmt
    bootchart
    coredump
    modules
    sleep
    sysctl
    sysuser
    tmpfile
  ).freeze

  NETS ||= %w(
    link
    netdev
    network
  ).freeze

  module Common
    ABSOLUTE_PATH ||= {
      kind_of: String,
      callbacks: {
        'is an absolute path' => -> (spec) { Pathname.new(spec).absolute? }
      }
    }.freeze
    SOFT_ABSOLUTE_PATH ||= {
      kind_of: String,
      callbacks: {
        'is an absolute path' => lambda do |spec|
          Pathname.new(spec.gsub(/^\-/, '')).absolute?
        end
      }
    }.freeze
    ARCH ||= {
      kind_of: String,
      equal_to: %w(
        x86
        x86-64
{'fraction_non_alphanumeric': 0.09315646668676515, 'fraction_numerical': 0.008441362677117878, 'mean_word_length': 2.29493545183714, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '575129', 'n_tokens_mistral': 1088, 'n_tokens_neox': 1042, 'n_words': 344}