refinerycms 0.9.8 → 0.9.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (134) hide show
  1. data/Gemfile +6 -6
  2. data/app/controllers/application_controller.rb +2 -1
  3. data/bin/refinerycms +36 -32
  4. data/changelog.md +471 -0
  5. data/config/environments/production.rb +1 -1
  6. data/db/migrate/20100606135207_change_thumbnail_sizes_for_dragonfly.rb +4 -4
  7. data/db/migrate/20100826232810_move_inquiry_settings_to_refinery_settings.rb +2 -2
  8. data/db/migrate/20100831122919_move_page_to_nested_set.rb +28 -0
  9. data/db/schema.rb +7 -1
  10. data/db/seeds/refinery_settings.rb +2 -4
  11. data/license.md +21 -0
  12. data/readme.md +97 -0
  13. data/todo.md +61 -0
  14. data/vendor/refinerycms/authentication/app/views/admin/users/index.html.erb +5 -13
  15. data/vendor/refinerycms/authentication/app/views/layouts/login.html.erb +1 -1
  16. data/vendor/refinerycms/authentication/config/locales/de.yml +53 -56
  17. data/vendor/refinerycms/authentication/config/locales/en.yml +1 -2
  18. data/vendor/refinerycms/authentication/config/locales/lv.yml +38 -38
  19. data/vendor/refinerycms/authentication/config/locales/pt-BR.yml +21 -48
  20. data/vendor/refinerycms/authentication/features/lost_password.feature +40 -0
  21. data/vendor/refinerycms/authentication/features/manage_users.feature +57 -0
  22. data/vendor/refinerycms/authentication/features/step_definitions/lost_password.rb +8 -0
  23. data/vendor/refinerycms/authentication/features/step_definitions/user_steps.rb +32 -0
  24. data/vendor/refinerycms/authentication/features/support/factories.rb +17 -0
  25. data/vendor/refinerycms/authentication/features/support/paths.rb +24 -0
  26. data/vendor/refinerycms/authentication/lib/authenticated_system.rb +1 -1
  27. data/vendor/refinerycms/authentication/lib/authentication.rb +1 -1
  28. data/vendor/refinerycms/core/app/views/admin/_head.html.erb +4 -4
  29. data/vendor/refinerycms/core/app/views/admin/_menu_tab.html.erb +2 -2
  30. data/vendor/refinerycms/core/app/views/layouts/admin.html.erb +1 -1
  31. data/vendor/refinerycms/core/app/views/layouts/admin_dialog.html.erb +1 -1
  32. data/vendor/refinerycms/core/app/views/shared/_footer.html.erb +1 -1
  33. data/vendor/refinerycms/core/app/views/shared/_google_analytics.html.erb +1 -1
  34. data/vendor/refinerycms/core/app/views/shared/_header.html.erb +1 -1
  35. data/vendor/refinerycms/core/app/views/shared/_menu.html.erb +5 -2
  36. data/vendor/refinerycms/core/app/views/shared/_menu_branch.html.erb +6 -3
  37. data/vendor/refinerycms/core/app/views/shared/_site_bar.html.erb +11 -15
  38. data/vendor/refinerycms/core/app/views/shared/admin/_form_actions.html.erb +1 -0
  39. data/vendor/refinerycms/core/app/views/shared/admin/_image_picker.html.erb +3 -3
  40. data/vendor/refinerycms/core/app/views/shared/admin/_make_sortable.html.erb +2 -1
  41. data/vendor/refinerycms/core/app/views/shared/admin/_resource_picker.html.erb +24 -17
  42. data/vendor/refinerycms/core/app/views/wymiframe.html.erb +1 -1
  43. data/vendor/refinerycms/core/config/locales/de.yml +50 -51
  44. data/vendor/refinerycms/core/config/locales/en.yml +5 -2
  45. data/vendor/refinerycms/core/config/locales/lv.yml +6 -3
  46. data/vendor/refinerycms/core/config/locales/pt-BR.yml +34 -38
  47. data/vendor/refinerycms/core/crud.md +12 -12
  48. data/vendor/refinerycms/core/features/engine_generator.feature +27 -0
  49. data/vendor/refinerycms/core/features/search.feature +56 -0
  50. data/vendor/refinerycms/core/features/site_bar.feature +24 -0
  51. data/vendor/refinerycms/core/features/step_definitions/core_steps.rb +61 -0
  52. data/vendor/refinerycms/core/features/step_definitions/engine_generator_steps.rb +19 -0
  53. data/vendor/refinerycms/core/features/step_definitions/generator_steps.rb +11 -0
  54. data/vendor/refinerycms/core/features/support/paths.rb +14 -0
  55. data/vendor/refinerycms/core/features/uploads/beach.jpeg +0 -0
  56. data/vendor/refinerycms/core/features/uploads/refinery_is_awesome.txt +1 -0
  57. data/vendor/refinerycms/core/lib/core.rb +52 -53
  58. data/vendor/refinerycms/core/lib/generators/refinery_engine/refinery_engine_generator.rb +14 -3
  59. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/controllers/admin/plural_name_controller.rb +3 -1
  60. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/models/singular_name.rb +4 -3
  61. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/admin/plural_name/_form.html.erb +2 -1
  62. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/admin/plural_name/_singular_name.html.erb +6 -2
  63. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/plural_name/index.html.erb +3 -1
  64. data/vendor/refinerycms/core/lib/generators/refinery_engine/templates/app/views/plural_name/show.html.erb +7 -3
  65. data/vendor/refinerycms/core/lib/refinery/application_controller.rb +85 -75
  66. data/vendor/refinerycms/core/lib/refinery/application_helper.rb +10 -190
  67. data/vendor/refinerycms/core/lib/refinery/crud.rb +283 -0
  68. data/vendor/refinerycms/core/lib/refinery/{form_helpers.rb → helpers/form_helper.rb} +0 -0
  69. data/vendor/refinerycms/core/lib/refinery/helpers/html_truncation_helper.rb +26 -0
  70. data/vendor/refinerycms/core/lib/refinery/helpers/image_helper.rb +37 -0
  71. data/vendor/refinerycms/core/lib/refinery/helpers/menu_helper.rb +38 -0
  72. data/vendor/refinerycms/core/lib/refinery/helpers/meta_helper.rb +67 -0
  73. data/vendor/refinerycms/core/lib/refinery/helpers/script_helper.rb +36 -0
  74. data/vendor/refinerycms/core/lib/refinery/helpers/site_bar_helper.rb +26 -0
  75. data/vendor/refinerycms/core/lib/refinery/helpers/tag_helper.rb +19 -0
  76. data/vendor/refinerycms/core/lib/refinery/helpers/translation_helper.rb +17 -0
  77. data/vendor/refinerycms/core/lib/refinery/plugin.rb +3 -3
  78. data/vendor/refinerycms/core/lib/tasks/refinery.rake +4 -3
  79. data/vendor/refinerycms/core/public/javascripts/refinery/admin.js +93 -101
  80. data/vendor/refinerycms/core/public/javascripts/refinery/core.js +3 -0
  81. data/vendor/refinerycms/core/public/javascripts/refinery/nestedsortables.js +164 -0
  82. data/vendor/refinerycms/core/public/javascripts/refinery/serializelist.js +66 -0
  83. data/vendor/refinerycms/core/public/stylesheets/refinery/refinery.css +11 -73
  84. data/vendor/refinerycms/dashboard/config/locales/de.yml +6 -6
  85. data/vendor/refinerycms/dashboard/config/locales/pt-BR.yml +3 -5
  86. data/vendor/refinerycms/dashboard/features/dashboard.feature +54 -0
  87. data/vendor/refinerycms/dashboard/features/support/paths.rb +14 -0
  88. data/vendor/refinerycms/images/app/controllers/admin/images_controller.rb +6 -6
  89. data/vendor/refinerycms/images/app/helpers/admin/images_helper.rb +1 -1
  90. data/vendor/refinerycms/images/app/views/admin/images/_existing_image.html.erb +15 -13
  91. data/vendor/refinerycms/images/app/views/admin/images/_grid_view.html.erb +1 -1
  92. data/vendor/refinerycms/images/app/views/admin/images/_list_view_image.html.erb +1 -1
  93. data/vendor/refinerycms/images/config/locales/de.yml +21 -25
  94. data/vendor/refinerycms/images/config/locales/pt-BR.yml +13 -23
  95. data/vendor/refinerycms/images/features/manage_images.feature +48 -0
  96. data/vendor/refinerycms/images/features/step_definitions/image_steps.rb +37 -0
  97. data/vendor/refinerycms/images/features/support/paths.rb +17 -0
  98. data/vendor/refinerycms/images/features/uploads/beach.jpeg +0 -0
  99. data/vendor/refinerycms/images/features/uploads/id-rather-be-here.jpg +0 -0
  100. data/vendor/refinerycms/images/features/uploads/refinery_is_awesome.txt +1 -0
  101. data/vendor/refinerycms/images/lib/images.rb +6 -0
  102. data/vendor/refinerycms/images/readme.md +12 -36
  103. data/vendor/refinerycms/pages/app/controllers/admin/pages_controller.rb +4 -42
  104. data/vendor/refinerycms/pages/app/controllers/pages_controller.rb +1 -1
  105. data/vendor/refinerycms/pages/app/models/page.rb +3 -4
  106. data/vendor/refinerycms/pages/app/sweepers/page_sweeper.rb +18 -0
  107. data/vendor/refinerycms/pages/app/views/admin/pages/_form_advanced_options.html.erb +1 -1
  108. data/vendor/refinerycms/pages/app/views/admin/pages/_page.html.erb +6 -5
  109. data/vendor/refinerycms/pages/config/locales/de.yml +66 -36
  110. data/vendor/refinerycms/pages/config/locales/pt-BR.yml +29 -57
  111. data/vendor/refinerycms/pages/features/manage_pages.feature +45 -0
  112. data/vendor/refinerycms/pages/features/step_definitions/page_steps.rb +29 -0
  113. data/vendor/refinerycms/pages/features/support/paths.rb +18 -0
  114. data/vendor/refinerycms/pages/lib/pages.rb +5 -0
  115. data/vendor/refinerycms/pages/spec/models/page_spec.rb +13 -0
  116. data/vendor/refinerycms/refinery.rb +1 -1
  117. data/vendor/refinerycms/resources/app/views/admin/resources/_existing_resource.html.erb +2 -2
  118. data/vendor/refinerycms/resources/config/locales/de.yml +16 -17
  119. data/vendor/refinerycms/resources/config/locales/pt-BR.yml +15 -17
  120. data/vendor/refinerycms/resources/features/manage_files.feature +39 -0
  121. data/vendor/refinerycms/resources/features/step_definitions/file_steps.rb +21 -0
  122. data/vendor/refinerycms/resources/features/support/paths.rb +17 -0
  123. data/vendor/refinerycms/resources/features/uploads/beach.jpeg +0 -0
  124. data/vendor/refinerycms/resources/features/uploads/refinery_is_awesome.txt +1 -0
  125. data/vendor/refinerycms/resources/lib/resources.rb +17 -1
  126. data/vendor/refinerycms/settings/app/models/refinery_setting.rb +82 -64
  127. data/vendor/refinerycms/settings/config/locales/de.yml +36 -16
  128. data/vendor/refinerycms/settings/config/locales/pt-BR.yml +32 -34
  129. data/vendor/refinerycms/settings/features/manage_refinery_settings.feature +5 -0
  130. data/vendor/refinerycms/settings/lib/settings.rb +1 -1
  131. metadata +86 -53
  132. data/vendor/refinerycms/core/lib/crud.rb +0 -265
  133. data/vendor/refinerycms/core/lib/refinery/html_truncation_helper.rb +0 -22
  134. data/vendor/refinerycms/core/public/javascripts/jquery/jquery.nestedsortables.js +0 -186
@@ -14,13 +14,11 @@ en:
14
14
  enable_all: enable all
15
15
  index:
16
16
  create_new_user: Create New User
17
- no_users_yet: There are no users yet. Click "Create New User" to add your first user.
18
17
  user:
19
18
  email_user: Email this user
20
19
  preview: (%{who}) created %{created_at}
21
20
  sessions:
22
21
  login_successful: Logged in successfully
23
- login_failed: Sorry, your password or username was incorrect.
24
22
  new:
25
23
  hello_please_sign_in: Hello! Please sign in.
26
24
  sign_in: Sign in
@@ -50,6 +48,7 @@ en:
50
48
  authlogic:
51
49
  error_messages:
52
50
  login_blank: can not be blank
51
+ password_blank: can not be blank
53
52
  login_invalid: should use only letters, numbers, spaces, and .-_@ please.
54
53
  email_invalid: should look like an email address.
55
54
  no_authentication_details: You did not provide any details for authentication.
@@ -4,63 +4,63 @@ lv:
4
4
  title: Lietotāji
5
5
  admin:
6
6
  users:
7
- delete: Remove this user forever
8
- edit: Edit this user
7
+ delete: Dzēst šo lietotāju
8
+ edit: Labot šo lietotāju
9
9
  update:
10
- cannot_remove_user_plugin_from_current_user: You cannot remove the 'Users' plugin from the currently logged in account.
10
+ cannot_remove_user_plugin_from_current_user: Jūs nevarat dzēst pieeju 'Lietotāju' spraudnim kontam ar kuru pašlaik esat pieslēdzies.
11
11
  form:
