<commit_before>require 'faraday'
require 'active_support/all'
require 'expo_sync/helpers/path_builder'
require 'expo_sync/helpers/class_builder'

module ExpoSync
  SERVICE_URL = 'https://:domain/egvs/Forum/ForumService.svc/json/:method'.freeze

  CULTURE_MAP = {1 => :en, 2 => :de, 3 => :ru}.freeze

  # Class var with default value
  mattr_accessor(:service_domain)
  mattr_accessor(:security_token)
  mattr_accessor(:project_id)

  class Base

    HEADERS = {'User-Agent' => "Expo Sync", 'Content-Type' => 'application/json'}.freeze

    include ExpoSync::Helpers::PathBuilder
    extend ExpoSync::Helpers::ClassBuilder

    attr_reader :method
    attr_reader :response
    attr_reader :data
    attr_reader :last_update_param
    cattr_accessor(:date_field) { [] }

    def initialize(method, options = {})
      options.symbolize_keys!
      @delta = options.delete(:delta)
      @delta = {:key => @delta} if @delta.is_a? String
      @method = method
    end

    def fetch
      body = {}
      body[:securityToken] = ExpoSync.security_token<commit_msg>Fix attr<commit_after>require 'faraday'
require 'active_support/all'
require 'expo_sync/helpers/path_builder'
require 'expo_sync/helpers/class_builder'

module ExpoSync
  SERVICE_URL = 'https://:domain/egvs/Forum/ForumService.svc/json/:method'.freeze

  CULTURE_MAP = {1 => :en, 2 => :de, 3 => :ru}.freeze

  # Class var with default value
  mattr_accessor(:service_domain)
  mattr_accessor(:security_token)
  mattr_accessor(:project_id)

  class Base

    HEADERS = {'User-Agent' => "Expo Sync", 'Content-Type' => 'application/json'}.freeze

    include ExpoSync::Helpers::PathBuilder
    extend ExpoSync::Helpers::ClassBuilder

    attr_reader :method
    attr_reader :response
    attr_reader :data
    attr_reader :last_update_param

    cattr_accessor(:date_fields) { [] }

    def initialize(method, options = {})
      options.symbolize_keys!
      @delta = options.delete(:delta)
      @delta = {:key => @delta} if @delta.is_a? String
      @method = method
    end

    def fetch
      body = {}
      body[:securityToken] = ExpoSync.security_token
{'fraction_non_alphanumeric': 0.12281530467642891, 'fraction_numerical': 0.002834199338686821, 'mean_word_length': 3.91415313225058, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '2446824', 'n_tokens_mistral': 719, 'n_tokens_neox': 703, 'n_words': 136}