Sha256: e29acd249128144e5733c686f97172c79f9eb4f4edd206559668eb042f654f50

Contents?: true

Size: 633 Bytes

Versions: 58

Compression:

Stored size: 633 Bytes

Contents

require_relative 'concerns/deputisable'

module NdrDevSupport
  module RakeCI
    module CommitCop
      # This cop checks for new migrations with no accompanying structure dump
      class MigrationWithoutStructureDump
        include Deputisable

        def check(changes)
          return unless changes[:added].any?(&unscoped_migration_file?) &&
                        changes[:modified].none?(&structure_dump_file?)

          attachment(:danger,
                     'No structure file committed',
                     'Migration(s) were added with no accompanying structure file(s)')
        end
      end
    end
  end
end

Version data entries

58 entries across 58 versions & 1 rubygems

Version Path
ndr_dev_support-7.3.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.3.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.6 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.5 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.4 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.3 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.2 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.2.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.1.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-7.0.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.9 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.8 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.7 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.6 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.5 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.4 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.3 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.2 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-6.1.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb