<commit_before>require 'omniauth-oauth'
require 'multi_json'

module OmniAuth
  module Strategies
    class Plurk < OmniAuth::Strategies::OAuth
      option :name, 'plurk'
      
      def initialize(*args)
        super
        # taken from https://github.com/intridea/omniauth/blob/0-3-stable/oa-oauth/lib/omniauth/strategies/oauth/tsina.rb#L15-21
        options.client_options = {
          :access_token_path => '/OAuth/access_token',
          :authorize_path => '/OAuth/authorize',
          :request_token_path => '/OAuth/request_token',
          :site => 'http://www.plurk.com',
        }
      end

      def consumer
        consumer = ::OAuth::Consumer.new(options.consumer_key, options.consumer_secret, options.client_options)
        consumer
      end

      uid { raw_info['uid'].to_s }

      info do
        {
          'name' => raw_info['full_name'],
          'nickname' => raw_info['display_name'] || raw_info['nick_name'],<commit_msg>User id field instead of uid, both has same value but uid is not documented.<commit_after>require 'omniauth-oauth'
require 'multi_json'

module OmniAuth
  module Strategies
    class Plurk < OmniAuth::Strategies::OAuth
      option :name, 'plurk'
      
      def initialize(*args)
        super
        # taken from https://github.com/intridea/omniauth/blob/0-3-stable/oa-oauth/lib/omniauth/strategies/oauth/tsina.rb#L15-21
        options.client_options = {
          :access_token_path => '/OAuth/access_token',
          :authorize_path => '/OAuth/authorize',
          :request_token_path => '/OAuth/request_token',
          :site => 'http://www.plurk.com',
        }
      end

      def consumer
        consumer = ::OAuth::Consumer.new(options.consumer_key, options.consumer_secret, options.client_options)
        consumer
      end

      uid { raw_info['id'].to_s }

      info do
        {
          'name' => raw_info['full_name'],
          'nickname' => raw_info['display_name'] || raw_info['nick_name'],
{'fraction_non_alphanumeric': 0.12740141557128412, 'fraction_numerical': 0.006066734074823054, 'mean_word_length': 2.5339285714285715, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 15, 'https://': 2, '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': '2209026', 'n_tokens_mistral': 644, 'n_tokens_neox': 625, 'n_words': 107}