Module: ApplicationHelper
- Includes:
- DeploymentInfo
- Defined in:
- app/helpers/application_helper.rb
Overview
rubocop:todo Style/Documentation
Defined Under Namespace
Modules: DeploymentInfo
Instance Method Summary collapse
-
#api ⇒ Object
Easy access to the api from the console.
-
#apple_touch_icon ⇒ String
Return the appropriate apple-touch-icon for the current environment.
- #each_robot(&block) ⇒ Object
- #environment ⇒ Object
-
#favicon ⇒ String
Return the appropriate favicon for the current environment.
-
#icon_suffix ⇒ String
Returns the appropriate icon suffix for the current environment Returns empty string for production Returns “-##environment” for training, staging Returns “-development” for any other environment.
-
#pipeline_groups ⇒ Object
Return a list of unique pipeline group names.
- #version_information ⇒ Object included from DeploymentInfo
Instance Method Details
#api ⇒ Object
Easy access to the api from the console
22 23 24 |
# File 'app/helpers/application_helper.rb', line 22 def api Sequencescape::Api.new(Limber::Application.config.api.v1..dup) end |
#apple_touch_icon ⇒ String
Return the appropriate apple-touch-icon for the current environment
65 66 67 |
# File 'app/helpers/application_helper.rb', line 65 def apple_touch_icon "apple-touch-icon#{icon_suffix}.png" end |
#each_robot(&block) ⇒ Object
30 31 32 |
# File 'app/helpers/application_helper.rb', line 30 def each_robot(&block) Robots.each_robot(&block) end |
#environment ⇒ Object
26 27 28 |
# File 'app/helpers/application_helper.rb', line 26 def environment Rails.env end |
#favicon ⇒ String
Return the appropriate favicon for the current environment
59 60 61 |
# File 'app/helpers/application_helper.rb', line 59 def favicon "favicon#{icon_suffix}.ico" end |
#icon_suffix ⇒ String
Returns the appropriate icon suffix for the current environment Returns empty string for production Returns “-##environment” for training, staging Returns “-development” for any other environment
45 46 47 48 49 50 51 52 53 54 55 |
# File 'app/helpers/application_helper.rb', line 45 def icon_suffix environment = Rails.env case environment when 'production' '' when 'training', 'staging' "-#{environment}" else '-development' end end |
#pipeline_groups ⇒ Object
Return a list of unique pipeline group names
35 36 37 38 |
# File 'app/helpers/application_helper.rb', line 35 def pipeline_groups return [] if Settings.pipelines.list.empty? Settings.pipelines.map(&:pipeline_group).uniq.sort end |