820404- Renamed the debug cert button as suggested in the bz
generate token for foreman

this relate to recent change in foreman:
http://theforeman.org/issues/2109

addressing:
130108-20:15:11 debug: Executing '/usr/bin/ruby /usr/share/foreman/script/foreman-config -k oauth_active -v 'true'                              -k foreman_url -v '10-16-120-136.dhcp.rhq.lab.eng.bos.redhat.com'                              -k token_duration -v '60'                              -k manage_puppetca -v false                              -k oauth_consumer_key -v 'katello'                              -k oauth_consumer_secret -v 'u5l76IGiuHiL5BuxlPoRIUlPmA51GtCi'                              -k oauth_map_users -v 'true'                              -k administrator -v 'root@localhost.localdomain''
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns: /usr/share/foreman/config/initializers/secret_token.rb:6:in `read': Permission denied - /usr/share/foreman/tmp/secret_token (Errno::EACCES)
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/share/foreman/config/initializers/secret_token.rb:6
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:201:in `load'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:201
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:200:in `each'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:200
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `instance_exec'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `run'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:50:in `run_initializers'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `each'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `run_initializers'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:134:in `initialize!'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `send'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/share/foreman/config/environment.rb:5
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:in `new_constants_in'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:103:in `require_environment!'
130108-20:15:16 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/share/foreman/script/foreman-config:75
130108-20:15:16 err: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns: change from notrun to 0 failed: /usr/bin/ruby /usr/share/foreman/script/foreman-config -k oauth_active -v 'true'                              -k foreman_url -v '10-16-120-136.dhcp.rhq.lab.eng.bos.redhat.com'                              -k token_duration -v '60'                              -k manage_puppetca -v false                              -k oauth_consumer_key -v 'katello'                              -k oauth_consumer_secret -v 'u5l76IGiuHiL5BuxlPoRIUlPmA51GtCi'                              -k oauth_map_users -v 'true'                              -k administrator -v 'root@localhost.localdomain' returned 1 instead of one of [0] at /usr/share/katello/install/puppet/modules/foreman/manifests/config.pp:106
130108-20:15:16 debug: Exec[foreman_config](provider=posix): Executing '/usr/bin/ruby /usr/share/foreman/script/foreman-config -k oauth_active -v 'true'                              -k foreman_url -v '10-16-120-136.dhcp.rhq.lab.eng.bos.redhat.com'                              -k token_duration -v '60'                              -k manage_puppetca -v false                              -k oauth_consumer_key -v 'katello'                              -k oauth_consumer_secret -v 'u5l76IGiuHiL5BuxlPoRIUlPmA51GtCi'                              -k oauth_map_users -v 'true'                              -k administrator -v 'root@localhost.localdomain''
130108-20:15:16 debug: Executing '/usr/bin/ruby /usr/share/foreman/script/foreman-config -k oauth_active -v 'true'                              -k foreman_url -v '10-16-120-136.dhcp.rhq.lab.eng.bos.redhat.com'                              -k token_duration -v '60'                              -k manage_puppetca -v false                              -k oauth_consumer_key -v 'katello'                              -k oauth_consumer_secret -v 'u5l76IGiuHiL5BuxlPoRIUlPmA51GtCi'                              -k oauth_map_users -v 'true'                              -k administrator -v 'root@localhost.localdomain''
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns: /usr/share/foreman/config/initializers/secret_token.rb:6:in `read': Permission denied - /usr/share/foreman/tmp/secret_token (Errno::EACCES)
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/share/foreman/config/initializers/secret_token.rb:6
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:201:in `load'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:201
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:200:in `each'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/engine.rb:200
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `instance_exec'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:25:in `run'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:50:in `run_initializers'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `each'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/initializable.rb:49:in `run_initializers'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:134:in `initialize!'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `send'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:77:in `method_missing'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/share/foreman/config/environment.rb:5
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:593:in `new_constants_in'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:225:in `load_dependency'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/activesupport-3.0.10/lib/active_support/dependencies.rb:239:in `require'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/lib/ruby/gems/1.8/gems/railties-3.0.10/lib/rails/application.rb:103:in `require_environment!'
130108-20:15:21 notice: /Stage[main]/Foreman::Config/Exec[foreman_config]/returns:      from /usr/share/foreman/script/foreman-config:75
130108-20:15:21 err: /Stage[main]/Foreman::Config/Exec[foreman_config]: Failed to call refresh: /usr/bin/ruby /usr/share/foreman/script/foreman-config -k oauth_active -v 'true'
run security:generate_token only if token does not exist
882311 - remove scope-based organization hiding when deleting it
882311 - hide and check organizations being deleted
run system-test on os x without warning
Merge pull request #1376 from xsuchy/pull-req-token

generate token for foreman
New shiny README.md for Katello repo
Merge pull request #1361 from iNecas/readme

New shiny README.md for Katello repo
fix config_template info formatting
Merge pull request #1378 from pitr-ch/quick-fix/system-tests

fix a system tests in config_template section
890000 - enabling certv3 in candlepin conf
Merge pull request #1381 from jsomara/890000

890000 - enabling certv3 in candlepin conf
Merge pull request #1358 from lzap/user-org-deletion-882311

User org deletion 882311
adding thumbslug to headpin's ping function and tests, etc

This commit contains changes to Ping to include Thumbslug in the ping
list. At this time, Thumbslug requires cert authentication for its
ping function to work correctly, so headpin looks for an SSL error
to know whether Thumblug is running or not.

Also contained are spec tests for the Ping model and Ping controller.
All outpoing HTTP requests are stubbed with WebMock, and all OAuth
requests are stubbed at their respective Resource objects.

Included in this commit a new rake take for running
the parallel test with a little more control. It allows for one to run
katello- and headpin-only tests using parallel_test.

for tests, run:

    rake ptest:spec
    # these run with 4 cores, by default
    # tests for headpin vs katello are determined by the 'app_mode' in
    # config/katello.yml

You can also specify a regular expression to single out particular spec
files

run:

    rake ptest:spec['ping'] # spec files with 'ping'
    rake ptest:spec['user|organization'] # runs 'user' and 'organization' spec files
    # runs with one core when you specify a search string though you can
    # override it

    rake "ptest:spec['user|organization', 36]" # run the spec tests on 36 cores. woah!

The way that rspec differentiates between katello and headpin tests is
by placing tags on the test blocks.

To specify a test to run for katello only, add a `:katello => true` tag

    describe "set of katello tests", :katello => true do ... end
    context "set of katello test", :katello => true do ... end
    it "runs a test for katello only", :katello => true do ... end

or `:headpin => true` for headpin-only tests

    describe "set of headpin tests", :headpin => true do ... end
    context "set of headpin test", :headpin => true do ... end
    it "runs a test for headpin only", :headpin => true do ... end

For tests that you want to run on both sides, simply do not
add a tag.
emails - add default From to login/password emails

It was observed that with the nightly build the password reset
and login emails were no longer being sent for RHEL server
configurations.

During investigation, found the following in the delayed_jobs.log:

2013-01-10T12:10:41-0500: [Worker(delayed_job host:katello.com pid:28884)]
Class#logins failed with ArgumentError: A sender (Return-Path, Sender or From)
required to send a message - 0 failed attempts

In order to address this, we are adding a configuration property
(email_reply_address) to the katello.yml that may be used to specify
the address. If not specified, a default of 'no-reply@host' will be
used, where host is the value specified for that property.

Note: in the future, we may want to add this to the UI in the
form of a database attribute; however, we might want to consider
having the email specified at different levels possibly based on
org or classification of email (e.g. login related emails, consumer
related emails...etc)
Merge pull request #1387 from bbuckingham/fork-email_from

emails - add default From to login/password emails
820392 - repository hostname validation

Allow not fully qualified names as a repository URL. Also allow
numbers as first characters. Added some specs for edge cases.
Move all validators to one place

Since validators are not models they should not be in app/models.
All validators are now placed in lib/validators/ and each has its own
definition file.

All validators are in module Validators. When you want to use custom
validation in model you must specify a validator class so it gets loaded
by autoloader. If you use DSL provided by ActiveModel::Validations for
custom validator you'll receive unknown validator error because models
are loaded before lib. That's why we should always use validates_with
when dealing with custom validators.
Code cleanup

To obtain boolean as a result !! is usually used. Also parenthesis in
method definiton for arguments should be used.