12
- blank_password_keeps_current: Leaving password blank keeps the current password
13
- enable_all: enable all
12
+ blank_password_keeps_current: Atstājot paroles lauku tukšu, tiks paturēta pašreizējā parole
13
+ enable_all: iespējot visu
14
14
  index:
15
- create_new_user: Create New User
16
- no_users_yet: There are no users yet. Click "Create New User" to add your first user.
15
+ create_new_user: Izveidot Jaunu Lietotāju
17
16
  user:
18
- email_user: Email this user
19
- preview: (%{who}) created %{created_at}
17
+ email_user: Sūtīt epastu šim lietotājam
18
+ preview: (%{who}) izveidots %{created_at}
20
19
  sessions:
21
- login_successful: Logged in successfully
22
- login_failed: Sorry, your password or username was incorrect.
20
+ login_successful: Autentifikācija noritēja sekmīgi
23
21
  new:
24
- hello_please_sign_in: Hello! Please sign in.
25
- sign_in: Sign in
26
- forgot_password: I forgot my password
22
+ hello_please_sign_in: Sveicināti! Lūdzu, veiciet autentifikāciju.
23
+ sign_in: Ienākt
24
+ forgot_password: Aizmirsu paroli
27
25
  users:
28
- setup_website_name: First let's give the site a name. <a href='%{link}' name='%{title}'>Go here</a> to edit your website's name
26
+ setup_website_name: Pirmkārt šim saitam vajadzētu uzstādīt nosaukumu. <a href='%{link}' name='%{title}'>Spiediet šeit</a>, lai uzstādītu sava saita nosaukumu
29
27
  new:
