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-0.71.1.12 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.1.11 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.1.10 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.1.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.1.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.7 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.6 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.4 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.3 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.2 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.71.0.0 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.70.0.3 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.70.0.2 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.70.0.1 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.30.0.2 lib/fiona7/mode_switch/cms_routes.rb
infopark_fiona7-0.30.0.1 lib/fiona7/mode_switch/cms_routes.rb