<commit_before>module Travis
  module Services
    module Users
      class Update < Base
        # TODO how to figure these out
        LOCALES = %w(en es fr ja eb nl pl pt-Br ru)

        attr_reader :result

        def run
          @result = current_user.update_attributes!(attributes) if valid_locale?
          current_user
        end

        def messages
          messages = []
          if result
            messages << { :notice => "Your profile was successfully updated." }
          else
            messages << { :error => 'Your profile could not be updated.' }
          end
          message
        end

        private

          def attributes
            params.slice(:locale)
          end

          def valid_locale?
            LOCALES.include?(params[:locale])
          end
      end
    end
  end
end<commit_msg>Fix typeo :scissors:<commit_after>module Travis
  module Services
    module Users
      class Update < Base
        # TODO how to figure these out
        LOCALES = %w(en es fr ja eb nl pl pt-Br ru)

        attr_reader :result

        def run
          @result = current_user.update_attributes!(attributes) if valid_locale?
          current_user
        end

        def messages
          messages = []
          if result
            messages << { :notice => "Your profile was successfully updated." }
          else
            messages << { :error => 'Your profile could not be updated.' }
          end
          messages
        end

        private

          def attributes
            params.slice(:locale)
          end

          def valid_locale?
            LOCALES.include?(params[:locale])
          end
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.06382978723404255, 'fraction_numerical': 0.0, 'mean_word_length': 1.4571843251088534, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 7, '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': '6326582', 'n_tokens_mistral': 426, 'n_tokens_neox': 410, 'n_words': 145}