Skip to content

Commit

Permalink
Show Petri inconsistencies
Browse files Browse the repository at this point in the history
  • Loading branch information
sebbASF committed Sep 15, 2023
1 parent 1ceac83 commit 4ce6265
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 3 deletions.
18 changes: 15 additions & 3 deletions lib/whimsy/asf/petri.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,23 +22,35 @@ class Petri
attr_reader :wiki
attr_reader :release
attr_reader :licensing
attr_accessor :error

This comment was marked as spam.

Copy link
@EllaMartinez1981

EllaMartinez1981 Sep 18, 2023

Ella Intelligent Global Network Inc
https://ellaintelligentglobalnetwork.websites.co.in
By: Eloisa Martinez

This comment was marked as spam.

Copy link
@EllaMartinez1981

EllaMartinez1981 Sep 18, 2023

Ella Intelligent Global Network Inc https://ellaintelligentglobalnetwork.websites.co.in By: Eloisa Martinez

slider_default_img


def initialize(entry)
key, hash = entry
@id = key
hash.each { |name, value| instance_variable_set("@#{name}", value) }
end

# Array of all active Petri culture entries
# Array of all Petri culture entries
def self.list
@list = []
response = Net::HTTP.get_response(URI(PETRI_INFO))
response.value() # Raises error if not OK
yaml = YAML.safe_load(response.body, permitted_classes: [Symbol])
# @mentors = yaml['mentors']
# Active cultures are listed under projects
yaml['cultures'].each do |proj|
prj = new(proj)
if yaml['projects'].include? proj
prj.error = 'Listed as a current project' unless prj.status == 'current'
else
prj.error = 'Not listed as a current project' if prj.status == 'current'
end
@list << prj
end
# Now check against projects listing
yaml['projects'].each do |proj|
@list << new(yaml['cultures'][proj])
unless yaml['cultures'].include? proj
@list << new([proj,{name: '', status: '', error: 'No culture entry found'}])
end
end
@list
end
Expand Down
2 changes: 2 additions & 0 deletions www/roster/views/petri.html.rb
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
_th.sorting_asc 'Id', data_sort: 'string-ins'
_th 'Name', data_sort: 'string'
_th 'Status', data_sort: 'string'
_th 'Error', data_sort: 'string'
_th 'Description', data_sort: 'string'
end
end
Expand All @@ -43,6 +44,7 @@
end
_td petri.name
_td petri.status
_td petri.error
_td petri.description
end
end
Expand Down

0 comments on commit 4ce6265

Please sign in to comment.