Sha256: 54b83dbfd7947845c5943ae0e3c0860352113838966b012c1436421258cdc903

Contents?: true

Size: 506 Bytes

Versions: 2

Compression:

Stored size: 506 Bytes

Contents

require "rails/generators"

module Suspenders
  class CiGenerator < Rails::Generators::Base
    source_root File.expand_path(
      File.join("..", "..", "..", "templates"),
      File.dirname(__FILE__))

    def simplecov_test_integration
      inject_into_file "spec/spec_helper.rb", before: 'SimpleCov.start "rails"' do
        <<-RUBY

  if ENV["CIRCLE_ARTIFACTS"]
    dir = File.join(ENV["CIRCLE_ARTIFACTS"], "coverage")
    SimpleCov.coverage_dir(dir)
  end

        RUBY
      end
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
welaika-suspenders-2.29.0.alpha.2 lib/suspenders/generators/ci_generator.rb
welaika-suspenders-2.29.0.alpha.1 lib/suspenders/generators/ci_generator.rb