Sha256: 6a6578eaf43519d3749080fc15567a14d8b2b3ae3c8cee0d3c4f746d175ea3d4

Contents?: true

Size: 1.09 KB

Versions: 3

Compression:

Stored size: 1.09 KB

Contents

module ConcertoWeather
  class Engine < ::Rails::Engine
    isolate_namespace ConcertoWeather

    initializer "register content type" do |app|
      app.config.content_types << Weather
    end
    
    def plugin_info(plugin_info_class)
      @plugin_info ||= plugin_info_class.new do 
        add_config("open_weather_map_api_key", "",
                   value_type: "string",
                   category: "API Keys",
                   description: "OpenWeatherMap API Access Token. This token is used for obtaining weather information when adding weather content. http://openweathermap.org/appid")
      
        # Add owfont (open weather) icon set to application layout for content preview / browsing
        add_header_tags do
          stylesheet_link_tag "concerto_weather/application"
        end

        # Add owfont (open weather) icon set to concerto-frontend layout for weather content shown on screens
        add_view_hook "frontend/ScreensController", :concerto_frontend_plugins do 
          "#{ stylesheet_link_tag 'concerto_weather/application' }"
        end
        
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
concerto_weather-0.3.1 lib/concerto_weather/engine.rb
concerto_weather-0.3.0 lib/concerto_weather/engine.rb
concerto_weather-0.2.0 lib/concerto_weather/engine.rb