30
- fill_form: Fill out your details below so that we can get you started.
31
- sign_up: Sign up
28
+ fill_form: Aizpildiet zemāk redzamos laukus, lai varam sākt.
29
+ sign_up: Izveidot
32
30
  create:
33
- welcome: Welcome to Refinery, %{who}
31
+ welcome: Laipni lūdzam Refinery, %{who}
34
32
  forgot:
35
- email_address: Email Address
36
- enter_email_address: Please enter the email address for your account.
37
- reset_password: Reset password
38
- blank_email: You did not enter an email address.
39
- email_not_associated_with_account: Sorry, '%{email}' isn't associated with any accounts.<br />Are you sure you typed the correct email address?
40
- email_reset_sent: An email has been sent to you with a link to reset your password.
33
+ email_address: Epasta adrese
34
+ enter_email_address: Lūdzu, norādiet sava konta epasta adresi.
35
+ reset_password: Atjaunot paroli
36
+ blank_email: Jūs nenorādījāt epasta adresi.
37
+ email_not_associated_with_account: Atvainojiet, epasts '%{email}' nav piesaistīts nevienam kontam.<br />Vai tiešām norādījāt korektu epastu?
38
+ email_reset_sent: Uz Jūsu epastu tika izsūtīta vēstule, kura satur saiti, lai atjaunotu paroli.
41
39
  reset:
