Sha256: 4f6deb8810dd1257cafeca849959685dc4c7035e14f39f2d7fadeef4dd893bb5

Contents?: true

Size: 1.41 KB

Versions: 26

Compression:

Stored size: 1.41 KB

Contents

require 'bundler/gem_tasks'

begin
  require 'rspec'
  require 'rspec/core'
  require 'rspec/core/rake_task'
  require 'octorelease'
  require 'rubocop/rake_task'
rescue LoadError
end

require 'awspec'

types = Awspec::Helper::Type::TYPES.map do |type|
  'spec:' + type
end

if defined?(RSpec)
  task spec: 'spec:all'
  namespace :spec do
    task all: ['spec:type',
               'spec:account',
               'spec:core',
               'spec:generator_spec',
               'spec:generator_doc',
               'spec:rubocop',
               'spec:helper']

    task type: types

    Awspec::Helper::Type::TYPES.map do |type|
      RSpec::Core::RakeTask.new(type) do |t|
        t.pattern = 'spec/type/' + type + '_spec.rb'
      end
    end

    RSpec::Core::RakeTask.new(:account) do |t|
      t.pattern = 'spec/type/account_spec.rb'
    end

    RSpec::Core::RakeTask.new(:core) do |t|
      t.pattern = 'spec/core/*_spec.rb'
    end

    RSpec::Core::RakeTask.new(:generator_spec) do |t|
      t.pattern = 'spec/generator/spec/*_spec.rb'
    end

    RSpec::Core::RakeTask.new(:generator_doc) do |t|
      t.pattern = 'spec/generator/doc/*_spec.rb'
    end

    RSpec::Core::RakeTask.new(:helper) do |t|
      t.pattern = 'spec/lib/awspec/helper/*_spec.rb'
    end

    RuboCop::RakeTask.new
  end
end

task :generate_docs do
  docs = Awspec::Generator::Doc::Type.generate_doc
  File.write('doc/resource_types.md', docs + "\n")
end

Version data entries

26 entries across 26 versions & 3 rubygems

Version Path
cthiesfork-awspec-1.2.0 Rakefile
cthiesfork-awspec-1.1.0 Rakefile
cthiesfork-awspec-1.0.0 Rakefile
awspec-1.18.4 Rakefile
awspec-1.18.3 Rakefile
awspec-1.18.2 Rakefile