Sha256: 32ee8ae7063eb2a18da640562cee9cfd0532d2d6030266b815eae2d6c2149327

Contents?: true

Size: 775 Bytes

Versions: 21

Compression:

Stored size: 775 Bytes

Contents

module Locomotive
  module Steam
    module Adapters
      module Filesystem
        module YAMLLoaders

          class Site

            include Adapters::Filesystem::YAMLLoader

            def load(scope)
              attributes = _load(File.join(site_path, 'config', 'site.yml'))

              (attributes[:domains] ||= []).concat(%w(0.0.0.0 localhost))

              attributes[:picture] = File.expand_path(File.join(site_path, 'icon.png'))

              attributes[:metafields_schema] = load_metafields_schema

              [attributes]
            end

            private

            def load_metafields_schema
              _load(File.join(site_path, 'config', 'metafields_schema.yml'))
            end

          end

        end
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
locomotivecms_steam-1.5.0.beta1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.4.1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.4.0 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.4.0.rc2 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.4.0.rc1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.4.0.pre.rc.1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.3.0 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.3.0.rc2 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.1.2 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.2.1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.3.0.rc1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.2.0 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.2.0.rc3 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.2.0.rc2 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.2.0.rc1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.2.0.beta1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.1.1 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.1.0 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.1.0.rc3 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb
locomotivecms_steam-1.1.0.rc2 lib/locomotive/steam/adapters/filesystem/yaml_loaders/site.rb