42
- code_invalid: We're sorry, but this reset code has expired or is invalid. If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process.
43
- successful: Password reset successfully for '%{email}'
44
- pick_new_password_for: Pick a new password for %{email}
45
- reset_password: Reset password
46
- password_blank: Fill out fields with matching passwords.
40
+ code_invalid: Atvainojiet, šim paroles atjaunošanas kodam ir beidzies izmantošanas termiņš vai arī tas nav derīgs. Ja Jums ir radušās problēmas, tad pamēģiniet nokopēt saņemto saiti no epasta un iekopēt to pārluka adrešu laukā vai arī mēģiniet sākt atjuanošanas procesu no sākuma.
41
+ successful: Paroles atjaunošana noritēja sekmīgi priekš '%{email}'
42
+ pick_new_password_for: Izveidojiet jaunu paroli priekš %{email}
43
+ reset_password: Atjaunot paroli
44
+ password_blank: Norādiet vienādas paroles abos laukos.
47
45
  user_mailer:
48
- link_to_reset_your_password: Link to reset your password
46
+ link_to_reset_your_password: Saite, lai atjaunotu paroli
49
47
  authlogic:
50
48
  error_messages:
51
- login_blank: can not be blank
49
+ login_blank: jānorāda obligāti
50
+ password_blank: jānorāda obligāti
52
51
  login_invalid: should use only letters, numbers, spaces, and .-_@ please.
53
- email_invalid: should look like an email address.
54
- no_authentication_details: You did not provide any details for authentication.
52
+ login_invalid: drīkst saturēt tikai burtus, ciparus, atstarpes un .-_@
53
+ email_invalid: neizskatās pēc epasta adreses.
54
+ no_authentication_details: Netika norādīta nekāda informācija priekš autentifikācijas.
55
55
  models:
56
56
  user_session: UserSession
57
57
  attributes:
58
58
  user_session:
59
- login: Login
60
- email: Email
61
- password: Password
62
- remember_me: Remember me
63
- incorrect: Sorry, your %{login_field} or password was incorrect.
59
+ login: Lietotāja vārds
60
+ email: Epasts
61
+ password: Parole
62
+ remember_me: Atcerēties mani
63
+ incorrect: Atvainojiet, %{login_field} vai parole nav pareiza.
64
64
  activerecord:
65
65
  models:
66
66
  user: lietotājs
@@ -2,90 +2,55 @@ pt-BR:
2
2
  plugins:
3
3
  refinery_users:
4
4
  title: Usuários
5
+ description: Gerenciar usuários
5
6
  admin:
6
7
  users:
8
+ delete: Remover este usuário para sempre
9
+ edit: Editar este usuário
7
10
  update:
8
11
  cannot_remove_user_plugin_from_current_user: "Você não pode remover o plugin 'Usuários' a partir da conta atualmente logada."
9
12
  form:
10
13
  blank_password_keeps_current: Deixar a senha em branco mantém a senha atual
11
- enable_all: 'habilitar todos'
14
+ enable_all: habilitar todos
12
15
  index:
13
16
  create_new_user: Criar Novo Usuário
14
- no_users_yet: Ainda não existem usuários. Clique em "Criar Novo Usuário" para adicionar seu primeiro usuário.
15
17
  user:
16
- confirm_delete_message: "Tem certeza que você deseja remover '%{who}'?"
17
- confirm_delete_title: Remover este usuário para sempre
18
- edit_user: Editar este usuário
19
18
  email_user: Enviar e-mail para este usuário
20
19
  preview: "(%{who}) criado em %{created_at}"
21
20
  sessions:
22
21
  login_successful: Logado com sucesso
23
- login_failed: "Desculpe, sua senha ou nome de usuário estavam incorretos."
24
- logged_out: Você foi deslogado.
25
22
  new:
26
23
  hello_please_sign_in: "Olá! Faça o login"
27
24
  sign_in: Entrar
28
25
  forgot_password: Esqueci minha senha
29
26
  users:
30
- setup_website_name: "Primeiro vamos dar um nome ao site. <a href='%{link}' name='%{title}'>Clique aqui</a> para editar o nome do seu site"
31
- signup_disabled: Cadastro de usuários está desabilitado
27
+ setup_website_name: "Primeiro vamos dar um nome ao site. <a href='%{link}' name='%{title}'>Clique aqui</a> para editar o nome do seu site."
32
28
  new:
33
29
  fill_form: Preencha o formulário abaixo com seus detalhes pra que você possa começar.
34
30
  sign_up: Cadastrar
35
31
  create:
36
32
  welcome: Bem-vindo, %{who}
37
- signup_complete: Cadastro completo!
38
33
  forgot:
39
34
  email_address: Endereço de email
