Class: Decidim::BulletinBoard::FileClient

Inherits:
Client
  • Object
show all
Defined in:
lib/decidim/bulletin_board/file_client.rb

Overview

Client to store GraphQL requests to a CSV file instead of sending them to the BulletinBoard It is intended to be used for load testing

Instance Method Summary collapse

Methods inherited from Client

#cast_vote, #create_election, #end_vote, #get_election_results, #get_election_status, #get_pending_message_status, #in_person_vote, #publish_results, #report_missing_trustee, #reset_test_database, #start_key_ceremony, #start_tally, #start_vote

Constructor Details

#initialize(file_path, config = Decidim::BulletinBoard) ⇒ FileClient

Returns a new instance of FileClient.



8
9
10
11
# File 'lib/decidim/bulletin_board/file_client.rb', line 8

def initialize(file_path, config = Decidim::BulletinBoard)
  @settings = Settings.new(config)
  @graphql = Graphql::Factory.client_for_file(settings, file_path)
end