Created
January 18, 2017 16:08
-
-
Save tijmenb/ed65aa81027831975e68ea0556242bd3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# this should provide you with 20 random paths from each of the rendering apps on GOV.UK | |
# | |
# ssh content-store-1.integration | |
# govuk_app_console content-store | |
require 'yaml' | |
paths = [] | |
ContentItem.distinct(:rendering_app).each do |rendering_app| | |
coll = ContentItem.where(rendering_app: rendering_app) | |
coll.skip(rand(coll.count)).limit(20).each do |content_item| | |
paths << content_item['base_path'] | |
end | |
end | |
puts YAML.dump(paths) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment