crowbar/barclamp-crowbar — pull request #329 by dpaterson (2013-01-07 19:21:16+00:00)
Title: Refactoring user api, controller and localization [1/1]

Some small refactoring of user management API, removal of service object, routing changes and localization refactoring.
Implemented BDD tests for user API.
Set dev flag for all UI based user management to get to ship ready quicker. So UI is implemented but all CRUD operations will be done through API for now. UI is read only unless in dev mode.

bin/barclamp_lib.rb | 4 +-
bin/crowbar_users | 204 ++++++++++
crowbar_framework/BDD/attrib.erl | 4 +-
crowbar_framework/BDD/barclamp.erl | 4 +-
crowbar_framework/BDD/bdd_restrat.erl | 44 ++-
crowbar_framework/BDD/bdd_webrat.erl | 1 -
crowbar_framework/BDD/crowbar.erl | 10 +-
crowbar_framework/BDD/default.config | 1 +
crowbar_framework/BDD/eurl.erl | 3 +
crowbar_framework/BDD/features/users.feature | 122 +++++-
crowbar_framework/BDD/linux_compile.sh | 1 +
crowbar_framework/BDD/simple_auth.erl | 3 -
crowbar_framework/BDD/users.erl | 203 ++++++++--
.../app/assets/stylesheets/_common.sass | 3 +
.../app/assets/stylesheets/_tables.sass | 15 +
.../app/controllers/application_controller.rb | 11 +-
.../app/controllers/barclamp_controller.rb | 2 +
.../app/controllers/users_controller.rb | 415 ++++++++++++++++++--
crowbar_framework/app/models/crowbar_service.rb | 5 +-
crowbar_framework/app/models/user.rb | 37 +-
.../app/views/devise/passwords/new.html.haml | 3 +
.../app/views/devise/registrations/edit.html.haml | 2 +-
.../app/views/devise/registrations/new.html.haml | 3 +-
.../app/views/devise/sessions/new.html.haml | 2 +-
.../app/views/layouts/application.html.haml | 2 +-
crowbar_framework/app/views/users/_form.html.haml | 28 ++
.../app/views/users/_form_reset_password.html.haml | 18 +
crowbar_framework/app/views/users/index.html.haml | 108 +++--
crowbar_framework/config/initializers/devise.rb | 4 +-
crowbar_framework/config/locales/crowbar/en.yml | 66 +++-
crowbar_framework/config/locales/en.yml | 4 +-
crowbar_framework/config/routes.rb | 45 ++-
.../doc/default/crowbar/devguide/api/user.md | 278 +++++++++++++
33 files changed, 1463 insertions(+), 192 deletions(-)

Crowbar-Pull-ID: cfa8ce87070d5601d90e44b46820962e30bb39ae

Crowbar-Release: development