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 groovyx.net.http.HTTPBuilder | |
import groovyx.net.http.HttpResponseException | |
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.7.2') | |
version = args[0] | |
if (!version) { | |
throw new IllegalArgumentException("No version specified") | |
} | |
archive = "askfm-node-$version-docker.zip" | |
host = 'http://172.16.0.2:8081' |
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
pattern = ~/.*---(.*)$/ | |
def droppables = [] | |
manager.build.logFile.eachLine { line -> | |
matcher = pattern.matcher(line) | |
if(matcher.matches()) { | |
droppables << matcher.group(1) | |
} | |
} | |
pattern = ~/.*<!>(.*)$/ |
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
Map dropConditions = [ | |
new_do_stuff_toggled : { cfg("new_do_stuff.enabled") == "true" }, | |
marketing_campaign_finished : { timeCame "09/04/2014" } | |
] | |
def timeCame(String date) { | |
def today = new Date() | |
def expirationDate = new Date().parse('dd/MM/yyyy', date) | |
today.after expirationDate | |
} |
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
new File('.').eachFileRecurse(groovy.io.FileType.FILES) { | |
if (it.name.endsWith(".java")) { | |
def hits = it.text =~ /\/\/\s*DROP\s*\[\s*(.*)\s*\]\n/ | |
hits.each { match, key -> | |
def dropConditionForAGivenKey = dropConditions[(key)] | |
if (!dropConditionForAGivenKey) { | |
println("<!> Cannot find drop conditions for key '$key'") | |
return | |
} | |
try { |
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 cfg(key) { | |
def uri = "http://production.configuration/$key".toURL() | |
uri.getText(connectTimeout: 2000, readTimeout: 3000) | |
} |
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 timeCame(String date) { | |
def today = new Date() | |
def expirationDate = new Date().parse('dd/MM/yyyy', date) | |
today.after expirationDate | |
} |
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
Map dropConditions = [ | |
new_do_stuff_toggled : { cfg("new_do_stuff.enabled") == "true" }, | |
marketing_campaign_finished : { timeCame "09/04/2014" } | |
] |
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
void doStuff() { | |
if (newImplementation.isToggled()) { | |
doStuffInANewWay(); | |
} else { | |
// DROP [new_do_stuff_toggled] | |
doStuffInAnOldWay(); | |
} | |
} | |
// DROP [marketing_campaign_finished] |
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
package fm.ask.dao.user.auth; | |
import com.google.common.collect.ImmutableMap; | |
import com.rubylight.dao.ChunkQueryNotTotalMySQL; | |
import com.rubylight.dao.DAOAppException; | |
import com.rubylight.dao.DAOSysException; | |
import com.rubylight.dao.IChunkQueryDefinition; | |
import com.rubylight.dao.connection.IConnectionLookup; | |
import com.rubylight.entity.IChunkProperties; | |
import com.rubylight.entity.IListChunk; |
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
Feature: Mailbox | |
Scenario: Registered users have a new message in the mailbox #1 | |
Given I am "Johnny" | |
When I check my mailbox | |
Then I should have a "Welcome Johnny" message | |
Scenario: Registered users have a new message in the mailbox #2 | |
Given I am "Eduards" | |
When I check my mailbox |