Change package names zero->boot
* actuator -> boot-ops * cli -> boot-cli * launcher -> boot-load * autoconfig -> boot-config * bootstrap -> boot-strap * starters -> boot-up [#54095231] [bs-253] Refactor Zero->Boot
This commit is contained in:
@@ -0,0 +1,6 @@
|
||||
def run = { msg ->
|
||||
org.springframework.boot.cli.command.ScriptCommandTests.executed = true
|
||||
println "Hello ${msg}"
|
||||
}
|
||||
|
||||
run
|
||||
18
spring-boot-cli/src/test/resources/commands/command.groovy
Normal file
18
spring-boot-cli/src/test/resources/commands/command.groovy
Normal file
@@ -0,0 +1,18 @@
|
||||
package org.test.command
|
||||
|
||||
class TestCommand implements Command {
|
||||
|
||||
String name = "foo"
|
||||
|
||||
String description = "My script command"
|
||||
|
||||
String help = "No options"
|
||||
|
||||
String usageHelp = "Not very useful"
|
||||
|
||||
void run(String... args) {
|
||||
org.springframework.boot.cli.command.ScriptCommandTests.executed = true
|
||||
println "Hello ${args[0]}"
|
||||
}
|
||||
|
||||
}
|
||||
19
spring-boot-cli/src/test/resources/commands/handler.groovy
Normal file
19
spring-boot-cli/src/test/resources/commands/handler.groovy
Normal file
@@ -0,0 +1,19 @@
|
||||
package org.test.command
|
||||
|
||||
@Grab("org.eclipse.jgit:org.eclipse.jgit:2.3.1.201302201838-r")
|
||||
import org.eclipse.jgit.api.Git
|
||||
|
||||
class TestCommand extends OptionHandler {
|
||||
|
||||
void options() {
|
||||
option "foo", "Foo set"
|
||||
}
|
||||
|
||||
void run(OptionSet options) {
|
||||
// Demonstrate use of Grape.grab to load dependencies before running
|
||||
println "Clean : " + Git.open(".." as File).status().call().isClean()
|
||||
org.springframework.boot.cli.command.ScriptCommandTests.executed = true
|
||||
println "Hello ${options.nonOptionArguments()}: ${options.has('foo')}"
|
||||
}
|
||||
|
||||
}
|
||||
6
spring-boot-cli/src/test/resources/commands/mixin.groovy
Normal file
6
spring-boot-cli/src/test/resources/commands/mixin.groovy
Normal file
@@ -0,0 +1,6 @@
|
||||
void options() {
|
||||
option "foo", "Foo set"
|
||||
}
|
||||
|
||||
org.springframework.boot.cli.command.ScriptCommandTests.executed = true
|
||||
println "Hello ${options.nonOptionArguments()}: ${options.has('foo')}"
|
||||
11
spring-boot-cli/src/test/resources/commands/runnable.groovy
Normal file
11
spring-boot-cli/src/test/resources/commands/runnable.groovy
Normal file
@@ -0,0 +1,11 @@
|
||||
class TestCommand implements Runnable {
|
||||
def msg
|
||||
TestCommand(String msg) {
|
||||
this.msg = msg
|
||||
}
|
||||
void run() {
|
||||
org.springframework.boot.cli.command.ScriptCommandTests.executed = true
|
||||
println "Hello ${msg}"
|
||||
}
|
||||
}
|
||||
new TestCommand(args[0])
|
||||
@@ -0,0 +1 @@
|
||||
println "Hello ${args[0]}"
|
||||
7
spring-boot-cli/src/test/resources/commands/test.groovy
Normal file
7
spring-boot-cli/src/test/resources/commands/test.groovy
Normal file
@@ -0,0 +1,7 @@
|
||||
options {
|
||||
option "foo", "Foo set"
|
||||
option "bar", "Bar has an argument of type int" withOptionalArg() ofType Integer
|
||||
}
|
||||
|
||||
org.springframework.boot.cli.command.ScriptCommandTests.executed = true
|
||||
println "Hello ${options.nonOptionArguments()}: ${options.has('foo')} ${options.valueOf('bar')}"
|
||||
19
spring-boot-cli/src/test/resources/logback.xml
Normal file
19
spring-boot-cli/src/test/resources/logback.xml
Normal file
@@ -0,0 +1,19 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration>
|
||||
<property name="CONSOLE_LOG_PATTERN" value="%d{yyyy-MM-dd HH:mm:ss.SSS} %5p ${PID:- } [%t] --- %-40.40logger{39} : %m%n%wex"/>
|
||||
|
||||
<conversionRule conversionWord="wex" converterClass="org.springframework.bootstrap.logging.logback.WhitespaceThrowableProxyConverter" />
|
||||
|
||||
<appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>${CONSOLE_LOG_PATTERN}</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<root level="INFO">
|
||||
<appender-ref ref="CONSOLE" />
|
||||
</root>
|
||||
|
||||
<!-- logger name="org.springframework" level="DEBUG"/-->
|
||||
|
||||
</configuration>
|
||||
11
spring-boot-cli/src/test/resources/static/css/bootstrap.min.css
vendored
Normal file
11
spring-boot-cli/src/test/resources/static/css/bootstrap.min.css
vendored
Normal file
File diff suppressed because one or more lines are too long
25
spring-boot-cli/src/test/resources/templates/home.html
Normal file
25
spring-boot-cli/src/test/resources/templates/home.html
Normal file
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html xmlns:th="http://www.thymeleaf.org">
|
||||
<head>
|
||||
<title th:text="${title}">Title</title>
|
||||
<link rel="stylesheet" th:href="@{/resources/css/bootstrap.min.css}"
|
||||
href="../../resources/css/bootstrap.min.css" />
|
||||
</head>
|
||||
<body>
|
||||
<div class="container">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand" href="http://www.thymeleaf.org"> Thymeleaf -
|
||||
Plain </a>
|
||||
<ul class="nav">
|
||||
<li><a th:href="@{/}" href="home.html"> Home </a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<h1 th:text="${title}">Title</h1>
|
||||
<div th:text="${message}">Fake content</div>
|
||||
<div id="created" th:text="${#dates.format(date)}">July 11,
|
||||
2012 2:17:16 PM CDT</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
1
spring-boot-cli/src/test/resources/templates/test.txt
Normal file
1
spring-boot-cli/src/test/resources/templates/test.txt
Normal file
@@ -0,0 +1 @@
|
||||
Hello ${message}!
|
||||
Reference in New Issue
Block a user