<commit_before>Slack::GoalJob = Struct.new(:nil) do
  include Rails.application.routes.url_helpers

  def perform
    uri = URI.parse('https://slack.com/api/chat.postMessage')
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    request = Net::HTTP::Post.new(uri.path, {
        'Content-type' => 'application/json',
        'Authorization' => "Bearer #{ENV['SLACK_BOT_ACCESS_TOKEN']}"}
    )

    emoji = %w(:confetti_ball: :tada:).sample

    goal = Goal.previous
    balance = Balance.current

    request.body = {
        channel: ENV['SLACK_CHANNEL'],
        attachments:
            [
                {
                    fallback: '₭udo goal achieved! :trophy:',
                    color: '#5F90B0',
                    pretext: "<!channel> Congratulations! You and your colleagues just achieved a ₭udo goal! #{emoji}\n"\
                             "Don't forget to pick a date! Click <#{root_url}|here> for more details.",
                    fields: [
                        {
                            title: 'Goal',
                            value: goal.name,
                            short: true
                        },
                        {
                            title: '₭udos',
                            value: "#{balance.amount} ₭",
                            short: true
                        }
                    ],
                    footer: "#{ENV['COMPANY_USER']} | ₭udo-o-Matic | Goal achieved on: #{goal.achieved_on.strftime('%d-%m-%Y')}",
                    footer_icon: ENV['COMPANY_ICON']
                }
            ]
    }.to_json

    http.request(request)
  end

  def queue_name
    'slack'
  end
end<commit_msg>Added the correct time zone to the goal achieved on date<commit_after>Slack::GoalJob = Struct.new(:nil) do
  include Rails.application.routes.url_helpers

  def perform
    uri = URI.parse('https://slack.com/api/chat.postMessage')
    http = Net::HTTP.new(uri.host, uri.port)
    http.use_ssl = true
    request = Net::HTTP::Post.new(uri.path, {
        'Content-type' => 'application/json',
        'Authorization' => "Bearer #{ENV['SLACK_BOT_ACCESS_TOKEN']}"}
    )

    emoji = %w(:confetti_ball: :tada:).sample

    goal = Goal.previous
    balance = Balance.current

    request.body = {
        channel: ENV['SLACK_CHANNEL'],
        attachments:
            [
                {
                    fallback: '₭udo goal achieved! :trophy:',
                    color: '#5F90B0',
                    pretext: "<!channel> Congratulations! You and your colleagues just achieved a ₭udo goal! #{emoji}\n"\
                             "Don't forget to pick a date! Click <#{root_url}|here> for more details.",
                    fields: [
                        {
                            title: 'Goal',
                            value: goal.name,
                            short: true
                        },
                        {
                            title: '₭udos',
                            value: "#{balance.amount} ₭",
                            short: true
                        }
                    ],
                    footer: "#{ENV['COMPANY_USER']} | ₭udo-o-Matic | Goal achieved on: #{goal.achieved_on.in_time_zone('CET').strftime('%d-%m-%Y')}",
                    footer_icon: ENV['COMPANY_ICON']
                }
            ]
    }.to_json

    http.request(request)
  end

  def queue_name
    'slack'
  end
end
{'fraction_non_alphanumeric': 0.12402428447528187, 'fraction_numerical': 0.0023128071697022263, 'mean_word_length': 1.3190348525469169, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '4480794', 'n_tokens_mistral': 1038, 'n_tokens_neox': 977, 'n_words': 197}