Sha256: 17f3273bbb33fc5f408cdf7d7b2498326405f6318183f085364f9c4181ea7568

Contents?: true

Size: 615 Bytes

Versions: 25

Compression:

Stored size: 615 Bytes

Contents

module Eco::API::UseCases::GraphQL::Helpers
  module Base
    require_relative 'base/case_env'
    require_relative 'base/graphql_env'

    include CaseEnv
    include GraphQLEnv

    private

    # Keep a copy of the requests/responses for future reference
    def backup(data, type:)
      dry_run   = simulate? ? "_dry_run" : ""
      dir       = config.people.requests_folder
      file      = File.join(dir, "#{type}#{dry_run}.json")
      session.file_manager.save_json(data, file, :timestamp)
    end

    def exit_error(msg)
      log(:error) { msg }
      exit(1)
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
eco-helpers-3.0.6 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-3.0.5 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-3.0.4 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-3.0.3 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-3.0.2 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-3.0.1 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-3.0.0 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.25 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.24 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.23 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.22 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.21 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.20 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.19 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.18 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.17 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.16 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.15 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.14 lib/eco/api/usecases/graphql/helpers/base.rb
eco-helpers-2.7.13 lib/eco/api/usecases/graphql/helpers/base.rb