Module: Pubba
- Defined in:
- lib/pubba.rb,
lib/pubba/page.rb,
lib/pubba/site.rb,
lib/pubba/errors.rb,
lib/pubba/locale.rb,
lib/pubba/monitor.rb,
lib/pubba/version.rb,
lib/pubba/html/helpers.rb,
lib/pubba/assets/handler.rb,
lib/pubba/assets/minifier.rb,
lib/pubba/assets/yui_minifier.rb,
lib/pubba/assets/configuration.rb,
lib/pubba/assets/sprockets_handler.rb
Defined Under Namespace
Modules: Assets, HTML, Monitor, Site Classes: ConfigurationError, Locale, Page
Constant Summary collapse
- VERSION =
Pubba version string
'0.8.1'
Class Attribute Summary collapse
-
.asset_folder ⇒ Object
Returns the value of attribute asset_folder.
-
.asset_handler ⇒ Object
Returns the value of attribute asset_handler.
-
.asset_host ⇒ Object
Returns the value of attribute asset_host.
-
.asset_minifier ⇒ Object
Returns the value of attribute asset_minifier.
-
.config_file ⇒ Object
Returns the value of attribute config_file.
-
.public_folder ⇒ Object
Returns the value of attribute public_folder.
-
.r18n_folder ⇒ Object
Returns the value of attribute r18n_folder.
-
.r18n_locale ⇒ Object
Returns the value of attribute r18n_locale.
-
.script_folder ⇒ Object
Returns the value of attribute script_folder.
-
.style_folder ⇒ Object
Returns the value of attribute style_folder.
Class Method Summary collapse
- .configure {|_self| ... } ⇒ Object
- .init_asset_host ⇒ Object
- .set_defaults ⇒ Object
- .validate_settings ⇒ Object
Class Attribute Details
.asset_folder ⇒ Object
Returns the value of attribute asset_folder.
12 13 14 |
# File 'lib/pubba.rb', line 12 def asset_folder @asset_folder end |
.asset_handler ⇒ Object
Returns the value of attribute asset_handler.
13 14 15 |
# File 'lib/pubba.rb', line 13 def asset_handler @asset_handler end |
.asset_host ⇒ Object
Returns the value of attribute asset_host.
12 13 14 |
# File 'lib/pubba.rb', line 12 def asset_host @asset_host end |
.asset_minifier ⇒ Object
Returns the value of attribute asset_minifier.
13 14 15 |
# File 'lib/pubba.rb', line 13 def asset_minifier @asset_minifier end |
.config_file ⇒ Object
Returns the value of attribute config_file.
10 11 12 |
# File 'lib/pubba.rb', line 10 def config_file @config_file end |
.public_folder ⇒ Object
Returns the value of attribute public_folder.
10 11 12 |
# File 'lib/pubba.rb', line 10 def public_folder @public_folder end |
.r18n_folder ⇒ Object
Returns the value of attribute r18n_folder.
14 15 16 |
# File 'lib/pubba.rb', line 14 def r18n_folder @r18n_folder end |
.r18n_locale ⇒ Object
Returns the value of attribute r18n_locale.
14 15 16 |
# File 'lib/pubba.rb', line 14 def r18n_locale @r18n_locale end |
.script_folder ⇒ Object
Returns the value of attribute script_folder.
11 12 13 |
# File 'lib/pubba.rb', line 11 def script_folder @script_folder end |
.style_folder ⇒ Object
Returns the value of attribute style_folder.
11 12 13 |
# File 'lib/pubba.rb', line 11 def style_folder @style_folder end |
Class Method Details
.configure {|_self| ... } ⇒ Object
16 17 18 19 20 |
# File 'lib/pubba.rb', line 16 def configure yield self validate_settings Site.configure end |
.init_asset_host ⇒ Object
31 32 33 |
# File 'lib/pubba.rb', line 31 def init_asset_host @asset_host = -> asset {asset} end |
.set_defaults ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/pubba.rb', line 22 def set_defaults @asset_handler = Pubba::Assets::SprocketsHandler @asset_minifier = Pubba::Assets::YUIMinifier @script_folder = 'js' @style_folder = 'css' init_asset_host end |
.validate_settings ⇒ Object
35 36 37 38 39 40 41 42 43 44 |
# File 'lib/pubba.rb', line 35 def validate_settings missing_settings = [] missing_settings << ":public_folder has not been set!" unless Pubba.public_folder missing_settings << ":asset_folder has not been set!" unless Pubba.asset_folder if missing_settings.length > 0 = missing_settings.join("\n") raise Pubba::ConfigurationError.new("Missing configuration options:\n#{}") end end |