Skip to content

Commit

Permalink
also show outdated images
Browse files Browse the repository at this point in the history
  • Loading branch information
mikdiet committed Mar 15, 2015
1 parent 262241a commit dd9ff0d
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 2 deletions.
14 changes: 12 additions & 2 deletions lib/tasks/docrails.rake
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,19 @@ namespace :docrails do

known_guides = (config['pages'] + config['plan'] + config['old']).map { |page| page['file'] }
all_guides = Dir["#{docrails_path}/guides/source/*.md"].map { |file| file[/[^\/]+\z/]}
new_guides = all_guides - known_guides
removed_guides = known_guides - all_guides

puts 'New guides: ', (all_guides - known_guides).join(', ')
puts 'Removed guides: ', (known_guides - all_guides).join(', ')
puts 'New guides: ', new_guides.join(', ') if new_guides.present?
puts 'Removed guides: ', removed_guides.join(', ') if removed_guides.present?

images_stat = docrails.diff(config['images']['revision']).path('guides/assets/images').stats
if images_stat[:files].present?
puts "Updated images:"
images_stat[:files].each { |file, _| puts " - %s" % file }
end

puts

stats = []

Expand Down
4 changes: 4 additions & 0 deletions source/index.yml
Original file line number Diff line number Diff line change
Expand Up @@ -236,6 +236,10 @@ pages:
revision: be1e0241f012f1151d2448b10e14b8b2eda26b84
date: 18/12/2014

images:
revision: 7aa500d2edcc2a2990e7a72799661d4a1227d441
date: 25/02/2014

plan:
- file: action_view_overview.md
- file: active_record_postgresql.md
Expand Down

0 comments on commit dd9ff0d

Please sign in to comment.