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
def buildConfigFile = new File("${userHome}/.grails/${appName}-buildConfig.groovy") | |
if (buildConfigFile.exists()) { | |
println "Processing external build config at $buildConfigFile" | |
def slurpedBuildConfig = new ConfigSlurper().parse(buildConfigFile.toURL()) | |
slurpedBuildConfig.grails.plugin.location.each { k, v -> | |
if (!new File(v).exists()) { | |
println "WARNING: Cannot load in-place plugin from ${v} as that directory does not exist." | |
} else { | |
println "Loading in-place plugin $k from $v" | |
grails.plugin.location."$k" = v |
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
import java.lang.management.ManagementFactory | |
includeTargets << grailsScript("_GrailsPackage") | |
includeTargets << grailsScript("_GrailsRun") | |
target(main: "Launches an app and automatically launches JConsole") { | |
//depends(compile, classpath, runApp) | |
depends(checkVersion, configureProxy, packageApp, parseArguments) | |
if (argsMap.https) { | |
runAppHttps() |
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
curl -XDELETE http://localhost:9200/ac-test | |
curl -XPUT http://localhost:9200/ac-test | |
curl -XPUT http://localhost:9200/ac-test/people/1 -d ' | |
{ | |
"firstNames" : "James Earl", | |
"lastName" : "Jones", | |
"location" : "Hollywood, CA" | |
}' | |
curl -XPUT http://localhost:9200/ac-test/people/2 -d ' |
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
buildTree: function(tree, containers) { | |
var type = $.type(tree); | |
if (type == "string" || type == "number") { | |
return document.createTextNode(String(tree)); | |
} | |
if (type != "array") { | |
return tree; | |
} | |
var elemDescriptor = tree[0]; | |
var cssClasses, elemId, containerKey = []; |
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
curl -o elasticsearch-0.17.4.tar.gz http://cloud.github.com/downloads/elasticsearch/elasticsearch/elasticsearch-0.17.4.tar.gz | |
tar xvfz elasticsearch-0.17.4.tar.gz |
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
2011-08-22 23:16:07.907991500 2011-08-22 23:16:07,907 [main] DEBUG ping.multicast - [API-srch01Queryier] using group [224.2.2.4], with port [54328], ttl [3], and address [null] | |
2011-08-22 23:16:07.916496500 2011-08-22 23:16:07,916 [main] DEBUG ping.unicast - [API-srch01Queryier] using initial hosts [] | |
2011-08-22 23:16:07.917451500 2011-08-22 23:16:07,917 [main] DEBUG discovery.zen - [API-srch01Queryier] using initial_ping_timeout [3s] | |
2011-08-22 23:16:07.918631500 2011-08-22 23:16:07,918 [main] DEBUG zen.fd - [API-srch01Queryier] [master] uses ping_interval [1s], ping_timeout [30s], ping_retries [3] | |
2011-08-22 23:16:07.922849500 2011-08-22 23:16:07,922 [main] DEBUG zen.fd - [API-srch01Queryier] [node ] uses ping_interval [1s], ping_timeout [30s], ping_retries [3] | |
2011-08-22 23:16:11.490543500 2011-08-22 23:16:11,489 [elasticsearch[cached]-pool-1-thread-1] DEBUG discovery.zen - [API-srch01Queryier] ping responses: {none} | |
2011-08-22 23:16:11.497600500 2011-08-22 23:16:11,496 [New I/O server worker #1-2] |
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
def truncate = { attrs, body -> | |
if (body().length() > attrs.maxlength.toInteger()) { | |
out << """<abbr title="${body()}">${body()[0..attrs.maxlength.toInteger() - 1]}...</abbr>""" | |
} else { | |
out << body() | |
} | |
} |
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
def "truncate works for text longer than max length"() { | |
setup: | |
def fullText = ("D" * 2) + "&" + ("D" * 12) | |
def maxLength = "10" | |
when: | |
tagLib.truncate(maxlength:maxLength, {fullText}) | |
then: | |
tagLib.out.toString() == createdTruncatedAbbr(fullText,maxLength) |
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
Crucially, a class with an empty or missing dataBindable property would not be processed at all by bindData or other batch updating mechanisms. This is a harsh breaking change, but makes it clear that the developer must think about security. Since it is a breaking change, there should be a configurable "legacy mode" that could be configured to "true" to enable old behavior for all objects, or it could also be configured to a list of classes or namespaces to enable gradual migration. "dateCreated" and "lastUpdated" should never be updated via bindData or similar. |
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
using Microsoft.CommerceServer.Catalog; | |
using Microsoft.CommerceServer.Runtime.Profiles; | |
namespace Enticify.CommerceServer.Tests.Scenarios | |
{ | |
public class PromoInfoSourceApi | |
{ | |
public void GetPromoInfoForProductAndDoSomething(Product csProduct, Profile csUserProfile) | |
{ | |
var promotionQueryService = new PromotionQueryService(); |
OlderNewer