40
35
  enter_email_address: "Por favor, preencha o endereço de email da sua conta."
41
- reset_password: Esqueci minha senha
36
+ reset_password: Recuperar senha
42
37
  blank_email: Você não preencheu um endereço de e-mail.
43
38
  email_not_associated_with_account: "Desculpe, '%{email}' não está associado com alguma conta. <br/>Tem certeza que você digitou o endereço de email correto?"
44
- email_reset_sent: Um email foi enviado para você com um link para alterar sua senha.
39
+ email_reset_sent: Um email foi enviado para você com um link para recuperar sua senha.
45
40
  reset:
46
41
  code_invalid: "Lamentamos, mas este código reset expirou ou é inválido. Se você está tendo problemas tente copiar e colar a URL do seu e-mail em seu navegador ou reinicie o processo de mudança de senha."
47
- successful: "Senha alterada com sucesso para %{email}"
48
- pick_new_password_for: "Digite uma nova senha para %{email}"
49
- reset_password: Alterar senha
42
+ successful: "Senha alterada com sucesso para o e-mail %{email}"
43
+ pick_new_password_for: "Digite uma nova senha para o e-mail %{email}"
44
+ reset_password: Recuperar senha
45
+ password_blank: Preencha com uma nova senha.
50
46
  user_mailer:
51
- please_activate: "Por favor, ative sua nova conta"
52
- activated: Sua conta foi ativada!
53
- activated_email: "%{who}, sua conta foi ativada. Agora você pode começar a adicionar seus plugins:"
54
- account_created: Sua conta foi criada.
55
- user_name: Nome de usuário %{name}
56
- password: Senha %{password}
57
- visit_url: "Visite esta url para ativar sua conta:"
58
47
  link_to_reset_your_password: Link para alterar sua senha
59
- activerecord:
60
- errors:
61
- models:
62
- user:
63
- attributes:
64
- email:
65
- error_messages:
66
- email_invalid: deveria se parecer com um endereço de email.
67
- login:
68
- error_messages:
69
- login_invalid: "deveria usar apenas letras, números, espaços e .-_@, por favor."
70
- models:
71
- user: Usuário
72
- attributes:
73
- user:
74
- password: Senha
75
- password_confirmation: Confirmação da senha
76
- plugin_access: Acesso aos plugins
77
48
  authlogic:
78
49
  error_messages:
79
50
  login_blank: não pode estar em branco
80
- login_not_found: não é válido
81
- login_invalid: "deve usar somente letras, números, espaços e .- _ @ por favor"
82
- consecutive_failed_logins_limit_exceeded: "Limite de tentativas de logins falhos excedido, a conta está desabilitada."
83
- email_invalid: Deverá ser parecido com um endereço de e-mail
84
51
  password_blank: não pode estar em branco
85
- password_invalid: não é válido
86
- not_active: Sua conta não está ativa
87
- not_confirmed: Sua conta não está confirmada
88
- not_approved: Sua conta não está aprovada
52
+ login_invalid: "deve usar somente letras, números, espaços e .- _ @ por favor"
53
+ email_invalid: Deverá ser um endereço de e-mail válido.
89
54
  no_authentication_details: Você não forneceu todos os detalhes para autenticação.
90
55
  models:
91
56
  user_session: Login
@@ -96,3 +61,11 @@ pt-BR:
96
61
  password: Senha
97
62
  remember_me: Lembrar de mim
98
63
  incorrect: "Desculpe, seu %{login_field} ou senha estava errada."
