-
Notifications
You must be signed in to change notification settings - Fork 39
500, adding entry point to inspect command #528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
ErnestMatskevich
wants to merge
30
commits into
objectionary:master
Choose a base branch
from
ErnestMatskevich:500
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
30 commits
Select commit
Hold shift + click to select a range
3b8b2b5
feat: add inspection server with akes framework
ErnestMatskevich 3641685
Update pom.xml
ErnestMatskevich 9cb76ee
Add unit test and qulice
ErnestMatskevich a22a974
add license in package-info.java
ErnestMatskevich 1cf9618
Merge branch 'objectionary:master' into 500
ErnestMatskevich f649742
Add simple test for Inspect.java
ErnestMatskevich 642cbea
Merge branch 'master' into 500
ErnestMatskevich dd74c55
Add profile to creating inspect.jar file
ErnestMatskevich 9097c93
Merge branch 'master' into 500
ErnestMatskevich 5e205ea
fix: add missing comma in package.json
ErnestMatskevich 934ca18
Merge branch 'objectionary:master' into 500
ErnestMatskevich e9382b5
Added asserts to test
ErnestMatskevich 057fee3
Update pom.xml
ErnestMatskevich 314b44d
Rename variables in inspect.js
ErnestMatskevich 59df1e8
fix: use object shorthand in test_inspect.js
ErnestMatskevich 9091b4b
Rewrite InspectTest with proper waiting
ErnestMatskevich 969012b
Update Inspect.java
ErnestMatskevich 3e593de
Build inspect.jar once with Maven package
ErnestMatskevich 9f5edf8
Clean up InspectTest.java
ErnestMatskevich 0a74e73
Merge branch 'master' into 500
ErnestMatskevich b6fca8b
Update package-lock.json
ErnestMatskevich cb7bcfa
Update pom.xml
ErnestMatskevich ca58081
Update pom.xml
ErnestMatskevich 5be56ca
Update pom.xml
ErnestMatskevich e0d206d
Merge branch 'master' into 500
ErnestMatskevich 5e873e8
Remove empty lines in inspect.js
ErnestMatskevich 956fa4f
Create new top-level folder inspect
ErnestMatskevich b33189f
Remove InspectTest.java
ErnestMatskevich d6992f9
Add puzzle in inspect.js
ErnestMatskevich 56a4e0b
Update inspect.js
ErnestMatskevich File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| <!-- | ||
| * SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com | ||
| * SPDX-License-Identifier: MIT | ||
| --> | ||
| <assembly xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2" | ||
| xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
| xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.2 | ||
| http://maven.apache.org/xsd/assembly-1.1.2.xsd"> | ||
| <id>inspect</id> | ||
| <formats> | ||
| <format>jar</format> | ||
| </formats> | ||
| <includeBaseDirectory>false</includeBaseDirectory> | ||
| <fileSets> | ||
| <fileSet> | ||
| <directory>${project.build.outputDirectory}</directory> | ||
| <includes> | ||
| <include>org/eolang/Inspect.class</include> | ||
| <include>org/eolang/Inspect$*.class</include> | ||
| <include>org/eolang/package-info.class</include> | ||
| </includes> | ||
| <outputDirectory>/</outputDirectory> | ||
| </fileSet> | ||
| </fileSets> | ||
| <dependencySets> | ||
| <dependencySet> | ||
| <scope>compile</scope> | ||
| <useProjectArtifact>false</useProjectArtifact> | ||
| <unpack>true</unpack> | ||
| <useTransitiveDependencies>true</useTransitiveDependencies> | ||
| <useTransitiveFiltering>false</useTransitiveFiltering> | ||
| <includes> | ||
| <include>org.takes:takes</include> | ||
| <include>org.cactoos:cactoos</include> | ||
| </includes> | ||
| <outputDirectory>/</outputDirectory> | ||
| </dependencySet> | ||
| </dependencySets> | ||
| </assembly> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,49 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com | ||
| * SPDX-License-Identifier: MIT | ||
| */ | ||
| package org.eolang; | ||
|
|
||
| import java.io.IOException; | ||
| import org.takes.Request; | ||
| import org.takes.Response; | ||
| import org.takes.Take; | ||
| import org.takes.facets.fork.FkRegex; | ||
| import org.takes.facets.fork.TkFork; | ||
| import org.takes.http.FtBasic; | ||
| import org.takes.rq.RqPrint; | ||
| import org.takes.rs.RsText; | ||
|
|
||
| /** | ||
| * HTTP inspection server. | ||
| * @since 0.29.0 | ||
| */ | ||
| public final class Inspect { | ||
| /** | ||
| * Prevents instantiation (required by qulice UseUtilityClass rule). | ||
| */ | ||
| private Inspect() { | ||
| // Intentionally empty | ||
| } | ||
|
|
||
| /** | ||
| * Main entry point. | ||
| * @param args Command line arguments | ||
| * @throws IOException If server fails to start | ||
| */ | ||
| public static void main(final String... args) throws IOException { | ||
| new FtBasic( | ||
| new TkFork( | ||
| new FkRegex( | ||
| "/echo", | ||
| (Take) req -> new RsText(new RqPrint(req).printBody()) | ||
| ), | ||
| new FkRegex( | ||
| "/", | ||
| new RsText("Server is running. Use /echo endpoint") | ||
| ) | ||
| ), | ||
| 8080 | ||
| ).start(() -> Thread.currentThread().isInterrupted()); | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com | ||
| * SPDX-License-Identifier: MIT | ||
| */ | ||
|
|
||
| /** | ||
| * EO inspection utilities. | ||
| * Includes HTTP server for testing (under developing). | ||
| * @since 0.29.0 | ||
| */ | ||
| package org.eolang; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /* | ||
| * SPDX-FileCopyrightText: Copyright (c) 2022-2025 Objectionary.com | ||
| * SPDX-License-Identifier: MIT | ||
| */ | ||
|
|
||
| /** | ||
| * Unit tests for Inspect server. | ||
| * @since 0.29.0 | ||
| */ | ||
| package org.eolang; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ErnestMatskevich I can't find the place in the code where you use this Maven profile. Can you give me a link, please?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ErnestMatskevich What about this one?