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-5.4.5 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.4.4 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.4.3 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.4.2 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.4.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.4.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.3.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.3.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.2.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.1.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.0.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-5.0.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-4.2.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-4.2.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-4.1.3 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-4.1.2 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-4.1.1 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb
ndr_dev_support-4.1.0 lib/ndr_dev_support/rake_ci/commit_cop/migration_without_structure_dump.rb