mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-12 00:15:44 +01:00
Merge with 2.0.0-m3
This commit is contained in:
14
pom.xml
14
pom.xml
@@ -409,8 +409,9 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>com.github.sdorra</groupId>
|
<groupId>com.github.sdorra</groupId>
|
||||||
<artifactId>buildfrontend-maven-plugin</artifactId>
|
<artifactId>buildfrontend-maven-plugin</artifactId>
|
||||||
<version>2.2.0</version>
|
<version>2.3.0</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
<plugin>
|
<plugin>
|
||||||
<groupId>org.apache.maven.plugins</groupId>
|
<groupId>org.apache.maven.plugins</groupId>
|
||||||
<artifactId>maven-javadoc-plugin</artifactId>
|
<artifactId>maven-javadoc-plugin</artifactId>
|
||||||
@@ -432,6 +433,12 @@
|
|||||||
<artifactId>enunciate-maven-plugin</artifactId>
|
<artifactId>enunciate-maven-plugin</artifactId>
|
||||||
<version>${enunciate.version}</version>
|
<version>${enunciate.version}</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>sonia.scm.maven</groupId>
|
||||||
|
<artifactId>smp-maven-plugin</artifactId>
|
||||||
|
<version>1.0.0-alpha-4</version>
|
||||||
|
</plugin>
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
|
|
||||||
@@ -837,8 +844,8 @@
|
|||||||
<guava.version>26.0-jre</guava.version>
|
<guava.version>26.0-jre</guava.version>
|
||||||
|
|
||||||
<!-- frontend -->
|
<!-- frontend -->
|
||||||
<nodejs.version>8.11.4</nodejs.version>
|
<nodejs.version>10.16.0</nodejs.version>
|
||||||
<yarn.version>1.9.4</yarn.version>
|
<yarn.version>1.16.0</yarn.version>
|
||||||
|
|
||||||
<!-- build properties -->
|
<!-- build properties -->
|
||||||
<project.build.javaLevel>1.8</project.build.javaLevel>
|
<project.build.javaLevel>1.8</project.build.javaLevel>
|
||||||
@@ -854,7 +861,6 @@
|
|||||||
<!-- *UserPassword JS files are excluded because extraction of common code would not make the code more readable -->
|
<!-- *UserPassword JS files are excluded because extraction of common code would not make the code more readable -->
|
||||||
<sonar.cpd.exclusions>**/*StoreFactory.java,**/*UserPassword.js</sonar.cpd.exclusions>
|
<sonar.cpd.exclusions>**/*StoreFactory.java,**/*UserPassword.js</sonar.cpd.exclusions>
|
||||||
|
|
||||||
<node.version>8.11.4</node.version>
|
|
||||||
<sonar.nodejs.executable>./scm-ui/target/frontend/buildfrontend-node/node-v${node.version}-linux-x64/bin/node</sonar.nodejs.executable>
|
<sonar.nodejs.executable>./scm-ui/target/frontend/buildfrontend-node/node-v${node.version}-linux-x64/bin/node</sonar.nodejs.executable>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -112,7 +112,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>sonia.scm.maven</groupId>
|
<groupId>sonia.scm.maven</groupId>
|
||||||
<artifactId>smp-maven-plugin</artifactId>
|
<artifactId>smp-maven-plugin</artifactId>
|
||||||
<version>1.0.0-alpha-3</version>
|
|
||||||
<extensions>true</extensions>
|
<extensions>true</extensions>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
|||||||
@@ -12,6 +12,6 @@
|
|||||||
"@scm-manager/ui-extensions": "^0.1.2"
|
"@scm-manager/ui-extensions": "^0.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-bundler": "^0.0.28"
|
"@scm-manager/ui-bundler": "^0.0.29"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "@scm-manager/scm-hg-plugin",
|
"name": "@scm-manager/scm-hg-plugin",
|
||||||
"main": "src/main/js/index.js",
|
"main": "src/main/js/index.js",
|
||||||
"license" : "BSD-3-Clause",
|
"license": "BSD-3-Clause",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "ui-bundler plugin"
|
"build": "ui-bundler plugin"
|
||||||
},
|
},
|
||||||
@@ -9,6 +9,6 @@
|
|||||||
"@scm-manager/ui-extensions": "^0.1.2"
|
"@scm-manager/ui-extensions": "^0.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-bundler": "^0.0.28"
|
"@scm-manager/ui-bundler": "^0.0.29"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -9,6 +9,6 @@
|
|||||||
"@scm-manager/ui-extensions": "^0.1.2"
|
"@scm-manager/ui-extensions": "^0.1.2"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-bundler": "^0.0.28"
|
"@scm-manager/ui-bundler": "^0.0.29"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
"eslint-fix": "eslint src --fix"
|
"eslint-fix": "eslint src --fix"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-bundler": "^0.0.28",
|
"@scm-manager/ui-bundler": "^0.0.29",
|
||||||
"create-index": "^2.3.0",
|
"create-index": "^2.3.0",
|
||||||
"enzyme": "^3.5.0",
|
"enzyme": "^3.5.0",
|
||||||
"enzyme-adapter-react-16": "^1.3.1",
|
"enzyme-adapter-react-16": "^1.3.1",
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -14,7 +14,7 @@
|
|||||||
"check": "flow check"
|
"check": "flow check"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-bundler": "^0.0.28"
|
"@scm-manager/ui-bundler": "^0.0.29"
|
||||||
},
|
},
|
||||||
"browserify": {
|
"browserify": {
|
||||||
"transform": [
|
"transform": [
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@
|
|||||||
"pre-commit": "jest && flow && eslint src"
|
"pre-commit": "jest && flow && eslint src"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"@scm-manager/ui-bundler": "^0.0.28",
|
"@scm-manager/ui-bundler": "^0.0.29",
|
||||||
"concat": "^1.0.3",
|
"concat": "^1.0.3",
|
||||||
"copyfiles": "^2.0.0",
|
"copyfiles": "^2.0.0",
|
||||||
"enzyme": "^3.3.0",
|
"enzyme": "^3.3.0",
|
||||||
|
|||||||
1022
scm-ui/yarn.lock
1022
scm-ui/yarn.lock
File diff suppressed because it is too large
Load Diff
@@ -455,7 +455,6 @@
|
|||||||
<plugin>
|
<plugin>
|
||||||
<groupId>sonia.scm.maven</groupId>
|
<groupId>sonia.scm.maven</groupId>
|
||||||
<artifactId>smp-maven-plugin</artifactId>
|
<artifactId>smp-maven-plugin</artifactId>
|
||||||
<version>1.0.0-alpha-2</version>
|
|
||||||
<configuration>
|
<configuration>
|
||||||
<artifactItems>
|
<artifactItems>
|
||||||
<artifactItem>
|
<artifactItem>
|
||||||
|
|||||||
@@ -63,7 +63,9 @@ public class XmlGroupV1UpdateStep implements UpdateStep {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
XmlGroupV1UpdateStep.V1GroupDatabase v1Database = readV1Database(v1GroupsFile.get());
|
XmlGroupV1UpdateStep.V1GroupDatabase v1Database = readV1Database(v1GroupsFile.get());
|
||||||
v1Database.groupList.groups.forEach(this::update);
|
if (v1Database.groupList != null && v1Database.groupList.groups != null) {
|
||||||
|
v1Database.groupList.groups.forEach(this::update);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|||||||
@@ -47,6 +47,12 @@ private final SCMContextProvider contextProvider;
|
|||||||
copyTestDatabaseFile(configDir, fileName);
|
copyTestDatabaseFile(configDir, fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void copyConfigFile(String fileName, String targetFileName) throws IOException {
|
||||||
|
Path configDir = tempDir.resolve("config");
|
||||||
|
Files.createDirectories(configDir);
|
||||||
|
copyTestDatabaseFile(configDir, fileName, targetFileName);
|
||||||
|
}
|
||||||
|
|
||||||
public ConfigurationEntryStore<AssignedPermission> getStoreForConfigFile(String name) {
|
public ConfigurationEntryStore<AssignedPermission> getStoreForConfigFile(String name) {
|
||||||
return storeFactory
|
return storeFactory
|
||||||
.withType(AssignedPermission.class)
|
.withType(AssignedPermission.class)
|
||||||
@@ -59,7 +65,12 @@ private final SCMContextProvider contextProvider;
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void copyTestDatabaseFile(Path configDir, String fileName) throws IOException {
|
private void copyTestDatabaseFile(Path configDir, String fileName) throws IOException {
|
||||||
|
Path targetFileName = Paths.get(fileName).getFileName();
|
||||||
|
copyTestDatabaseFile(configDir, fileName, targetFileName.toString());
|
||||||
|
}
|
||||||
|
|
||||||
|
private void copyTestDatabaseFile(Path configDir, String fileName, String targetFileName) throws IOException {
|
||||||
URL url = Resources.getResource(fileName);
|
URL url = Resources.getResource(fileName);
|
||||||
Files.copy(url.openStream(), configDir.resolve(Paths.get(fileName).getFileName()));
|
Files.copy(url.openStream(), configDir.resolve(targetFileName));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -99,6 +99,36 @@ class XmlGroupV1UpdateStepTest {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
class WithExistingDatabaseWithEmptyList {
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
void createGroupV1XML() throws IOException {
|
||||||
|
testUtil.copyConfigFile("sonia/scm/update/group/groups_empty_groups.xml", "groups.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldCreateNewGroupFromGroupsV1Xml() throws JAXBException {
|
||||||
|
updateStep.doUpdate();
|
||||||
|
verify(groupDAO, times(0)).add(any());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@Nested
|
||||||
|
class WithExistingDatabaseWithoutList {
|
||||||
|
|
||||||
|
@BeforeEach
|
||||||
|
void createGroupV1XML() throws IOException {
|
||||||
|
testUtil.copyConfigFile("sonia/scm/update/group/groups_no_groups.xml", "groups.xml");
|
||||||
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
void shouldCreateNewGroupFromGroupsV1Xml() throws JAXBException {
|
||||||
|
updateStep.doUpdate();
|
||||||
|
verify(groupDAO, times(0)).add(any());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
void shouldNotFailForMissingConfigDir() throws JAXBException {
|
void shouldNotFailForMissingConfigDir() throws JAXBException {
|
||||||
updateStep.doUpdate();
|
updateStep.doUpdate();
|
||||||
|
|||||||
@@ -0,0 +1,6 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<group-db>
|
||||||
|
<creationTime>1558006904769</creationTime>
|
||||||
|
<groups/>
|
||||||
|
<lastModified>1558007174172</lastModified>
|
||||||
|
</group-db>
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
|
||||||
|
<group-db>
|
||||||
|
<creationTime>1558006904769</creationTime>
|
||||||
|
<lastModified>1558007174172</lastModified>
|
||||||
|
</group-db>
|
||||||
Reference in New Issue
Block a user