locomotivecms 3.0.0.rc3 → 3.0.0.rc4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (126) hide show
  1. checksums.yaml +4 -4
  2. data/Gemfile +3 -3
  3. data/README.md +1 -1
  4. data/app/assets/stylesheets/locomotive/unauthorized/_public.scss +7 -4
  5. data/app/controllers/locomotive/errors_controller.rb +4 -0
  6. data/app/helpers/locomotive/errors_helper.rb +2 -4
  7. data/app/models/locomotive/concerns/content_entry/csv.rb +4 -0
  8. data/app/models/locomotive/concerns/content_entry/slug.rb +0 -2
  9. data/app/models/locomotive/concerns/content_type/sync.rb +2 -2
  10. data/app/models/locomotive/concerns/page/templatized.rb +1 -1
  11. data/app/models/locomotive/concerns/site/access_points.rb +3 -3
  12. data/app/models/locomotive/theme_asset.rb +0 -1
  13. data/app/views/locomotive/developers_documentation/_wagon.html.slim +2 -2
  14. data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -0
  15. data/app/views/locomotive/errors/no_site.json +1 -0
  16. data/app/views/locomotive/shared/_sidebar.html.slim +1 -1
  17. data/app/views/locomotive/shared/_sidebar_without_site.html.slim +1 -1
  18. data/app/views/locomotive/shared/header/_account_menu.html.slim +2 -2
  19. data/config/locales/en.yml +1 -1
  20. data/config/routes.rb +4 -2
  21. data/lib/generators/locomotive/install/install_generator.rb +9 -9
  22. data/lib/generators/locomotive/install/templates/carrierwave.rb +23 -12
  23. data/lib/generators/locomotive/install/templates/carrierwave_aws.rb +36 -0
  24. data/lib/generators/locomotive/install/templates/mongoid.yml +97 -35
  25. data/lib/locomotive/dependencies.rb +1 -1
  26. data/lib/locomotive/middlewares/site.rb +10 -4
  27. data/lib/locomotive/mongoid/patches.rb +1 -1
  28. data/lib/locomotive/steam_adaptor.rb +6 -4
  29. data/lib/locomotive/version.rb +1 -1
  30. data/spec/dummy/config/application.rb +0 -3
  31. data/spec/dummy/config/initializers/devise.rb +128 -58
  32. data/spec/dummy/config/mongoid.yml +95 -78
  33. data/spec/models/locomotive/content_entry_spec.rb +6 -6
  34. data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
  35. data/spec/requests/site_spec.rb +25 -0
  36. data/spec/support/mongoid.rb +2 -0
  37. metadata +16 -189
  38. data/features/api/accounts.feature +0 -43
  39. data/features/api/authentication.feature +0 -41
  40. data/features/api/authorization/accounts.feature +0 -165
  41. data/features/api/authorization/content_assets.feature +0 -147
  42. data/features/api/authorization/content_entries.feature +0 -202
  43. data/features/api/authorization/content_types.feature +0 -237
  44. data/features/api/authorization/current_site.feature +0 -30
  45. data/features/api/authorization/memberships.feature +0 -225
  46. data/features/api/authorization/pages.feature +0 -189
  47. data/features/api/authorization/sites.feature +0 -212
  48. data/features/api/authorization/snippets.feature +0 -179
  49. data/features/api/authorization/theme_assets.feature +0 -185
  50. data/features/api/authorization/translations.feature +0 -253
  51. data/features/api/content_entries.feature +0 -184
  52. data/features/api/content_types.feature +0 -156
  53. data/features/api/editable_elements.feature +0 -190
  54. data/features/api/entries_custom_fields.feature +0 -150
  55. data/features/api/memberships.feature +0 -26
  56. data/features/api/pages.feature +0 -72
  57. data/features/backoffice/authorization/account_settings.feature +0 -28
  58. data/features/backoffice/authorization/content_type.feature +0 -35
  59. data/features/backoffice/authorization/current_site.feature +0 -53
  60. data/features/backoffice/authorization/inline_front_end_editing.feature +0 -46
  61. data/features/backoffice/authorization/pages.feature +0 -95
  62. data/features/backoffice/authorization/theme_assets.feature +0 -50
  63. data/features/backoffice/content_types/edit.feature +0 -20
  64. data/features/backoffice/content_types/email.feature +0 -26
  65. data/features/backoffice/content_types/has_many.feature +0 -80
  66. data/features/backoffice/content_types/integer.feature +0 -26
  67. data/features/backoffice/content_types/localized.feature +0 -63
  68. data/features/backoffice/content_types/many_to_many.feature +0 -70
  69. data/features/backoffice/content_types/tags.feature +0 -22
  70. data/features/backoffice/content_types/uniqueness.feature +0 -29
  71. data/features/backoffice/contents.feature +0 -93
  72. data/features/backoffice/editable_elements.feature +0 -22
  73. data/features/backoffice/installation.feature +0 -33
  74. data/features/backoffice/login.feature +0 -33
  75. data/features/backoffice/mounting.feature +0 -13
  76. data/features/backoffice/my_account.feature +0 -22
  77. data/features/backoffice/pages.feature +0 -73
  78. data/features/backoffice/regressions.feature +0 -19
  79. data/features/backoffice/site.feature +0 -71
  80. data/features/backoffice/snippets.feature +0 -39
  81. data/features/backoffice/theme_assets.feature +0 -72
  82. data/features/backoffice/translations.feature +0 -50
  83. data/features/public/basic.feature +0 -30
  84. data/features/public/contact_form.feature +0 -98
  85. data/features/public/content_entries.feature +0 -69
  86. data/features/public/editable_elements.feature +0 -138
  87. data/features/public/has_many.feature +0 -8
  88. data/features/public/inheritance.feature +0 -157
  89. data/features/public/inline_front_end_editing.feature +0 -26
  90. data/features/public/many_to_many.feature +0 -64
  91. data/features/public/new_contact_form.feature +0 -95
  92. data/features/public/pages.feature +0 -116
  93. data/features/public/pagination.feature +0 -8
  94. data/features/public/robots.feature +0 -22
  95. data/features/public/session.feature +0 -40
  96. data/features/public/sitemap.feature +0 -74
  97. data/features/public/snippets.feature +0 -21
  98. data/features/public/tablerow.feature +0 -42
  99. data/features/public/tags.feature +0 -45
  100. data/features/step_definitions/api_steps.rb +0 -179
  101. data/features/step_definitions/backoffice/mounting_steps.rb +0 -22
  102. data/features/step_definitions/backoffice_steps.rb +0 -47
  103. data/features/step_definitions/content_assets_steps.rb +0 -12
  104. data/features/step_definitions/content_types_steps.rb +0 -135
  105. data/features/step_definitions/current_site_steps.rb +0 -43
  106. data/features/step_definitions/editable_elements_steps.rb +0 -24
  107. data/features/step_definitions/membership_steps.rb +0 -19
  108. data/features/step_definitions/more_web_steps.rb +0 -131
  109. data/features/step_definitions/page_steps.rb +0 -133
  110. data/features/step_definitions/pagination_steps.rb +0 -35
  111. data/features/step_definitions/pickle_steps.rb +0 -100
  112. data/features/step_definitions/relationships_steps.rb +0 -110
  113. data/features/step_definitions/site_steps.rb +0 -111
  114. data/features/step_definitions/snippet_steps.rb +0 -37
  115. data/features/step_definitions/theme_asset_steps.rb +0 -64
  116. data/features/step_definitions/translation_steps.rb +0 -7
  117. data/features/step_definitions/web_steps.rb +0 -225
  118. data/features/step_definitions/within_steps.rb +0 -14
  119. data/features/support/cleaner.rb +0 -4
  120. data/features/support/env.rb +0 -82
  121. data/features/support/factory_girl.rb +0 -2
  122. data/features/support/http.rb +0 -22
  123. data/features/support/locales.rb +0 -5
  124. data/features/support/paths.rb +0 -62
  125. data/features/support/pickle.rb +0 -24
  126. data/features/support/selectors.rb +0 -57
