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.
- checksums.yaml +4 -4
- data/Gemfile +3 -3
- data/README.md +1 -1
- data/app/assets/stylesheets/locomotive/unauthorized/_public.scss +7 -4
- data/app/controllers/locomotive/errors_controller.rb +4 -0
- data/app/helpers/locomotive/errors_helper.rb +2 -4
- data/app/models/locomotive/concerns/content_entry/csv.rb +4 -0
- data/app/models/locomotive/concerns/content_entry/slug.rb +0 -2
- data/app/models/locomotive/concerns/content_type/sync.rb +2 -2
- data/app/models/locomotive/concerns/page/templatized.rb +1 -1
- data/app/models/locomotive/concerns/site/access_points.rb +3 -3
- data/app/models/locomotive/theme_asset.rb +0 -1
- data/app/views/locomotive/developers_documentation/_wagon.html.slim +2 -2
- data/app/views/locomotive/devise_mailer/reset_password_instructions.html.slim +1 -0
- data/app/views/locomotive/errors/no_site.json +1 -0
- data/app/views/locomotive/shared/_sidebar.html.slim +1 -1
- data/app/views/locomotive/shared/_sidebar_without_site.html.slim +1 -1
- data/app/views/locomotive/shared/header/_account_menu.html.slim +2 -2
- data/config/locales/en.yml +1 -1
- data/config/routes.rb +4 -2
- data/lib/generators/locomotive/install/install_generator.rb +9 -9
- data/lib/generators/locomotive/install/templates/carrierwave.rb +23 -12
- data/lib/generators/locomotive/install/templates/carrierwave_aws.rb +36 -0
- data/lib/generators/locomotive/install/templates/mongoid.yml +97 -35
- data/lib/locomotive/dependencies.rb +1 -1
- data/lib/locomotive/middlewares/site.rb +10 -4
- data/lib/locomotive/mongoid/patches.rb +1 -1
- data/lib/locomotive/steam_adaptor.rb +6 -4
- data/lib/locomotive/version.rb +1 -1
- data/spec/dummy/config/application.rb +0 -3
- data/spec/dummy/config/initializers/devise.rb +128 -58
- data/spec/dummy/config/mongoid.yml +95 -78
- data/spec/models/locomotive/content_entry_spec.rb +6 -6
- data/spec/requests/locomotive/steam/cache_spec.rb +1 -1
- data/spec/requests/site_spec.rb +25 -0
- data/spec/support/mongoid.rb +2 -0
- metadata +16 -189
- data/features/api/accounts.feature +0 -43
- data/features/api/authentication.feature +0 -41
- data/features/api/authorization/accounts.feature +0 -165
- data/features/api/authorization/content_assets.feature +0 -147
- data/features/api/authorization/content_entries.feature +0 -202
- data/features/api/authorization/content_types.feature +0 -237
- data/features/api/authorization/current_site.feature +0 -30
- data/features/api/authorization/memberships.feature +0 -225
- data/features/api/authorization/pages.feature +0 -189
- data/features/api/authorization/sites.feature +0 -212
- data/features/api/authorization/snippets.feature +0 -179
- data/features/api/authorization/theme_assets.feature +0 -185
- data/features/api/authorization/translations.feature +0 -253
- data/features/api/content_entries.feature +0 -184
- data/features/api/content_types.feature +0 -156
- data/features/api/editable_elements.feature +0 -190
- data/features/api/entries_custom_fields.feature +0 -150
- data/features/api/memberships.feature +0 -26
- data/features/api/pages.feature +0 -72
- data/features/backoffice/authorization/account_settings.feature +0 -28
- data/features/backoffice/authorization/content_type.feature +0 -35
- data/features/backoffice/authorization/current_site.feature +0 -53
- data/features/backoffice/authorization/inline_front_end_editing.feature +0 -46
- data/features/backoffice/authorization/pages.feature +0 -95
- data/features/backoffice/authorization/theme_assets.feature +0 -50
- data/features/backoffice/content_types/edit.feature +0 -20
- data/features/backoffice/content_types/email.feature +0 -26
- data/features/backoffice/content_types/has_many.feature +0 -80
- data/features/backoffice/content_types/integer.feature +0 -26
- data/features/backoffice/content_types/localized.feature +0 -63
- data/features/backoffice/content_types/many_to_many.feature +0 -70
- data/features/backoffice/content_types/tags.feature +0 -22
- data/features/backoffice/content_types/uniqueness.feature +0 -29
- data/features/backoffice/contents.feature +0 -93
- data/features/backoffice/editable_elements.feature +0 -22
- data/features/backoffice/installation.feature +0 -33
- data/features/backoffice/login.feature +0 -33
- data/features/backoffice/mounting.feature +0 -13
- data/features/backoffice/my_account.feature +0 -22
- data/features/backoffice/pages.feature +0 -73
- data/features/backoffice/regressions.feature +0 -19
- data/features/backoffice/site.feature +0 -71
- data/features/backoffice/snippets.feature +0 -39
- data/features/backoffice/theme_assets.feature +0 -72
- data/features/backoffice/translations.feature +0 -50
- data/features/public/basic.feature +0 -30
- data/features/public/contact_form.feature +0 -98
- data/features/public/content_entries.feature +0 -69
- data/features/public/editable_elements.feature +0 -138
- data/features/public/has_many.feature +0 -8
- data/features/public/inheritance.feature +0 -157
- data/features/public/inline_front_end_editing.feature +0 -26
- data/features/public/many_to_many.feature +0 -64
- data/features/public/new_contact_form.feature +0 -95
- data/features/public/pages.feature +0 -116
- data/features/public/pagination.feature +0 -8
- data/features/public/robots.feature +0 -22
- data/features/public/session.feature +0 -40
- data/features/public/sitemap.feature +0 -74
- data/features/public/snippets.feature +0 -21
- data/features/public/tablerow.feature +0 -42
- data/features/public/tags.feature +0 -45
- data/features/step_definitions/api_steps.rb +0 -179
- data/features/step_definitions/backoffice/mounting_steps.rb +0 -22
- data/features/step_definitions/backoffice_steps.rb +0 -47
- data/features/step_definitions/content_assets_steps.rb +0 -12
- data/features/step_definitions/content_types_steps.rb +0 -135
- data/features/step_definitions/current_site_steps.rb +0 -43
- data/features/step_definitions/editable_elements_steps.rb +0 -24
- data/features/step_definitions/membership_steps.rb +0 -19
- data/features/step_definitions/more_web_steps.rb +0 -131
- data/features/step_definitions/page_steps.rb +0 -133
- data/features/step_definitions/pagination_steps.rb +0 -35
- data/features/step_definitions/pickle_steps.rb +0 -100
- data/features/step_definitions/relationships_steps.rb +0 -110
- data/features/step_definitions/site_steps.rb +0 -111
- data/features/step_definitions/snippet_steps.rb +0 -37
- data/features/step_definitions/theme_asset_steps.rb +0 -64
- data/features/step_definitions/translation_steps.rb +0 -7
- data/features/step_definitions/web_steps.rb +0 -225
- data/features/step_definitions/within_steps.rb +0 -14
- data/features/support/cleaner.rb +0 -4
- data/features/support/env.rb +0 -82
- data/features/support/factory_girl.rb +0 -2
- data/features/support/http.rb +0 -22
- data/features/support/locales.rb +0 -5
- data/features/support/paths.rb +0 -62
- data/features/support/pickle.rb +0 -24
- data/features/support/selectors.rb +0 -57
data/features/support/paths.rb
DELETED
@@ -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)
|
data/features/support/pickle.rb
DELETED
@@ -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)
|