Skip to content

Commit

Permalink
Merge branch 'master' of github.com:yegor256/takes into use_sticky_de…
Browse files Browse the repository at this point in the history
…corator
  • Loading branch information
baudoliver7 committed Nov 30, 2021
2 parents a447b83 + c031d76 commit 7ac0f72
Show file tree
Hide file tree
Showing 119 changed files with 1,865 additions and 1,459 deletions.
12 changes: 4 additions & 8 deletions .rultor.yml
@@ -1,28 +1,26 @@
docker:
image: yegor256/rultor-image:1.3
assets:
settings.xml: yegor256/home#assets/takes/settings.xml
pubring.gpg: yegor256/home#assets/pubring.gpg
secring.gpg: yegor256/home#assets/secring.gpg
s3cfg: yegor256/home#assets/s3cfg
env:
MAVEN_OPTS: -XX:MaxPermSize=256m -Xmx1g
JAVA_OPTS: -XX:MaxPermSize=256m -Xmx1g
decrypt:
curl-appveyor.cfg: repo/curl-appveyor.cfg.asc
architect:
- paulodamaso
- yegor256
install: |
sudo update-java-alternatives -s java-1.8.0-openjdk-amd64
export LC_ALL=en_US.UTF-8
export LANG=en_US.UTF-8
export LANGUAGE=en_US.UTF-8
merge:
script: |
pdd --source=$(pwd) --verbose --file=/dev/null
mvn clean install -Pqulice --errors --settings ../settings.xml
mvn clean site -Psite --errors --settings ../settings.xml
pdd --source=$(pwd) --verbose --file=/dev/null
deploy:
script: |
sudo gem install --no-rdoc --no-ri est
version=$(curl -K ../curl-appveyor.cfg --data "{accountName: 'yegor256', projectSlug: 'takes', branch: 'master'}" https://ci.appveyor.com/api/builds | jq -r '.version')
while true
do status=$(curl -K ../curl-appveyor.cfg https://ci.appveyor.com/api/projects/yegor256/takes/build/${version} | jq -r '.build.status')
Expand All @@ -34,8 +32,6 @@ deploy:
done
mvn clean deploy -Pqulice --errors --settings ../settings.xml
mvn clean
est --dir=./est --verbose --file=takes.xml --format=xml
s3cmd --no-progress put takes.xml --config=../s3cfg s3://est.teamed.io/takes.xml
release:
script: |-
mvn versions:set "-DnewVersion=${tag}"
Expand Down
117 changes: 63 additions & 54 deletions pom.xml
Expand Up @@ -27,14 +27,14 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.49.1</version>
<version>0.56.0</version>
</parent>
<groupId>org.takes</groupId>
<artifactId>takes</artifactId>
<version>2.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>take</name>
<description>Immutable Java Web Framework</description>
<name>takes</name>
<description>True Object-Oriented and Immutable Java Web Framework</description>
<url>https://github.com/yegor256/takes</url>
<inceptionYear>2015</inceptionYear>
<organization>
Expand All @@ -53,8 +53,8 @@ SOFTWARE.
<id>1</id>
<name>Yegor Bugayenko</name>
<email>yegor256@gmail.com</email>
<organization>Teamed.io</organization>
<organizationUrl>http://www.teamed.io</organizationUrl>
<organization>Zerocracy</organization>
<organizationUrl>https://www.zerocracy.com</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
Expand All @@ -74,7 +74,7 @@ SOFTWARE.
</scm>
<ciManagement>
<system>rultor</system>
<url>http://www.rultor.com/s/takes</url>
<url>https://www.rultor.com/s/takes</url>
</ciManagement>
<distributionManagement>
<site>
Expand All @@ -86,7 +86,6 @@ SOFTWARE.
<argLine/>
<timestamp>${maven.build.timestamp}</timestamp>
<jdk.version>1.8</jdk.version>
<qulice.version>0.18.19</qulice.version>
</properties>
<dependencies>
<!--
Expand All @@ -106,7 +105,7 @@ SOFTWARE.
https://github.com/yegor256/takes/pull/886#issuecomment-446030223
for details.
-->
<version>0.44</version>
<version>0.49</version>
</dependency>
<dependency>
<groupId>xml-apis</groupId>
Expand All @@ -127,7 +126,7 @@ SOFTWARE.
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-http</artifactId>
<version>1.17.1</version>
<version>1.17.7</version>
<optional>true</optional>
</dependency>
<dependency>
Expand All @@ -136,13 +135,15 @@ SOFTWARE.
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-core</artifactId>
<optional>true</optional>
<groupId>org.mockito</groupId>
<artifactId>mockito-junit-jupiter</artifactId>
<version>3.9.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hamcrest</groupId>
<artifactId>hamcrest-library</artifactId>
<artifactId>hamcrest</artifactId>
<version>2.2</version>
<optional>true</optional>
</dependency>
<dependency>
Expand All @@ -169,6 +170,7 @@ SOFTWARE.
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.22</version>
</dependency>
<dependency>
<groupId>org.glassfish.grizzly</groupId>
Expand All @@ -186,11 +188,6 @@ SOFTWARE.
<artifactId>commons-io</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.llorllale</groupId>
<artifactId>cactoos-matchers</artifactId>
Expand Down Expand Up @@ -224,11 +221,6 @@ SOFTWARE.
<version>9.7.0-7</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-validator</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.el</groupId>
<artifactId>javax.el-api</artifactId>
Expand Down Expand Up @@ -263,19 +255,13 @@ SOFTWARE.
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-api</artifactId>
<version>5.3.1</version>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter-engine</artifactId>
<version>5.3.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.junit.vintage</groupId>
<artifactId>junit-vintage-engine</artifactId>
<version>5.3.1</version>
<artifactId>junit-jupiter-params</artifactId>
<version>5.6.2</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -321,21 +307,20 @@ SOFTWARE.
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>-Djava.awt.headless=true -Dfile.encoding=UTF-8
-Duser.language=en -Duser.country=US ${argLine}
</argLine>
<!--
@todo #1110:1h There are 18 tests that fail now, mostly due to versions
upgrade (or an old Mockito version).
We must fix them ASAP and then remove the next line
-->
<testFailureIgnore>true</testFailureIgnore>
<argLine>-Djava.awt.headless=true -Dfile.encoding=UTF-8 -Duser.language=en -Duser.country=US ${argLine}</argLine>
<excludedGroups>org.takes.misc.PerformanceTests</excludedGroups>
<systemPropertyVariables>
<javax.net.ssl.keyStore>
${project.build.directory}/test-classes/org/takes/http/keystore
</javax.net.ssl.keyStore>
<javax.net.ssl.keyStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.keyStore>
<javax.net.ssl.keyStorePassword>abc123
</javax.net.ssl.keyStorePassword>
<javax.net.ssl.trustStore>
${project.build.directory}/test-classes/org/takes/http/keystore
</javax.net.ssl.trustStore>
<javax.net.ssl.trustStorePassword>abc123
</javax.net.ssl.trustStorePassword>
<javax.net.ssl.trustStore>${project.build.directory}/test-classes/org/takes/http/keystore</javax.net.ssl.trustStore>
<javax.net.ssl.trustStorePassword>abc123</javax.net.ssl.trustStorePassword>
</systemPropertyVariables>
</configuration>
</plugin>
Expand Down Expand Up @@ -363,7 +348,7 @@ SOFTWARE.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.0</version>
<version>3.8.1</version>
<configuration>
<source>${jdk.version}</source>
<target>${jdk.version}</target>
Expand All @@ -382,8 +367,7 @@ SOFTWARE.
<goal>verify</goal>
</goals>
<configuration>
<verificationFile>src/verifier/verifications.xml
</verificationFile>
<verificationFile>src/verifier/verifications.xml</verificationFile>
</configuration>
</execution>
</executions>
Expand Down Expand Up @@ -413,10 +397,10 @@ SOFTWARE.
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>${qulice.version}</version>
<configuration>
<excludes combine.children="append">
<exclude>checkstyle:/src/site/resources/.*</exclude>
<exclude>duplicatefinder:.*</exclude>
</excludes>
</configuration>
</plugin>
Expand Down Expand Up @@ -468,8 +452,7 @@ SOFTWARE.
<version>0.8.6</version>
<configuration>
<output>file</output>
<outputDirectory>${project.build.directory}/coverage
</outputDirectory>
<outputDirectory>${project.build.directory}/coverage</outputDirectory>
</configuration>
<executions>
<execution>
Expand All @@ -486,7 +469,7 @@ SOFTWARE.
<goal>report</goal>
</goals>
<!--
@todo #1067:30m This limits are set according to
@todo #1088:30m This limits are set according to
current metrics. Improve test coverage and
increase a limit, than update this task.
Remove this task when 0.99 is reached for each metric.
Expand All @@ -499,12 +482,12 @@ SOFTWARE.
<limit>
<counter>INSTRUCTION</counter>
<value>COVEREDRATIO</value>
<minimum>0.54</minimum>
<minimum>0.67</minimum>
</limit>
<limit>
<counter>LINE</counter>
<value>COVEREDRATIO</value>
<minimum>0.70</minimum>
<minimum>0.76</minimum>
</limit>
<limit>
<counter>BRANCH</counter>
Expand All @@ -514,12 +497,12 @@ SOFTWARE.
<limit>
<counter>COMPLEXITY</counter>
<value>COVEREDRATIO</value>
<minimum>0.40</minimum>
<minimum>0.52</minimum>
</limit>
<limit>
<counter>METHOD</counter>
<value>COVEREDRATIO</value>
<minimum>0.57</minimum>
<minimum>0.70</minimum>
</limit>
</limits>
</rule>
Expand All @@ -531,5 +514,31 @@ SOFTWARE.
</plugins>
</build>
</profile>
<profile>
<!-- https://stackoverflow.com/questions/52502189/java-11-package-javax-xml-bind-does-not-exist -->
<id>java-xml-bind</id>
<activation>
<jdk>[1.11,)</jdk>
</activation>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-core</artifactId>
<version>2.3.0</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.3.0</version>
<scope>runtime</scope>
</dependency>
</dependencies>
</profile>
</profiles>
</project>
7 changes: 4 additions & 3 deletions src/it/file-manager/pom.xml
Expand Up @@ -27,14 +27,14 @@ SOFTWARE.
<parent>
<groupId>com.jcabi</groupId>
<artifactId>parent</artifactId>
<version>0.40.1</version>
<version>0.49.1</version>
</parent>
<groupId>org.takes.test</groupId>
<artifactId>file-manager</artifactId>
<version>1.0-SNAPSHOT</version>
<properties>
<saxon.version>9.1.0.8</saxon.version>
<jdk.version>1.7</jdk.version>
<jdk.version>1.8</jdk.version>
</properties>
<dependencies>
<dependency>
Expand Down Expand Up @@ -70,6 +70,7 @@ SOFTWARE.
<dependency>
<groupId>com.jcabi</groupId>
<artifactId>jcabi-log</artifactId>
<version>0.20.1</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -209,7 +210,7 @@ SOFTWARE.
<plugin>
<groupId>com.qulice</groupId>
<artifactId>qulice-maven-plugin</artifactId>
<version>@qulice.version@</version>
<version>0.19.4</version>
</plugin>
</plugins>
</build>
Expand Down
Expand Up @@ -31,7 +31,7 @@
import java.io.IOException;
import java.net.HttpURLConnection;
import java.net.URI;
import org.apache.commons.io.FileUtils;
import java.nio.file.Files;
import org.junit.Rule;
import org.junit.Test;
import org.junit.rules.TemporaryFolder;
Expand All @@ -57,7 +57,7 @@ public final class AppTest {
@Test
public void justWorks() throws Exception {
final File dir = this.temp.newFolder();
FileUtils.write(new File(dir, "hello.txt"), "hello, world!");
Files.write(new File(dir, "hello.txt").toPath(), "hello, world!".getBytes());
new FtRemote(new App(dir)).exec(
new FtRemote.Script() {
@Override
Expand Down
6 changes: 3 additions & 3 deletions src/main/java/org/takes/facets/auth/PsCookie.java
Expand Up @@ -27,8 +27,8 @@
import java.util.Iterator;
import java.util.concurrent.TimeUnit;
import lombok.EqualsAndHashCode;
import org.cactoos.io.BytesOf;
import org.cactoos.io.UncheckedBytes;
import org.cactoos.bytes.BytesOf;
import org.cactoos.bytes.UncheckedBytes;
import org.cactoos.text.TextOf;
import org.takes.Request;
import org.takes.Response;
Expand Down Expand Up @@ -119,7 +119,7 @@ public Response exit(final Response res,
if (idt.equals(Identity.ANONYMOUS)) {
text = "";
} else {
text = new TextOf(this.codec.encode(idt)).asString();
text = new TextOf(this.codec.encode(idt)).toString();
}
return new RsWithCookie(
res, this.cookie, text,
Expand Down

0 comments on commit 7ac0f72

Please sign in to comment.