Sha256: f529284083c776591bf4e163073d66b885bd639f440d59a286e259062ca77355

Contents?: true

Size: 591 Bytes

Versions: 6

Compression:

Stored size: 591 Bytes

Contents

require 'rspec/core/rake_task'

namespace :rswag do
  namespace :specs do

    desc 'Generate Swagger JSON files from integration specs'
    RSpec::Core::RakeTask.new('swaggerize') do |t|
      t.pattern = 'spec/requests/**/*_spec.rb, spec/api/**/*_spec.rb, spec/integration/**/*_spec.rb'

      # NOTE: rspec 2.x support
      if Rswag::Specs::RSPEC_VERSION > 2
        t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--dry-run', '--order defined' ]
      else
        t.rspec_opts = [ '--format Rswag::Specs::SwaggerFormatter', '--order defined' ]
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
rswag-specs-1.2.0 lib/tasks/rswag-specs_tasks.rake
rswag-specs-1.1.0 lib/tasks/rswag-specs_tasks.rake
rswag-specs-1.0.3 lib/tasks/rswag-specs_tasks.rake
rswag-specs-1.0.2 lib/tasks/rswag-specs_tasks.rake
rswag-specs-1.0.1 lib/tasks/rswag-specs_tasks.rake
rswag-specs-1.0.0 lib/tasks/rswag-specs_tasks.rake