Sha256: b8c7bdbf89ebfd56fd6630f473f79b25b856116f07ae07cbdb2f2b1cdcac1ebb

Contents?: true

Size: 405 Bytes

Versions: 26

Compression:

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

26 entries across 26 versions & 1 rubygems

Version Path
scrivito_sdk-0.50.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.50.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.50.0.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.50.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.42.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.42.1.rc3 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.42.1.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.42.1.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.42.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.41.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.41.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.41.0.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.41.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.40.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.40.0.rc2 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.40.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.30.0 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.30.0.rc1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.18.1 lib/scrivito/migrations/migration_store.rb
scrivito_sdk-0.18.0 lib/scrivito/migrations/migration_store.rb