Sha256: 3ae28ff9b8eec05d1671467d80e4d5de7c7e8eca0b21864a12cd174663f2af7b

Contents?: true

Size: 399 Bytes

Versions: 6

Compression:

Stored size: 399 Bytes

Contents

require 'singleton'

module Scrivito
  module Migrations
    class MigrationStore
      include Singleton

      def backend
        @backend ||= CmsBackend.new
      end

      def versions
        @versions ||= JSON.parse(backend.read.presence || '[]')
      end

      def add_version(version)
        versions << version
        backend.save(JSON.generate(versions))
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
scrivito_sdk-1.18.0 app/cms/scrivito/migrations/migration_store.rb
scrivito_sdk-1.18.0.rc1 app/cms/scrivito/migrations/migration_store.rb
scrivito_sdk-1.17.0 app/cms/scrivito/migrations/migration_store.rb
scrivito_sdk-1.17.0.rc3 app/cms/scrivito/migrations/migration_store.rb
scrivito_sdk-1.17.0.rc2 app/cms/scrivito/migrations/migration_store.rb
scrivito_sdk-1.17.0.rc1 app/cms/scrivito/migrations/migration_store.rb