diff --git a/README.md b/README.md index 8c371ee..ef58fa6 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Use the following dependency in your code. <dependency> <groupId>io.appform.hope</groupId> <artifactId>hope-lang</artifactId> - <version>2.0.5</version> + <version>2.0.6</version> </dependency> ``` diff --git a/dependencies.txt b/dependencies.txt index b72c279..d1003b3 100644 --- a/dependencies.txt +++ b/dependencies.txt @@ -1,4 +1,4 @@ -io.appform.hope:hope:pom:2.0.5 +io.appform.hope:hope:pom:2.0.6 +- org.openjdk.jmh:jmh-core:jar:1.35:test | +- net.sf.jopt-simple:jopt-simple:jar:5.0.4:test | \- org.apache.commons:commons-math3:jar:3.2:test diff --git a/hope-core/dependencies.txt b/hope-core/dependencies.txt index 851b79e..c5d05b6 100644 --- a/hope-core/dependencies.txt +++ b/hope-core/dependencies.txt @@ -1,4 +1,4 @@ -io.appform.hope:hope-core:jar:2.0.5 +io.appform.hope:hope-core:jar:2.0.6 +- org.reflections:reflections:jar:0.9.12:compile | \- org.javassist:javassist:jar:3.26.0-GA:compile +- org.openjdk.jmh:jmh-core:jar:1.35:test diff --git a/hope-core/dependency-reduced-pom.xml b/hope-core/dependency-reduced-pom.xml index 3fd6830..2e6d1d5 100644 --- a/hope-core/dependency-reduced-pom.xml +++ b/hope-core/dependency-reduced-pom.xml @@ -3,7 +3,7 @@ <parent> <artifactId>hope</artifactId> <groupId>io.appform.hope</groupId> - <version>2.0.5</version> + <version>2.0.6</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>hope-core</artifactId> diff --git a/hope-core/pom.xml b/hope-core/pom.xml index 2f9e14c..55c9ab0 100644 --- a/hope-core/pom.xml +++ b/hope-core/pom.xml @@ -5,7 +5,7 @@ <parent> <artifactId>hope</artifactId> <groupId>io.appform.hope</groupId> - <version>2.0.5</version> + <version>2.0.6</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/hope-core/src/main/java/io/appform/hope/core/values/NumericValue.java b/hope-core/src/main/java/io/appform/hope/core/values/NumericValue.java index ce696e6..bd094c4 100644 --- a/hope-core/src/main/java/io/appform/hope/core/values/NumericValue.java +++ b/hope-core/src/main/java/io/appform/hope/core/values/NumericValue.java @@ -31,7 +31,7 @@ public class NumericValue extends EvaluatableValue<Number> { * @param value Number value */ public NumericValue(Number value) { - super(value); + super(value.doubleValue()); } /** diff --git a/hope-lang/dependencies.txt b/hope-lang/dependencies.txt index 24025ed..4a449c7 100644 --- a/hope-lang/dependencies.txt +++ b/hope-lang/dependencies.txt @@ -1,5 +1,5 @@ -io.appform.hope:hope-lang:jar:2.0.5 -+- io.appform.hope:hope-core:jar:2.0.5:compile +io.appform.hope:hope-lang:jar:2.0.6 ++- io.appform.hope:hope-core:jar:2.0.6:compile | \- org.reflections:reflections:jar:0.9.12:compile | \- org.javassist:javassist:jar:3.26.0-GA:compile +- ch.qos.logback:logback-classic:jar:1.2.10:test diff --git a/hope-lang/pom.xml b/hope-lang/pom.xml index 00a697c..3681d90 100644 --- a/hope-lang/pom.xml +++ b/hope-lang/pom.xml @@ -5,7 +5,7 @@ <parent> <artifactId>hope</artifactId> <groupId>io.appform.hope</groupId> - <version>2.0.5</version> + <version>2.0.6</version> </parent> <modelVersion>4.0.0</modelVersion> diff --git a/hope-lang/src/test/java/io/appform/hope/lang/LibraryFunctionsTest.java b/hope-lang/src/test/java/io/appform/hope/lang/LibraryFunctionsTest.java index fb60aad..e9e4f4f 100644 --- a/hope-lang/src/test/java/io/appform/hope/lang/LibraryFunctionsTest.java +++ b/hope-lang/src/test/java/io/appform/hope/lang/LibraryFunctionsTest.java @@ -258,7 +258,8 @@ private static Stream<Arguments> rules() { Arguments.of("{}", "(math.abs(math.sub(date.week_of_month(), %d)) <= 1 && math.abs(math.sub(date.week_of_month(), %d)) >= 0) || (math.abs(math.sub(date.week_of_month(), %d)) <= 6 && math.abs(math.sub(date.week_of_month(), %d)) >= 3)".formatted(weekOfMonth, weekOfMonth, weekOfMonth, weekOfMonth), true), Arguments.of("{}", "(math.abs(math.sub(date.week_of_year(), %d)) <= 1 && math.abs(math.sub(date.week_of_year(), %d)) >= 0) || (math.abs(math.sub(date.week_of_year(), %d)) <= 54 && math.abs(math.sub(date.week_of_year(), %d)) >= 51)".formatted(weekOfYear, weekOfYear, weekOfYear, weekOfYear), true), Arguments.of("{}", "(math.abs(math.sub(date.month_of_year(), %d)) <= 1 && math.abs(math.sub(date.month_of_year(), %d)) >= 0) || (math.abs(math.sub(date.month_of_year(), %d)) <= 12 && math.abs(math.sub(date.month_of_year(), %d)) >= 11)".formatted(dateTime.getMonth().getValue(), dateTime.getMonth().getValue(), dateTime.getMonth().getValue(), dateTime.getMonth().getValue()), true), - Arguments.of("{}", "(math.abs(math.sub(date.year(), %d)) <= 1 && math.abs(math.sub(date.year(), %d)) >= 0)".formatted(dateTime.getYear(), dateTime.getYear()), true) + Arguments.of("{}", "(math.abs(math.sub(date.year(), %d)) <= 1 && math.abs(math.sub(date.year(), %d)) >= 0)".formatted(dateTime.getYear(), dateTime.getYear()), true), + Arguments.of("{}", "date.week_of_month() == 1 || date.week_of_month() == 2 || date.week_of_month() == 3 || date.week_of_month() == 4 || date.week_of_month() == 5", true) ); } diff --git a/pom.xml b/pom.xml index b2e7606..db67f49 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ <groupId>io.appform.hope</groupId> <artifactId>hope</artifactId> <packaging>pom</packaging> - <version>2.0.5</version> + <version>2.0.6</version> <name>Hope</name> <url>https://github.com/santanusinha/hope</url>