diff --git a/build.gradle b/build.gradle index 316f2eb..2505074 100644 --- a/build.gradle +++ b/build.gradle @@ -63,7 +63,7 @@ dependencies { } group = 'org.fundacionjala.gradle.plugins.enforce' -version = '1.0.0' +version = '1.3.7' uploadArchives { diff --git a/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/SalesforceTask.groovy b/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/SalesforceTask.groovy index 89cc883..256b945 100644 --- a/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/SalesforceTask.groovy +++ b/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/SalesforceTask.groovy @@ -91,6 +91,7 @@ abstract class SalesforceTask extends ForceTask { println("\tLogin type: ${credential.loginFormat}") println("___________________________________________ ") println AnsiColor.ANSI_RESET.value() + logger.debug('after show credentials') } /** @@ -150,7 +151,9 @@ abstract class SalesforceTask extends ForceTask { poll = project.enforce.poll waitTime = project.enforce.waitTime loadCredential() + logger.debug('Finished load credential') fileManager.createDirectory(buildFolderPath) + logger.debug('Created directory at: ' + buildFolderPath) runTask() } diff --git a/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/deployment/Deploy.groovy b/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/deployment/Deploy.groovy index 4ea723f..6965701 100644 --- a/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/deployment/Deploy.groovy +++ b/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/tasks/salesforce/deployment/Deploy.groovy @@ -57,6 +57,7 @@ class Deploy extends Deployment { folderDeploy = Paths.get(buildFolderPath, FOLDER_DEPLOY).toString() packagePathDeploy = Paths.get(folderDeploy, PACKAGE_NAME).toString() createDeploymentDirectory(folderDeploy) + logger.debug('Created folder Deploy at: ' + folderDeploy) if (Util.isValidProperty(project, FOLDERS_DEPLOY)) { deployByFolder() } else { @@ -97,21 +98,26 @@ class Deploy extends Deployment { def deployTruncateFiles() { checkStatusTruncate() displayFolderNoDeploy() + logger.debug('Displayed message') if (codeTruncateOn) { ArrayList filesToTruncate = excludeFiles(fileManager.getFilesByFolders(projectPath, FOLDERS_TO_TRUNCATE)) Files.copy(Paths.get(projectPath, PACKAGE_NAME), Paths.get(packagePathDeploy), StandardCopyOption.REPLACE_EXISTING) fileManager.copy(filesToTruncate, folderDeploy) + logger.debug('All files copied to deploy...') writePackage(packagePathDeploy, filesToTruncate) + logger.debug('Created package...') truncateComponents() componentDeploy.startMessage = DEPLOYING_TRUNCATED_CODE componentDeploy.successMessage = DEPLOYING_TRUNCATED_CODE_SUCCESSFULLY executeDeploy(folderDeploy) createDeploymentDirectory(folderDeploy) + logger.debug('Truncated components...') } fileManager.copy(excludeFiles(fileManager.getValidElements(projectPath)), folderDeploy) componentDeploy.startMessage = DEPLOYING_CODE componentDeploy.successMessage = DEPLOYING_CODE_SUCCESSFULLY deployToSalesForce() + logger.debug('Deployed components...') } /** diff --git a/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponents.groovy b/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponents.groovy index f1dd9ad..174b332 100644 --- a/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponents.groovy +++ b/src/main/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponents.groovy @@ -69,6 +69,11 @@ public enum MetadataComponents { COMPACTLAYOUTS("CompactLayout", "sbc", "compactLayouts"), RECORDTYPES("RecordType", "sbc", "recordTypes"), VALIDATIONRULES("ValidationRule", "sbc", "validationRules"), + BUSINESSPROCESSES("BusinessProcess", "sbc", "businessProcesses"), + FIELDSETS("FieldSet", "sbc", "fieldSets"), + LISTVIEWS("ListView", "sbc", "listViews"), + SHARINGREASON("SharingReason", "sbc", "SharingReason"), + OBJECTWEBLINKS("Weblink", "sbc", "webLinks"), CUSTOMPERMISSIONS("CustomPermission", "customPermission", "customPermissions") public final static Map COMPONENT; diff --git a/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/interceptor/commands/ComponentTest.groovy b/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/interceptor/commands/ComponentTest.groovy index d01f9d2..62f5dd7 100644 --- a/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/interceptor/commands/ComponentTest.groovy +++ b/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/interceptor/commands/ComponentTest.groovy @@ -55,7 +55,7 @@ class ComponentTest extends Specification { when: componentContent.execute(file) then: - file.text == expectedContent + file.text.replaceAll("\\s*","") == expectedContent.replaceAll("\\s*","") } def cleanupSpec() { new File(TRUNCATED_PATH).deleteDir() diff --git a/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/unittest/report/htmlManagerTest.groovy b/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/unittest/report/HtmlManagerTest.groovy similarity index 100% rename from src/test/groovy/org/fundacionjala/gradle/plugins/enforce/unittest/report/htmlManagerTest.groovy rename to src/test/groovy/org/fundacionjala/gradle/plugins/enforce/unittest/report/HtmlManagerTest.groovy diff --git a/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponentsTest.groovy b/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponentsTest.groovy index 0c5a946..b66de5c 100644 --- a/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponentsTest.groovy +++ b/src/test/groovy/org/fundacionjala/gradle/plugins/enforce/utils/salesforce/MetadataComponentsTest.groovy @@ -64,7 +64,9 @@ class MetadataComponentsTest extends Specification { def "Test enum name is equals to directory name"() { expect: MetadataComponents.COMPONENT.each {key, value-> - assert key == value.directory.toUpperCase() + if(value.extension != 'sbc') { + assert key == value.directory.toUpperCase() + } } }