Sha256: 11964491c65bfdb6255de6683fce3e9cce8490a1c7a4948bf26b5ea16c8df388

Contents?: true

Size: 831 Bytes

Versions: 57

Compression:

Stored size: 831 Bytes

Contents

require 'fiona7/mode_switch/abstract_mode_switch'

module Fiona7
  module ModeSwitch
    class CmsRoutes < AbstractModeSwitch
      def standalone
        self.load_cms_routes(self.scrivito_sdk_routes)
      end

      def legacy
        self.load_cms_routes(self.scrivito_sdk_slave_routes)
        self.load_cms_routes(self.fiona_connector_routes)
      end

      protected
      def load_cms_routes(path)
        self.app.routes_reloader.paths.push(path)
      end

      def scrivito_sdk_routes
        File.expand_path("../cms_routes/scrivito_sdk.rb", __FILE__)
      end

      def scrivito_sdk_slave_routes
        File.expand_path("../cms_routes/scrivito_sdk_slave.rb", __FILE__)
      end

      def fiona_connector_routes
        File.expand_path("../cms_routes/fiona_connector.rb", __FILE__)
      end
    end
  end
end

Version data entries

57 entries across 57 versions & 1 rubygems

Version Path
infopark_fiona7-1.6.1.1.5 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.6.1.1.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.6.1.1.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.2.3 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.2.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.2.2 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.5.5.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.5.5.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.1.4 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.5.4.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.5.4.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.1.3 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.5.3.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.4.3.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.3.2.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.3.2.0.pre.beta1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.2.1.0.pre.beta1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.5.2.0.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.1.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-1.2.0.0.1 lib/fiona7/mode_switch/cms_routes.rb