Skip to content

Instantly share code, notes, and snippets.

@cronin101
Created August 14, 2012 09:14
Show Gist options
  • Save cronin101/3347736 to your computer and use it in GitHub Desktop.
Save cronin101/3347736 to your computer and use it in GitHub Desktop.
An idea for the DSL for translating between object representations of data from online tools
from :youtrack_issue do |issue|
# $ ki_youtrack issue KI-1 | ki_middleman --to pivotal_story | ki_pivotal story --project 500123
to :pivotal_story do
{
:name => "[#{issue.id}] #{issue.summary}",
:description => "#{issue.description}"
}
end
# Example of something else that might use an issue
to :trello_issue do
{
:board => "Blocker Issues",
:name => "[#{issue.id}] #{issue.summary}",
:description => "#{issue.description}"
}
end
end
from :pivotal_story do |story|
# $ ki_pivotal story id=38212314 | ki_middleman --to trello_qa | ki_trello qa
to :trello_qa do
{
:board => "QA queue",
:name => "[##{story.id}] story.name",
:description => "#{story.description}\n * Tracker: #{story.url}"
}
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment