Module: Kennel

Defined in:
lib/kennel/file_cache.rb,
lib/kennel.rb,
lib/kennel/api.rb,
lib/kennel/tasks.rb,
lib/kennel/utils.rb,
lib/kennel/syncer.rb,
lib/kennel/version.rb,
lib/kennel/importer.rb,
lib/kennel/progress.rb,
lib/kennel/models/slo.rb,
lib/kennel/models/base.rb,
lib/kennel/models/team.rb,
lib/kennel/models/record.rb,
lib/kennel/models/monitor.rb,
lib/kennel/models/project.rb,
lib/kennel/unmuted_alerts.rb,
lib/kennel/github_reporter.rb,
lib/kennel/models/dashboard.rb,
lib/kennel/subclass_tracking.rb,
lib/kennel/template_variables.rb,
lib/kennel/settings_as_methods.rb,
lib/kennel/optional_validations.rb

Overview

Show Alerts that are not muted and their alerting scopes

Defined Under Namespace

Modules: Models, OptionalValidations, SettingsAsMethods, SubclassTracking, Tasks, TemplateVariables, Utils Classes: Api, FileCache, GithubReporter, Importer, Progress, Syncer, UnmutedAlerts, ValidationError

Constant Summary collapse

MISSING_ID =
1
VERSION =
"1.65.0"

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.errObject

Returns the value of attribute err.



40
41
42
# File 'lib/kennel.rb', line 40

def err
  @err
end

.outObject

Returns the value of attribute out.



40
41
42
# File 'lib/kennel.rb', line 40

def out
  @out
end

Class Method Details

.generateObject



42
43
44
45
46
47
48
49
# File 'lib/kennel.rb', line 42

def generate
  FileUtils.rm_rf("generated")
  generated.each do |part|
    path = "generated/#{part.tracking_id.sub(":", "/")}.json"
    FileUtils.mkdir_p(File.dirname(path))
    File.write(path, JSON.pretty_generate(part.as_json) << "\n")
  end
end

.planObject



51
52
53
# File 'lib/kennel.rb', line 51

def plan
  syncer.plan
end

.updateObject



55
56
57
58
# File 'lib/kennel.rb', line 55

def update
  syncer.plan
  syncer.update if syncer.confirm
end