Sha256: 1f494468e39c19cf817d124f0f12165d49c0742c44d798e114c049697dffd20f

Contents?: true

Size: 509 Bytes

Versions: 60

Compression:

Stored size: 509 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 SeedHelper.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

60 entries across 60 versions & 1 rubygems

Version Path
foreman-tasks-10.0.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-10.0.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-10.0.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.2.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.2.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.2.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.2.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.1.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.0.4 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.1.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.0.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.0.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.3.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-9.0.0 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.2.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.1.4 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.3.2 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.3.1 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.1.3 db/seeds.d/61-foreman_tasks_bookmarks.rb
foreman-tasks-8.3.0 db/seeds.d/61-foreman_tasks_bookmarks.rb