From 54e1b5b4853b90d169903413ae7e31c9dba4f47f Mon Sep 17 00:00:00 2001 From: Pierre Millot Date: Wed, 9 Oct 2024 12:40:44 +0200 Subject: [PATCH] fix(ruby): prefix models by the module (#3927) --- templates/ruby/tests/client/benchmark.mustache | 1 - templates/ruby/tests/client/client.mustache | 1 - templates/ruby/tests/e2e/e2e.mustache | 1 - templates/ruby/tests/generateInnerParams.mustache | 2 +- templates/ruby/tests/requests/requests.mustache | 1 - 5 files changed, 1 insertion(+), 5 deletions(-) diff --git a/templates/ruby/tests/client/benchmark.mustache b/templates/ruby/tests/client/benchmark.mustache index 0c50457bf6..31a6a2ada3 100644 --- a/templates/ruby/tests/client/benchmark.mustache +++ b/templates/ruby/tests/client/benchmark.mustache @@ -3,7 +3,6 @@ require 'algolia' require 'test/unit' class BenchmarkClient{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}} < Test::Unit::TestCase - include Algolia::{{{modelModule}}} {{#blocksBenchmark}} {{> tests/client/tests}} {{/blocksBenchmark}} diff --git a/templates/ruby/tests/client/client.mustache b/templates/ruby/tests/client/client.mustache index 37ca7de1f6..12504f9f41 100644 --- a/templates/ruby/tests/client/client.mustache +++ b/templates/ruby/tests/client/client.mustache @@ -3,7 +3,6 @@ require 'algolia' require 'test/unit' class TestClient{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}} < Test::Unit::TestCase - include Algolia::{{{modelModule}}} {{#blocksClient}} {{> tests/client/tests}} {{/blocksClient}} diff --git a/templates/ruby/tests/e2e/e2e.mustache b/templates/ruby/tests/e2e/e2e.mustache index 6c1b217e86..5b4880740e 100644 --- a/templates/ruby/tests/e2e/e2e.mustache +++ b/templates/ruby/tests/e2e/e2e.mustache @@ -7,7 +7,6 @@ require_relative '../helpers' Dotenv.load('../../.env') class Test{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}E2E < Test::Unit::TestCase - include Algolia::{{{modelModule}}} def setup @client = Algolia::{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}.create( ENV.fetch('ALGOLIA_APPLICATION_ID', nil), diff --git a/templates/ruby/tests/generateInnerParams.mustache b/templates/ruby/tests/generateInnerParams.mustache index a5c415a461..baa4d75522 100644 --- a/templates/ruby/tests/generateInnerParams.mustache +++ b/templates/ruby/tests/generateInnerParams.mustache @@ -1 +1 @@ -{{#isNull}}nil {{/isNull}}{{#isVerbatim}}{{{value}}}{{/isVerbatim}}{{#isString}}"{{{value}}}" {{/isString}}{{#isInteger}}{{{value}}} {{/isInteger}}{{#isLong}}{{{value}}} {{/isLong}}{{#isDouble}}{{{value}}} {{/isDouble}}{{#isBoolean}}{{{value}}} {{/isBoolean}} {{#isEnum}}'{{{value}}}' {{/isEnum}}{{#isArray}} [ {{#value}}{{> tests/generateParams}}{{/value}} ] {{/isArray}}{{#isObject}} {{{objectName}}}.new({{#value}}{{> tests/generateParams}}{{/value}}) {{/isObject}}{{#isFreeFormObject}} {{#isAnyType}} { {{#value}}{{#entrySet}}'{{{key}}}':"{{{value}}}"{{^-last}},{{/-last}}{{/entrySet}}{{/value}} } {{/isAnyType}} {{^isAnyType}} { {{#value}}{{> tests/generateParams}}{{/value}} } {{/isAnyType}} {{/isFreeFormObject}} \ No newline at end of file +{{#isNull}}nil {{/isNull}}{{#isVerbatim}}{{{value}}}{{/isVerbatim}}{{#isString}}"{{{value}}}" {{/isString}}{{#isInteger}}{{{value}}} {{/isInteger}}{{#isLong}}{{{value}}} {{/isLong}}{{#isDouble}}{{{value}}} {{/isDouble}}{{#isBoolean}}{{{value}}} {{/isBoolean}} {{#isEnum}}'{{{value}}}' {{/isEnum}}{{#isArray}} [ {{#value}}{{> tests/generateParams}}{{/value}} ] {{/isArray}}{{#isObject}} Algolia::{{{modelModule}}}::{{{objectName}}}.new({{#value}}{{> tests/generateParams}}{{/value}}) {{/isObject}}{{#isFreeFormObject}} {{#isAnyType}} { {{#value}}{{#entrySet}}'{{{key}}}':"{{{value}}}"{{^-last}},{{/-last}}{{/entrySet}}{{/value}} } {{/isAnyType}} {{^isAnyType}} { {{#value}}{{> tests/generateParams}}{{/value}} } {{/isAnyType}} {{/isFreeFormObject}} \ No newline at end of file diff --git a/templates/ruby/tests/requests/requests.mustache b/templates/ruby/tests/requests/requests.mustache index 7de531a130..9ef1d7808a 100644 --- a/templates/ruby/tests/requests/requests.mustache +++ b/templates/ruby/tests/requests/requests.mustache @@ -3,7 +3,6 @@ require 'algolia' require 'test/unit' class Test{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}} < Test::Unit::TestCase - include Algolia::{{{modelModule}}} def setup @client = Algolia::{{#lambda.pascalcase}}{{{client}}}{{/lambda.pascalcase}}.create( 'APP_ID',