Commit 1bb18d0
Changed files (2)
lib
saml
kit
lib/saml/kit/cli/metadata.rb
@@ -7,6 +7,13 @@ module Saml
say registry.register_url(url).to_xml(pretty: true), :green
end
+ desc "list", "List each of the registered entityId's"
+ def list
+ registry.each do |x|
+ say x.entity_id, :green
+ end
+ end
+
private
def registry
lib/saml/kit/cli/yaml_registry.rb
@@ -16,6 +16,14 @@ module Saml
def metadata_for(entity_id)
Saml::Kit::Metadata.from(@items[entity_id])
end
+
+ def each
+ @items.transaction do
+ @items.roots.each do |key|
+ yield metadata_for(key)
+ end
+ end
+ end
end
end
end