Sha256: e4277b210e043358d5266a274d365a8f3548450be637662ebc85d437503101dc

Contents?: true

Size: 495 Bytes

Versions: 20

Compression:

Stored size: 495 Bytes

Contents

Bookmark.without_auditing do
  [
    { :name => "running", :query => "state = running" },
    { :name => "failed", :query => "state = paused or result = error or result = warning" }

  ].each do |item|
    next if Bookmark.where(:name => item[:name]).first
    next if audit_modified? Bookmark, item[:name]
    b = Bookmark.create({:controller => "foreman_tasks_tasks", :public => true}.merge(item))
    raise "Unable to create bookmark: #{format_errors b}" if b.nil? || b.errors.any?
  end
end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
foreman-tasks-0.8.6 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.8.5 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.8.4 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.8.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.8.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.8.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.8.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.20 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.19 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.18 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.17 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.16 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.15 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.14 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.13 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.12 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.11 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.10 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.9 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-0.7.8 db/seeds.d/61-foreman_tasks_bookmarks.rb