Sha256: 770cb89e2376ced5073d8f19700bb6bc75763f01641e6922b35feaae66066c18

Contents?: true

Size: 425 Bytes

Versions: 10

Compression:

Stored size: 425 Bytes

Contents

namespace :swaggard do

  desc 'Clear swaggard cache'
  task :clear_cache => :environment do
    Rails.cache.delete('swaggard_doc_json')
    puts 'Swaggard cache has been cleared'
  end

  desc 'Dump swagger.json'
  task :dump => :environment do
    swagger = Swaggard.get_doc
    File.open('public/swagger/swaggard.json', 'w') { |file| file.write(JSON.pretty_generate(swagger)) }
    puts 'Swaggard dump complete'
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
swaggard-1.5.1 lib/tasks/swaggard.rake
swaggard-1.5.0 lib/tasks/swaggard.rake
swaggard-1.4.0 lib/tasks/swaggard.rake
swaggard-1.3.0 lib/tasks/swaggard.rake
swaggard-1.2.0 lib/tasks/swaggard.rake
swaggard-1.1.1 lib/tasks/swaggard.rake
swaggard-1.1.0 lib/tasks/swaggard.rake
swaggard-1.0.2 lib/tasks/swaggard.rake
swaggard-1.0.1 lib/tasks/swaggard.rake
swaggard-1.0.0 lib/tasks/swaggard.rake