Sha256: d2183656229f35424729b2e3ec13c06c64583adf5329da8bd4ecb2a0fa104473

Contents?: true

Size: 665 Bytes

Versions: 18

Compression:

Stored size: 665 Bytes

Contents

require 'scrivito/workspace'

module Scrivito
  class Workspace
    # there are no conflicts.
    def conflict_warning_for(*args)
      []
    end

    # there are no outdated workspaces
    def outdated?
      false
    end

    # properly handle the only two workspaces
    def self.use(id_or_title)
      self.current = if id_or_title =~ /(published|rtc)/
        find(id_or_title)
      else
        find_by_title(id_or_title) or
          raise ResourceNotFound, "Could not find #{self} with title #{id_or_title}"
      end
    rescue ResourceNotFound
      raise ResourceNotFound, %{Could not find #{self} with title or ID "#{id_or_title}"}
    end
  end
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
infopark_fiona7-1.2.0.2.3 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.0.1 lib/fiona7/scrivito_patches/workspace.rb
infopark_fiona7-1.2.0.0.0 lib/fiona7/scrivito_patches/workspace.rb