Class: AgileNotifier::Composer

Inherits:
Object
  • Object
show all
Defined in:
lib/agile_notifier/composer.rb

Constant Summary collapse

SENTENCES_BLAME_COMMITTER =
{
  de: [
    "%{committer_name} hat den Build kaputt gemacht.",
    "Schießt %{committer_name} mit der Nerf Gun ab!",
    "%{committer_name} hat Scheiße gebaut.",
    "Hilfe! Hilfe! %{committer_name} versucht mich zu töten!"
  ],
  en: [
    "%{committer_name} has broken the build.",
    "%{committer_name} fucked up the build.",
    "What the fucking code has %{committer_name} pushed!"
  ],
  es: [
    "%{committer_name} ha destruido la compilacion",
    "que clase de codigo esta escribiendo %{committer_name} ? ",
    "tal vez es mejor que %{committer_name} se dedique a otra cosa..."
  ],
  zh: [
    "%{committer_name}在搞毛啊, 构建失败了!",
    "%{committer_name}提交的什么烂代码啊?",
    "请注意, %{committer_name}在搞破坏."
  ]
}
SENTENCES_WARN_COMMITTER =
{
  de: [
    "%{committer_name} hat den Build krank gemacht.",
    "%{committer_name} hat etwas nicht gut genug gemacht."
  ],
  en: [
    "%{committer_name} has made the build sick.",
    "%{committer_name} has done something not so good."
  ],
  es: [
    "%{committer_name} ha hecho a los enfermos de generación.",
    "%{committer_name} ha hecho algo malo."
  ],
  zh: [
    "%{committer_name}让构建生病了.",
    "%{committer_name}做了一件不太光荣的事."
  ]
}
SENTENCES_PRAISE_COMMITTER =
{
  de: [
    "%{committer_name} hat den Build gefixt!",
    "%{committer_name} ist ein Genie!",
    "%{committer_name} hat die Welt gerettet!"
  ],
  en: [
    "%{committer_name} has fixed the build.",
    "%{committer_name} is super brilliant!",
    "%{committer_name} saved the world.",
    "%{committer_name} roundhouse kicked chuck norris' butt"
  ],
  es: [
    "%{committer_name} ha reparado la compilacion",
    "%{committer_name} es un genio!",
    "%{committer_name} es el mejor programador de la historia!"
  ],
  zh: [
    "%{committer_name}很厉害啊, 修复了构建.",
    "%{committer_name}是个好同志, 该涨工资了.",
    "%{committer_name}是当代活雷锋啊!"
  ]
}
SENTENCES_WARN_WIP_LIMIT =
{
    de: [
        "Kanban WIP übersteigt das Limit.",
        "Kanban hat einen Flaschenhals.",
        "Kanban hat zu viele Tickets, arbeitet jemand schon daran?"
    ],
    en: [
        "Kanban WIP exceeds limit.",
        "Kanban has hit a bottleneck.",
        "Kanban has stacked too many items, is anyone working on it?"
    ],
    es: [
        "El limite de WIP ha sido excedido.",
        "El Kanban se esta llenando mucho.",
        "Hay demasiados elementos Kanban, alguien esta trabajando en el?"
    ],
    zh: [
        "看板瓶颈上限超出",
        "搞什么呢? 看板堆积太多工作了, 想被炒鱿鱼吗?",
        "看板, 嘟嘟, 请注意. 看板, 嘟嘟, 请注意."
    ]
}

Class Method Summary collapse

Class Method Details

.blame_committer_of_a_commit(args) ⇒ Object



100
101
102
103
# File 'lib/agile_notifier/composer.rb', line 100

def blame_committer_of_a_commit(args)
  committer_name = get_committer_name_of_a_commit(args)
  blame_committer(committer_name, args[:language])
end

.praise_committer_of_a_commit(args) ⇒ Object



110
111
112
113
# File 'lib/agile_notifier/composer.rb', line 110

def praise_committer_of_a_commit(args)
  committer_name = get_committer_name_of_a_commit(args)
  praise_committer(committer_name, args[:language])
end

.warn_committer_of_a_commit(args) ⇒ Object



105
106
107
108
# File 'lib/agile_notifier/composer.rb', line 105

def warn_committer_of_a_commit(args)
  committer_name = get_committer_name_of_a_commit(args)
  warn_committer(committer_name, args[:language])
end

.warn_wip_limit(args) ⇒ Object



96
97
98
# File 'lib/agile_notifier/composer.rb', line 96

def warn_wip_limit(args)
  random_picker(SENTENCES_WARN_WIP_LIMIT[args[:language]])
end