64
+ activerecord:
65
+ models:
66
+ user: Usuário
67
+ attributes:
68
+ user:
69
+ plugin_access: Acesso
70
+ password: Senha
71
+ password_confirmation: Confirmação da senha
@@ -0,0 +1,40 @@
1
+ Feature: Lost Password
2
+ In order to restore my password
3
+ As a lost soul
4
+ I want to reset my password
5
+
6
+ Scenario: Forgot Password page (no email entered)
7
+ Given I am on the forgot password page
8
+ When I press "Reset password"
9
+ Then I should see "You did not enter an email address."
10
+
11
+ Scenario: Forgot Password page (non existing email entered)
12
+ Given I am on the forgot password page
13
+ And I have a user with email "green@cukes.com"
14
+ When I fill in "user_email" with "none@cukes.com"
15
+ And I press "Reset password"
16
+ Then I should see "Sorry, 'none@cukes.com' isn't associated with any accounts."
17
+ And I should see "Are you sure you typed the correct email address?"
18
+
19
+ Scenario: Forgot Password page (existing email entered)
20
+ Given I am on the forgot password page
21
+ And I have a user with email "green@cukes.com"
22
+ When I fill in "user_email" with "green@cukes.com"
23
+ And I press "Reset password"
24
+ Then I should see "An email has been sent to you with a link to reset your password."
25
+
26
+ Scenario: Reset password page (invalid reset_code)
27
+ Given I am not requesting password reset
28
+ When I go to the reset password page
29
+ Then I should be on the forgot password page
30
+ And I should see "We're sorry, but this reset code has expired or is invalid."
31
+ And I should see "If you are having issues try copying and pasting the URL from your email into your browser or restarting the reset password process."
32
+
33
+ Scenario: Reset password page (valid reset_code)
34
+ Given I am requesting password reset
35
+ When I go to the reset password page
36
+ And I fill in "Password" with "cukes"
37
+ And I fill in "Password confirmation" with "cukes"
38
+ And I press "Reset password"
39
+ Then I should be on the admin root
40
+ And I should see "Password reset successfully for"
@@ -0,0 +1,57 @@
1
+ @users @users-manage
2
+ Feature: Manage Users
3
+ In order to control who can access my website's backend
4
+ As an administrator
5
+ I want to create and manage users
6
+
7
+ Background:
8
+ Given I have no users
9
+
10
+ Scenario: When there are no users, you are invited to create a user
11
+ When I go to the home page
12
+ Then I should see "There are no users yet, so we'll set you up first."
13
+
14
+ Scenario: When there are no users, you can create a user
15
+ When I go to the home page
16
+ And I follow "Continue..."
17
+ And I should see "Fill out your details below so that we can get you started."
18
+ And I fill in "Login" with "cucumber"
19
+ And I fill in "Email" with "green@cucumber.com"
20
+ And I fill in "Password" with "greenandjuicy"
21
+ And I fill in "Password confirmation" with "greenandjuicy"
22
+ And I press "Sign up"
23
+ Then I should see "Welcome to Refinery, cucumber."
24
+ And I should see "Latest Activity"
25
+ And I should have 1 user
26
+
27
+ Scenario: User List
28
+ Given I have a user named "resolve"
29
+ And I am a logged in refinery user
30
+ When I go to the list of users
31
+ Then I should see "resolve"
32
+
33
+ Scenario: Create User
34
+ Given I have a user named "resolve"
35
+ And I am a logged in refinery user
36
+ When I go to the list of users
37
+ And I follow "Create New User"
38
+ And I fill in "Login" with "cucumber"
39
+ And I fill in "Email" with "green@cucumber.com"
40
+ And I fill in "Password" with "greenandjuicy"
41
+ And I fill in "Password confirmation" with "greenandjuicy"
42
+ And I press "Save"
43
+ Then I should be on the list of users
44
+ And I should see "cucumber was successfully created."
45
+ And I should see "cucumber (green@cucumber.com)"
46
+
47
+ Scenario: Edit User
48
+ Given I have a user named "resolve"
49
+ And I am a logged in refinery user
50
+ When I go to the list of users
51
+ And I follow "Edit this user"
52
+ And I fill in "Login" with "cucumber"
53
+ And I fill in "Email" with "green@cucumber.com"
54
+ And I press "Save"
55
+ Then I should be on the list of users
56
+ And I should see "cucumber was successfully updated."
57
+ And I should see "cucumber (green@cucumber.com)"
@@ -0,0 +1,8 @@
1
+ Given /^I have a user with email "(.*)"$/ do |email|
2
+ Factory(:user, :email => email)
3
+ end
4
+
5
+ Given /^I am (not )?requesting password reset$/ do |action|
6
+ @user = Factory(:user, :updated_at => 11.minutes.ago)
7
+ @user.reset_perishable_token! if action.nil?
8
+ end
@@ -0,0 +1,32 @@
1
+ def login
2
+ visit new_session_url
3
+ fill_in("session_login", :with => @user.email)
4
+ fill_in("session_password", :with => @user.password)
5
+ click_button("submit_button")
6
+ end
7
+
8
+ Given /^I am a logged in refinery user$/ do
9
+ @user ||= Factory(:refinery_user)
10
+ login
11
+ end
12
+
13
+ Given /^I am a logged in customer$/ do
14
+ @user ||= Factory(:user)
15
+ login
16
+ end
17
+
18
+ Given /^A Refinery user exists$/ do
19
+ @refinery_user ||= Factory(:refinery_user)
20
+ end
21
+
22
+ Given /^I have a user named "(.*)"$/ do |name|
23
+ Factory(:user, :login => name)
24
+ end
25
+
26
+ Given /^I have no users$/ do
27
+ User.delete_all
28
+ end
29
+
30
+ Then /^I should have ([0-9]+) users?$/ do |count|
31
+ User.count.should == count.to_i
32
+ end
@@ -0,0 +1,17 @@
1
+ require 'factory_girl'
2
+
3
+ Factory.define :user do |u|
4
+ u.sequence(:login) { |n| "person#{n}" }
5
+ u.sequence(:email) { |n| "person#{n}@cucumber.com" }
6
+ u.password "greenandjuicy"
7
+ u.password_confirmation "greenandjuicy"
8
+ end
9
+
10
+ Factory.define :refinery_user, :parent => :user do |u|
11
+ u.roles { [ Role[:refinery] ] }
12
+ u.after_create do |user|
13
+ Refinery::Plugins.registered.each_with_index do |plugin, index|
14
+ user.plugins.create(:name => plugin.name, :position => index)
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,24 @@
1
+ module NavigationHelpers
2
+ module Refinery
3
+ module Authentication
4
+ def path_to(page_name)
5
+ case page_name
6
+
7
+ when /the list of users/
8
+ admin_users_path
9
+
10
+ when /the login page/
11
+ new_session_path
12
+
13
+ when /the forgot password page/
14
+ forgot_users_path
15
+
16
+ when /the reset password page/
17
+ reset_users_path(:reset_code => @user.perishable_token)
18
+ else
19
+ nil
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -11,7 +11,7 @@ module AuthenticatedSystem
11
11
  end