@@ -1,62 +0,0 @@
1
- module NavigationHelpers
2
- include Locomotive::Engine.routes.url_helpers # Load engine routes
3
-
4
- # Maps a name to a path. Used by the
5
- #
6
- # When /^I go to (.+)$/ do |page_name|
7
- #
8
- # step definition in web_steps.rb
9
- #
10
- def path_to(page_name)
11
- case page_name
12
-
13
- when /the home\s?page$/
14
- '/'
15
- when /login/
16
- new_locomotive_account_session_path
17
- when /logout/
18
- destroy_locomotive_account_session_url
19
- when /pages( list)?/
20
- pages_path
21
- when /new page/
22
- new_page_path
23
- when /"(.*)" edition page/
24
- page = Locomotive::Site.first.pages.where(:slug => $1).first
25
- edit_page_path(page)
26
- when /theme assets/
27
- theme_assets_path
28
- when /translations/
29
- translations_path
30
- when /site settings/
31
- edit_current_site_path
32
- when /account settings/
33
- edit_my_account_path
34
- when /the list of "(.*)"/
35
- content_type = Locomotive::Site.first.content_types.where(:name => $1).first
36
- content_entries_path(content_type.slug)
37
- when /the "(.*)" model edition page/
38
- content_type = Locomotive::Site.first.content_types.where(:name => $1).first
39
- edit_content_type_path(content_type)
40
- when /the sitemap/
41
- "/sitemap.xml"
42
-
43
- # Add more mappings here.
44
- # Here is an example that pulls values out of the Regexp:
45
- #
46
- # when /^(.*)'s profile page$/i
47
- # user_profile_path(User.find_by_login($1))
48
-
49
- else
50
- begin
51
- page_name =~ /^the (.*) page$/
52
- path_components = $1.split(/\s+/)
53
- self.send(path_components.push('path').join('_').to_sym)
54
- rescue NoMethodError, ArgumentError
55
- raise "Can't find mapping from \"#{page_name}\" to a path.\n" +
56
- "Now, go and add a mapping in #{__FILE__}"
57
- end
58
- end
59
- end
60
- end
61
-
62
- World(NavigationHelpers)
@@ -1,24 +0,0 @@
1
- # this file generated by script/generate pickle [paths] [email]
2
- #
3
- # Make sure that you are loading your factory of choice in your cucumber environment
4
- #
5
- # For machinist add: features/support/machinist.rb
6
- #
7
- # require 'machinist/active_record' # or your chosen adaptor
8
- # require File.dirname(__FILE__) + '/../../spec/blueprints' # or wherever your blueprints are
9
- # Before { Sham.reset } # to reset Sham's seed between scenarios so each run has same random sequences
10
- #
11
- # For FactoryGirl add: features/support/factory_girl.rb
12
- #
13
- # require 'factory_girl'
14
- # require File.dirname(__FILE__) + '/../../spec/factories' # or wherever your factories are
15
- #
16
- # You may also need to add gem dependencies on your factory of choice in <tt>config/environments/cucumber.rb</tt>
17
-
18
- require 'pickle/world'
19
- # Example of configuring pickle:
20
- #
21
- Pickle.configure do |config|
22
- config.adapters = [:factory_girl]
23
- # config.map 'I', 'myself', 'me', 'my', :to => 'user: "me"'
24
- end
@@ -1,57 +0,0 @@
1
- module HtmlSelectorsHelpers
2
- # Maps a name to a selector. Used primarily by the
3
- #
4
- # When /^(.+) within (.+)$/ do |step, scope|
5
- #
6
- # step definitions in web_steps.rb
7
- #
8
- def selector_for(locator)
9
- case locator
10
-
11
- when 'the page'
12
- 'html > body'
13
-
14
- when 'the main form'
15
- 'form.formtastic'
16
-
17
- when 'the main content'
18
- '#content'
19
-
20
- when 'the dialog popup'
21
- '.content-entry-popup'
22
-
23
- when 'the list of entries'
24
- 'li.input.relationship'
25
-
26
- when 'the role'
27
- '.role'
28
-
29
- when 'the submit button'
30
- 'form.formtastic #local-actions-bottom-bar input[type=submit]'
31
-
32
- # Add more mappings here.
33
- # Here is an example that pulls values out of the Regexp:
34
- #
35
- # when /^the (notice|error|info) flash$/
36
- # ".flash.#{$1}"
37
-
38
- # You can also return an array to use a different selector
39
- # type, like:
40
- #
41
- # when /the header/
42
- # [:xpath, "//header"]
43
-
44
- # This allows you to provide a quoted selector as the scope
45
- # for "within" steps as was previously the default for the
46
- # web steps:
47
- when /^"(.+)"$/
48
- $1
49
-
50
- else
51
- raise "Can't find mapping from \"#{locator}\" to a selector.\n" +
52
- "Now, go and add a mapping in #{__FILE__}"
53
- end
54
- end
55
- end
56
-
57
- World(HtmlSelectorsHelpers)