Making a base Sensu::Mutator class. Personally, I'm not a fan of autorun. Makes complete testing a pain.
With the given base mutator all they need is something like this:
class SampleMutator < Sensu::Mutator
def mutate
@event.merge!(:mutated => true)
end
end
mutator = SampleMutator.new
puts mutator.execute
If you think that we should follow standard and use auto run, I'll change it to work with that. Also, if you want the base mutator to output the JSON by default we can do that too. I like it being explicit for testing purposes.
Making a base
Sensu::Mutator
class. Personally, I'm not a fan of autorun. Makes complete testing a pain.With the given base mutator all they need is something like this:
If you think that we should follow standard and use auto run, I'll change it to work with that. Also, if you want the base mutator to output the JSON by default we can do that too. I like it being explicit for testing purposes.