Sha256: ccb2e02ead5bc8d8c00f7525870d72eb10fe4c2d411a59cd9d0bc819f9c4b39e

Contents?: true

Size: 404 Bytes

Versions: 112

Compression:

Stored size: 404 Bytes

Contents

require 'singleton'

module Scrivito
  module Migrations
    class MigrationStore
      include Singleton

      def backend
        @backend ||= CmsBackend.new
      end

      def versions
        @versions ||= MultiJson.load(backend.read.presence || '[]')
      end

      def add_version(version)
        versions << version
        backend.save(MultiJson.dump(versions))
      end
    end
  end
end

Version data entries

112 entries across 112 versions & 1 rubygems

Version Path
scrivito_sdk-1.4.2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.4.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.4.1.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.4.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.4.0.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.4.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.3.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.3.1.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.3.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.3.0.rc3 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.3.0.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.3.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.2.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.2.0.rc3 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.2.0.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.2.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.1.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.1.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.1.0.rc3 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-1.1.0.rc2 lib/scrivito/migrations/migration_store.rb