Skip to content

Commit

Permalink
make yardoc server embedding configurable
Browse files Browse the repository at this point in the history
  • Loading branch information
Petr Chalupa committed Jan 15, 2013
1 parent 98abd8d commit 088e2b7
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/views/common/_footer.haml
Expand Up @@ -3,5 +3,5 @@
#{link_to (_("%{app_name} Version: %{version}") % {:app_name => release_name, :version => Katello.config.katello_version}), about_path}
- else
#{_("%{app_name} Version: %{version}") % {:app_name => release_name, :version => Katello.config.katello_version}}
- if Rails.env.development?
- if Katello.config.embed_yard_documentation
#{link_to 'YARD documentation', 'yard/docs/katello/frames'}
4 changes: 2 additions & 2 deletions config.ru
Expand Up @@ -5,7 +5,7 @@ require ::File.expand_path('../config/environment', __FILE__)
# apply a prefix to the application, if one is defined
# e.g. http://some.server.com/prefix where '/prefix' is defined by env variable

if Rails.env.development?
if Katello.config.embed_yard_documentation
prefixed_router = Class.new YARD::Server::Router do
prefix = Katello.early_config.url_prefix + '/yard/'
methods = { :docs_prefix => 'docs', :list_prefix => 'list', :search_prefix => 'search' }
Expand All @@ -22,6 +22,6 @@ if Rails.env.development?
:server_options => { :incremental => true }
end

map Katello.early_config.url_prefix do
map Katello.config.url_prefix do
run Src::Application
end
2 changes: 2 additions & 0 deletions config/katello.template.yml
Expand Up @@ -73,6 +73,7 @@ common:
debug_rest: false
debug_pulp_proxy: false
debug_cp_proxy: false
embed_yard_documentation: false

#setup how often you want
#your notifications to be checked
Expand Down Expand Up @@ -178,6 +179,7 @@ production:
# The following configuration values override ones from the common section
#
development:
embed_yard_documentation: true
foreman:
random_password: false
database:
Expand Down
3 changes: 2 additions & 1 deletion lib/katello_config.rb
Expand Up @@ -361,7 +361,8 @@ def config_file_path
cloud_forms use_pulp cdn_proxy use_ssl warden katello? url_prefix foreman
search use_foreman password_reset_expiration redhat_repository_url port
elastic_url rest_client_timeout elastic_index allow_roles_logging
katello_version pulp tire_log log_level log_level_sql email_reply_address)
katello_version pulp tire_log log_level log_level_sql email_reply_address
embed_yard_documentation)

has_values :app_mode, %w(katello headpin)
has_values :url_prefix, %w(/headpin /sam /cfse /katello)
Expand Down

0 comments on commit 088e2b7

Please sign in to comment.