summaryrefslogtreecommitdiff
path: root/templates/project/jobs/buzzwords.rb
diff options
context:
space:
mode:
authorDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-08-14 05:23:57 -0400
committerDaniel Beauchamp <daniel.beauchamp@shopify.com>2012-08-14 05:23:57 -0400
commit54c6a04b722663b518bf99b4d98a1c2e86ee5103 (patch)
tree91cc311d76bcdd0c6fb053798b383fbeb44c4063 /templates/project/jobs/buzzwords.rb
parent8e3ca1d64444408677c93721c198908de43fa417 (diff)
Updated the sample project.
Diffstat (limited to 'templates/project/jobs/buzzwords.rb')
-rw-r--r--templates/project/jobs/buzzwords.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/templates/project/jobs/buzzwords.rb b/templates/project/jobs/buzzwords.rb
new file mode 100644
index 0000000..109dc60
--- /dev/null
+++ b/templates/project/jobs/buzzwords.rb
@@ -0,0 +1,9 @@
+buzzwords = ['Paradigm shift', 'Leverage', 'Pivoting', 'Turn-key', 'Streamlininess', 'Exit strategy', 'Synergy', 'Enterprise', 'Web 2.0']
+buzzword_counts = Hash.new({ value: 0 })
+
+SCHEDULER.every '2s' do
+ random_buzzword = buzzwords.sample
+ buzzword_counts[random_buzzword] = { label: random_buzzword, value: buzzword_counts[random_buzzword][:value] + 1 }
+
+ send_event('buzzwords', { items: buzzword_counts.values })
+end \ No newline at end of file