Skip to content

Commit

Permalink
Update pebble
Browse files Browse the repository at this point in the history
Signed-off-by: Paulo Lopes <[email protected]>
  • Loading branch information
pmlopes committed Mar 8, 2023
1 parent 2177b1e commit 9f43f87
Show file tree
Hide file tree
Showing 8 changed files with 24 additions and 25 deletions.
2 changes: 1 addition & 1 deletion vertx-template-engines/vertx-web-templ-pebble/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
<dependency>
<groupId>io.pebbletemplates</groupId>
<artifactId>pebble</artifactId>
<version>3.1.5</version>
<version>3.2.0</version>
<exclusions>
<exclusion>
<groupId>org.slf4j</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.vertx.ext.web.templ.pebble;

import com.mitchellbosecke.pebble.PebbleEngine;
import io.pebbletemplates.pebble.PebbleEngine;
import io.vertx.codegen.annotations.GenIgnore;
import io.vertx.codegen.annotations.VertxGen;
import io.vertx.core.Vertx;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package io.vertx.ext.web.templ.pebble.impl;

import com.mitchellbosecke.pebble.PebbleEngine;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
import io.pebbletemplates.pebble.PebbleEngine;
import io.pebbletemplates.pebble.template.PebbleTemplate;
import io.vertx.core.AsyncResult;
import io.vertx.core.Future;
import io.vertx.core.Handler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,24 +16,23 @@

package io.vertx.ext.web.templ.pebble.impl;

import com.mitchellbosecke.pebble.attributes.AttributeResolver;
import com.mitchellbosecke.pebble.attributes.ResolvedAttribute;
import com.mitchellbosecke.pebble.error.AttributeNotFoundException;
import com.mitchellbosecke.pebble.node.ArgumentsNode;
import com.mitchellbosecke.pebble.template.EvaluationContextImpl;

import io.pebbletemplates.pebble.attributes.AttributeResolver;
import io.pebbletemplates.pebble.attributes.ResolvedAttribute;
import io.pebbletemplates.pebble.error.AttributeNotFoundException;
import io.pebbletemplates.pebble.node.ArgumentsNode;
import io.pebbletemplates.pebble.template.EvaluationContextImpl;
import io.vertx.core.json.JsonArray;
import io.vertx.core.json.JsonObject;

/**
* @author Nicola Murino <nicola dot murino at gmail.com>
* @author Nicola Murino <nicola dot murino at gmail.com>
*/

class PebbleVertxAttributeResolver implements AttributeResolver {

@Override
public ResolvedAttribute resolve(Object instance, Object attributeNameValue, Object[] argumentValues,
ArgumentsNode args, EvaluationContextImpl context, String filename, int lineNumber) {
ArgumentsNode args, EvaluationContextImpl context, String filename, int lineNumber) {

if (instance instanceof JsonObject) {
ResolvedAttribute resolvedAttribute = new ResolvedAttribute(null);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* Copyright 2019 Red Hat, Inc.
* Copyright 2019 Red Hat, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
Expand All @@ -16,14 +16,14 @@

package io.vertx.ext.web.templ.pebble.impl;

import io.pebbletemplates.pebble.attributes.AttributeResolver;
import io.pebbletemplates.pebble.extension.AbstractExtension;

import java.util.ArrayList;
import java.util.List;

import com.mitchellbosecke.pebble.attributes.AttributeResolver;
import com.mitchellbosecke.pebble.extension.AbstractExtension;

/**
* @author Nicola Murino <nicola dot murino at gmail.com>
* @author Nicola Murino <nicola dot murino at gmail.com>
*/

class PebbleVertxExtension extends AbstractExtension {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
*/
package io.vertx.ext.web.templ.pebble.impl;

import com.mitchellbosecke.pebble.error.LoaderException;
import com.mitchellbosecke.pebble.loader.Loader;
import io.pebbletemplates.pebble.error.LoaderException;
import io.pebbletemplates.pebble.loader.Loader;
import io.vertx.core.Vertx;

import java.io.File;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@

package io.vertx.ext.web.templ;

import com.mitchellbosecke.pebble.PebbleEngine;
import io.pebbletemplates.pebble.PebbleEngine;
import io.vertx.core.Vertx;
import io.vertx.core.VertxOptions;
import io.vertx.core.file.FileSystemOptions;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
package io.vertx.ext.web.templ.extension;

import com.mitchellbosecke.pebble.extension.AbstractExtension;
import com.mitchellbosecke.pebble.extension.Function;
import com.mitchellbosecke.pebble.template.EvaluationContext;
import com.mitchellbosecke.pebble.template.PebbleTemplate;
import io.pebbletemplates.pebble.extension.AbstractExtension;
import io.pebbletemplates.pebble.extension.Function;
import io.pebbletemplates.pebble.template.EvaluationContext;
import io.pebbletemplates.pebble.template.PebbleTemplate;

import java.util.Collections;
import java.util.List;
Expand All @@ -19,7 +19,7 @@ public Map<String, Function> getFunctions() {
return Collections.singletonMap("createString", new CreateStringFunction());
}

class CreateStringFunction implements Function {
static class CreateStringFunction implements Function {

@Override
public Object execute(Map<String, Object> map, PebbleTemplate pebbleTemplate, EvaluationContext evaluationContext, int i) {
Expand Down

0 comments on commit 9f43f87

Please sign in to comment.