<commit_before>module EtcdCookbook
  class EtcdInstallationBinary < Chef::Resource
    resource_name :etcd_installation_binary
    provides :etcd_installation

    #####################
    # resource properties
    #####################

    property :checksum, String, default: lazy { default_checksum }, desired_state: false
    property :source, String, default: lazy { default_source }, desired_state: false
    property :version, String, default: '3.2.6', desired_state: false

    default_action :create

    #########
    # actions
    #########

    action :create do
      package 'tar'

      remote_file 'etcd tarball' do
        path "#{file_cache_path}/etcd-v#{new_resource.version}-linux-amd64.tar.gz"
        source new_resource.source
        action :create
      end

      execute 'extract etcd' do
        command extract_etcd_cmd
        action :nothing
        subscribes :run, 'remote_file[etcd tarball]'
      end

      execute 'extract etcdctl' do
        command extract_etcdctl_cmd
        action :nothing
        subscribes :run, 'remote_file[etcd tarball]'
      end
    end

    action :delete do
      file etcd_bin do
        action :delete
      end

      file etcdctl_bin do
        action :delete<commit_msg>Fix checksum property on etcd_installation resource<commit_after>module EtcdCookbook
  class EtcdInstallationBinary < Chef::Resource
    resource_name :etcd_installation_binary
    provides :etcd_installation

    #####################
    # resource properties
    #####################

    property :checksum, String, default: lazy { default_checksum }, desired_state: false
    property :source, String, default: lazy { default_source }, desired_state: false
    property :version, String, default: '3.2.6', desired_state: false

    default_action :create

    #########
    # actions
    #########

    action :create do
      package 'tar'

      remote_file 'etcd tarball' do
        path "#{file_cache_path}/etcd-v#{new_resource.version}-linux-amd64.tar.gz"
        source new_resource.source
        checksum new_resource.checksum
        action :create
      end

      execute 'extract etcd' do
        command extract_etcd_cmd
        action :nothing
        subscribes :run, 'remote_file[etcd tarball]'
      end

      execute 'extract etcdctl' do
        command extract_etcdctl_cmd
        action :nothing
        subscribes :run, 'remote_file[etcd tarball]'
      end
    end

    action :delete do
      file etcd_bin do
        action :delete
      end

      file etcdctl_bin do
        action :delete
{'fraction_non_alphanumeric': 0.1094663030775224, 'fraction_numerical': 0.0038955979742890533, 'mean_word_length': 2.7489051094890513, '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': '2255562', 'n_tokens_mistral': 753, 'n_tokens_neox': 714, 'n_words': 194}