Class: TerrImporter::Application::Configuration
- Inherits:
-
Hash
- Object
- Hash
- TerrImporter::Application::Configuration
- Defined in:
- lib/terrimporter/configuration.rb
Instance Attribute Summary collapse
-
#validations ⇒ Object
Returns the value of attribute validations.
Instance Method Summary collapse
- #application_url ⇒ Object
- #css_export_path ⇒ Object
- #dynamic_libraries ⇒ Object
- #dynamic_plugins ⇒ Object
- #export_settings ⇒ Object
- #has_dynamic_javascripts? ⇒ Boolean
- #has_dynamic_plugins? ⇒ Boolean
- #has_images? ⇒ Boolean
- #has_modules? ⇒ Boolean
- #has_stylesheets? ⇒ Boolean
- #images ⇒ Object
- #images_server_path ⇒ Object
- #javascripts_destination ⇒ Object
- #js_export_path ⇒ Object
- #libraries_destination_path ⇒ Object
- #libraries_server_path ⇒ Object
- #modules ⇒ Object
- #plugins_destination_path ⇒ Object
- #plugins_server_path ⇒ Object
- #replace_style_strings? ⇒ Boolean
- #stylesheet_replace_strings ⇒ Object
- #stylesheets ⇒ Object
- #stylesheets_destination ⇒ Object
Instance Attribute Details
#validations ⇒ Object
Returns the value of attribute validations.
5 6 7 |
# File 'lib/terrimporter/configuration.rb', line 5 def validations @validations end |
Instance Method Details
#application_url ⇒ Object
7 8 9 |
# File 'lib/terrimporter/configuration.rb', line 7 def application_url self['application_url'] end |
#css_export_path ⇒ Object
11 12 13 |
# File 'lib/terrimporter/configuration.rb', line 11 def css_export_path self['css_export_path'] end |
#dynamic_libraries ⇒ Object
61 62 63 64 |
# File 'lib/terrimporter/configuration.rb', line 61 def dynamic_libraries libraries = self['javascripts']['dynamic_libraries'].robust_split libraries.add_missing_extension!('.js') end |
#dynamic_plugins ⇒ Object
66 67 68 69 |
# File 'lib/terrimporter/configuration.rb', line 66 def dynamic_plugins libraries = self['javascripts']['dynamic_plugins'].robust_split libraries.add_missing_extension!('.js') end |
#export_settings ⇒ Object
93 94 95 |
# File 'lib/terrimporter/configuration.rb', line 93 def export_settings self['export_settings'] end |
#has_dynamic_javascripts? ⇒ Boolean
101 102 103 |
# File 'lib/terrimporter/configuration.rb', line 101 def has_dynamic_javascripts? !self['javascripts'].nil? and !self['javascripts']['dynamic_libraries'].nil? end |
#has_dynamic_plugins? ⇒ Boolean
105 106 107 |
# File 'lib/terrimporter/configuration.rb', line 105 def has_dynamic_plugins? !self['javascripts'].nil? and !self['javascripts']['dynamic_plugins'].nil? end |
#has_images? ⇒ Boolean
109 110 111 |
# File 'lib/terrimporter/configuration.rb', line 109 def has_images? !self['images'].nil? end |
#has_modules? ⇒ Boolean
113 114 115 |
# File 'lib/terrimporter/configuration.rb', line 113 def has_modules? !self['modules'].nil? end |
#has_stylesheets? ⇒ Boolean
97 98 99 |
# File 'lib/terrimporter/configuration.rb', line 97 def has_stylesheets? !self['stylesheets'].nil? and !self['stylesheets']['styles'].nil? end |
#images ⇒ Object
41 42 43 |
# File 'lib/terrimporter/configuration.rb', line 41 def images self['images'] end |
#images_server_path ⇒ Object
49 50 51 |
# File 'lib/terrimporter/configuration.rb', line 49 def images_server_path self['image_server_path'] end |
#javascripts_destination ⇒ Object
27 28 29 |
# File 'lib/terrimporter/configuration.rb', line 27 def javascripts_destination self['javascripts']['destination_path'] end |
#js_export_path ⇒ Object
15 16 17 |
# File 'lib/terrimporter/configuration.rb', line 15 def js_export_path self['js_export_path'] end |
#libraries_destination_path ⇒ Object
77 78 79 80 81 82 83 |
# File 'lib/terrimporter/configuration.rb', line 77 def libraries_destination_path if !self['javascripts']['libraries_destination_path'].nil? File.join(self['javascripts']['libraries_destination_path']) else File.join(self['javascripts']['destination_path']) end end |
#libraries_server_path ⇒ Object
53 54 55 |
# File 'lib/terrimporter/configuration.rb', line 53 def libraries_server_path self['libraries_server_path'] end |
#modules ⇒ Object
45 46 47 |
# File 'lib/terrimporter/configuration.rb', line 45 def modules self['modules'] end |
#plugins_destination_path ⇒ Object
85 86 87 88 89 90 91 |
# File 'lib/terrimporter/configuration.rb', line 85 def plugins_destination_path if !self['javascripts']['plugins_destination_path'].nil? File.join(self['javascripts']['plugins_destination_path']) else File.join(self['javascripts']['destination_path']) end end |
#plugins_server_path ⇒ Object
57 58 59 |
# File 'lib/terrimporter/configuration.rb', line 57 def plugins_server_path self['plugins_server_path'] end |
#replace_style_strings? ⇒ Boolean
71 72 73 74 75 |
# File 'lib/terrimporter/configuration.rb', line 71 def replace_style_strings? !self['stylesheets'].nil? and !self['stylesheets']['replace_strings'].nil? and !self['stylesheets']['replace_strings'].first.nil? end |
#stylesheet_replace_strings ⇒ Object
23 24 25 |
# File 'lib/terrimporter/configuration.rb', line 23 def stylesheet_replace_strings self['stylesheets']['replace_strings'] end |
#stylesheets ⇒ Object
31 32 33 34 35 36 37 38 39 |
# File 'lib/terrimporter/configuration.rb', line 31 def stylesheets stylesheet_list = ["base.css"] if has_stylesheets? stylesheet_list = stylesheet_list + self['stylesheets']['styles'].to_s.robust_split else LOG.debug "No additional stylesheets defined in configuration file." end stylesheet_list.add_missing_extension!('.css') end |
#stylesheets_destination ⇒ Object
19 20 21 |
# File 'lib/terrimporter/configuration.rb', line 19 def stylesheets_destination self['stylesheets']['destination_path'] end |