Sha256: 5f3061c3c252abd2748760a4db5099b7cb063702f5f9aeacf3bcd2c18b3e1fc6

Contents?: true

Size: 961 Bytes

Versions: 29

Compression:

Stored size: 961 Bytes

Contents

class Eco::API::UseCases::DefaultCases::TagTree < Eco::API::Common::Loaders::UseCase
  name "tagtree"
  type :other

  attr_reader :session, :options
  def main(session, options, usecase)
    puts "Use case still in development"
    exit
    options[:end_get] = false
    @session = session; @options = options
    operations.keys.each do |key|
      process(key)
    end
  end

  def process(key)
    case key
    when :diff
      require_graphql_auth!

    when :show_backend
      require_graphql_auth!

    else
      logger.warn("Operation #{key} not supported")
    end
  end

  private

  def require_graphql_auth!
    unless session.config.api.version_available?(:graphql)
      logger.error("Missing parameters for to configure a GraphQL connexion.")
    end
  end

  def operations
    (options.dig(:tagtree, :operations) || {})
  end

  def graphql
   @graphql ||= session.api(version: :graphql)
  end
end

Version data entries

29 entries across 29 versions & 1 rubygems

Version Path
eco-helpers-2.5.2 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.5.1 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.9 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.8 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.7 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.6 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.5 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.4 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.3 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.4.2 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.3.3 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.3.2 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.2.5 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.2.4 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.2.3 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.2.2 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.2.1 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.1.12 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.1.11 lib/eco/api/usecases/default_cases/tagtree_case.rb
eco-helpers-2.1.10 lib/eco/api/usecases/default_cases/tagtree_case.rb