12
12
 
13
13
  def current_user
14
- @current_user ||= current_user_session && current_user_session.record
14
+ @current_user ||= (cus = current_user_session) && cus.record
15
15
  end
16
16
 
17
17
  def require_user
@@ -1,5 +1,5 @@
1
- require 'authlogic'
2
1
  require 'refinery'
2
+ require 'authlogic'
3
3
 
4
4
  module Refinery
5
5
  module Authentication
@@ -3,7 +3,7 @@
3
3
  # Would be great if someone could fix this?
4
4
  js_caching = RefinerySetting.find_or_set(:use_resource_caching, Rails.root.writable?)
5
5
  css_caching = js_caching && request.env['HTTP_USER_AGENT'] !~ /MSIE/
6
-
6
+ login = defined?(login) ? login : login?
7
7
  -%>
8
8
  <head>
9
9
  <meta charset='<%= Refinery::Application.config.encoding %>' />
@@ -35,7 +35,7 @@
35
35
  'jquery/jquery.html5-placeholder-shim.js',
36
36
  'jquery/jquery.timers.js',
37
37
  'jquery/jquery.jcarousel.js',
38
- :cache => (js_caching ? "cache/jquery-plugins" : false) unless login? -%>
38
+ :cache => (js_caching ? "cache/jquery-plugins" : false) unless login -%>
39
39
 
40
40
  <%= yield :head_after_javascript_libraries -%>
41
41
 
@@ -44,8 +44,8 @@
44
44
  'refinery/boot_wym',
45
45
  'refinery/core',
46
46
  'refinery/admin',
47
- :cache => (js_caching ? "cache/admin" : false) unless login? -%>
48
- <%= javascript_include_tag 'refinery/core' if login? -%>
47
+ :cache => (js_caching ? "cache/admin" : false) unless login -%>
48
+ <%= javascript_include_tag 'refinery/core' if login -%>
49
49
 
50
50
  <% if request.env['HTTP_USER_AGENT'] =~ /MSIE/ -%>
51
51
  <%= "<!--[if lt IE 8]>#{stylesheet_link_tag 'refinery/ie-less-than-8'}<![endif]-->".html_safe -%>