Sha256: d0fdff6b61b9e85eee4602ca687ff4870efc995c405e5c817323d31e5d436e89

Contents?: true

Size: 582 Bytes

Versions: 5

Compression:

Stored size: 582 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

    def configure_ci
      template "circle.yml.erb", "circle.yml"
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
suspenders-1.50.0 lib/suspenders/generators/ci_generator.rb
suspenders-1.49.0 lib/suspenders/generators/ci_generator.rb
suspenders-1.48.0 lib/suspenders/generators/ci_generator.rb
suspenders-1.47.0 lib/suspenders/generators/ci_generator.rb
suspenders-1.46.0 lib/suspenders/generators/ci_generator.rb