refinerycms-core 2.0.2 → 2.0.3

Sign up to get free protection for your applications and to get access to all the features.
Files changed (37) hide show
  1. data/app/assets/javascripts/refinery/admin.js.erb +25 -20
  2. data/app/assets/javascripts/refinery/site_bar.js +12 -14
  3. data/app/assets/javascripts/refinery/submit_continue.js.coffee.erb +2 -1
  4. data/app/assets/stylesheets/refinery/{refinery.css.scss → layout.css.scss} +1 -7
  5. data/app/assets/stylesheets/refinery/refinery.css +15 -0
  6. data/app/controllers/refinery/admin/{refinery_core_controller.rb → core_controller.rb} +2 -2
  7. data/app/controllers/refinery/admin_controller.rb +4 -1
  8. data/app/helpers/refinery/admin/core_helper.rb +6 -0
  9. data/app/helpers/refinery/admin/dialogs_helper.rb +6 -0
  10. data/app/helpers/refinery/admin_helper.rb +4 -0
  11. data/app/helpers/refinery/fast_helper.rb +4 -0
  12. data/app/helpers/refinery/sitemap_helper.rb +4 -0
  13. data/app/models/refinery/core/base_model.rb +0 -2
  14. data/config/routes.rb +1 -1
  15. data/lib/generators/refinery/cms/cms_generator.rb +24 -10
  16. data/lib/generators/refinery/cms/templates/.gitignore +3 -0
  17. data/lib/generators/refinery/dummy/dummy_generator.rb +21 -21
  18. data/lib/generators/refinery/engine/templates/.gitignore +2 -0
  19. data/lib/generators/refinery/engine/templates/Gemfile +1 -1
  20. data/lib/generators/refinery/engine/templates/lib/generators/refinery/extension_plural_name_generator.rb +1 -0
  21. data/lib/generators/refinery/engine/templates/script/rails +10 -0
  22. data/lib/generators/refinery/form/templates/.gitignore +2 -0
  23. data/lib/generators/refinery/form/templates/lib/refinery/plural_name.rb +1 -0
  24. data/lib/generators/refinery/form/templates/script/rails +10 -0
  25. data/lib/refinery/application_controller.rb +9 -2
  26. data/lib/refinery/core/engine.rb +9 -18
  27. data/lib/refinery/core.rb +5 -6
  28. data/lib/refinery/menu.rb +2 -18
  29. data/lib/refinery/menu_item.rb +1 -5
  30. data/lib/refinery/version.rb +1 -1
  31. data/spec/controllers/refinery/admin/refinery_core_controller_spec.rb +4 -4
  32. data/spec/controllers/refinery/fast_controller_spec.rb +1 -1
  33. data/spec/lib/generators/refinery/cms/cms_generator_spec.rb +0 -3
  34. data/spec/lib/refinery/application_controller_spec.rb +15 -0
  35. data/spec/support/database_cleaner.rb +1 -1
  36. metadata +170 -171
  37. data/lib/generators/refinery/cms/templates/config/initializers/devise.rb +0 -229
@@ -1,229 +0,0 @@
1
- require 'devise'
2
-
3
- # Use this hook to configure devise mailer, warden hooks and so forth.
4
- # Many of these configuration options can be set straight in your model.
5
- Devise.setup do |config|
6
- # ==> Mailer Configuration
7
- # Configure the e-mail address which will be shown in Devise::Mailer,
8
- # note that it will be overwritten if you use your own mailer class with default "from" parameter.
9
- # config.mailer_sender = "please-change-me-at-config-initializers-devise@example.com"
10
-
11
- # Configure the class responsible to send e-mails.
12
- # config.mailer = "Devise::Mailer"
13
-
14
- # Automatically apply schema changes in tableless databases
15
- config.apply_schema = false
16
-
17
- # ==> ORM configuration
18
- # Load and configure the ORM. Supports :active_record (default) and
19
- # :mongoid (bson_ext recommended) by default. Other ORMs may be
20
- # available as additional gems.
21
- require 'devise/orm/active_record'
22
-
23
- # ==> Configuration for any authentication mechanism
24
- # Configure which keys are used when authenticating a user. The default is
25
- # just :email. You can configure it to use [:username, :subdomain], so for
26
- # authenticating a user, both parameters are required. Remember that those
27
- # parameters are used only when authenticating and not when retrieving from
28
- # session. If you need permissions, you should implement that in a before filter.
29
- # You can also supply a hash where the value is a boolean determining whether
30
- # or not authentication should be aborted when the value is not present.
31
- config.authentication_keys = [ :login ]
32
-
33
- # Configure parameters from the request object used for authentication. Each entry
34
- # given should be a request method and it will automatically be passed to the
35
- # find_for_authentication method and considered in your model lookup. For instance,
36
- # if you set :request_keys to [:subdomain], :subdomain will be used on authentication.
37
- # The same considerations mentioned for authentication_keys also apply to request_keys.
38
- # config.request_keys = []
39
-
40
- # Configure which authentication keys should be case-insensitive.
41
- # These keys will be downcased upon creating or modifying a user and when used
42
- # to authenticate or find a user. Default is :email.
43
- config.case_insensitive_keys = []
44
-
45
- # Configure which authentication keys should have whitespace stripped.
46
- # These keys will have whitespace before and after removed upon creating or
47
- # modifying a user and when used to authenticate or find a user. Default is :email.
48
- # config.strip_whitespace_keys = [ :email ]
49
-
50
- # Tell if authentication through request.params is enabled. True by default.
51
- # It can be set to an array that will enable params authentication only for the
52
- # given stratragies, for example, `config.params_authenticatable = [:database]` will
53
- # enable it only for database (email + password) authentication.
54
- # config.params_authenticatable = true
55
-
56
- # Tell if authentication through HTTP Basic Auth is enabled. False by default.
57
- # It can be set to an array that will enable http authentication only for the
58
- # given stratragies, for example, `config.http_authenticatable = [:token]` will
59
- # enable it only for token authentication.
60
- # config.http_authenticatable = false
61
-
62
- # If http headers should be returned for AJAX requests. True by default.
63
- # config.http_authenticatable_on_xhr = true
64
-
65
- # The realm used in Http Basic Authentication. "Application" by default.
66
- # config.http_authentication_realm = "Application"
67
-
68
- # It will change confirmation, password recovery and other workflows
69
- # to behave the same regardless if the e-mail provided was right or wrong.
70
- # Does not affect registerable.
71
- # config.paranoid = true
72
-
73
- # By default Devise will store the user in session. You can skip storage for
74
- # :http_auth and :token_auth by adding those symbols to the array below.
75
- # Notice that if you are skipping storage for all authentication paths, you
76
- # may want to disable generating routes to Devise's sessions controller by
77
- # passing :skip => :sessions to `devise_for` in your config/routes.rb
78
- config.skip_session_storage = [:http_auth]
79
-
80
- # ==> Configuration for :database_authenticatable
81
- # For bcrypt, this is the cost for hashing the password and defaults to 10. If
82
- # using other encryptors, it sets how many times you want the password re-encrypted.
83
- #
84
- # Limiting the stretches to just one in testing will increase the performance of
85
- # your test suite dramatically. However, it is STRONGLY RECOMMENDED to not use
86
- # a value less than 10 in other environments.
87
- config.stretches = Rails.env.test? ? 1 : 10
88
-
89
- # Setup a pepper to generate the encrypted password.
90
- # config.pepper = <%= SecureRandom.hex(64).inspect %>
91
-
92
- # ==> Configuration for :confirmable
93
- # A period that the user is allowed to access the website even without
94
- # confirming his account. For instance, if set to 2.days, the user will be
95
- # able to access the website for two days without confirming his account,
96
- # access will be blocked just in the third day. Default is 0.days, meaning
97
- # the user cannot access the website without confirming his account.
98
- # config.allow_unconfirmed_access_for = 2.days
99
-
100
- # If true, requires any email changes to be confirmed (exctly the same way as
101
- # initial account confirmation) to be applied. Requires additional unconfirmed_email
102
- # db field (see migrations). Until confirmed new email is stored in
103
- # unconfirmed email column, and copied to email column on successful confirmation.
104
- # config.reconfirmable = true
105
-
106
- # Defines which key will be used when confirming an account
107
- # config.confirmation_keys = [ :email ]
108
-
109
- # ==> Configuration for :rememberable
110
- # The time the user will be remembered without asking for credentials again.
111
- # config.remember_for = 2.weeks
112
-
113
- # If true, extends the user's remember period when remembered via cookie.
114
- # config.extend_remember_period = false
115
-
116
- # If true, uses the password salt as remember token. This should be turned
117
- # to false if you are not using database authenticatable.
118
- config.use_salt_as_remember_token = true
119
-
120
- # Options to be passed to the created cookie. For instance, you can set
121
- # :secure => true in order to force SSL only cookies.
122
- # config.cookie_options = {}
123
-
124
- # ==> Configuration for :validatable
125
- # Range for password length. Default is 6..128.
126
- config.password_length = 4..128
127
-
128
- # Email regex used to validate email formats. It simply asserts that
129
- # an one (and only one) @ exists in the given string. This is mainly
130
- # to give user feedback and not to assert the e-mail validity.
131
- # config.email_regexp = /\A[^@]+@[^@]+\z/
132
-
133
- # ==> Configuration for :timeoutable
134
- # The time you want to timeout the user session without activity. After this
135
- # time the user will be asked for credentials again. Default is 30 minutes.
136
- # config.timeout_in = 30.minutes
137
-
138
- # ==> Configuration for :lockable
139
- # Defines which strategy will be used to lock an account.
140
- # :failed_attempts = Locks an account after a number of failed attempts to sign in.
141
- # :none = No lock strategy. You should handle locking by yourself.
142
- # config.lock_strategy = :failed_attempts
143
-
144
- # Defines which key will be used when locking and unlocking an account
145
- # config.unlock_keys = [ :email ]
146
-
147
- # Defines which strategy will be used to unlock an account.
148
- # :email = Sends an unlock link to the user email
149
- # :time = Re-enables login after a certain amount of time (see :unlock_in below)
150
- # :both = Enables both strategies
151
- # :none = No unlock strategy. You should handle unlocking by yourself.
152
- # config.unlock_strategy = :both
153
-
154
- # Number of authentication tries before locking an account if lock_strategy
155
- # is failed attempts.
156
- # config.maximum_attempts = 20
157
-
158
- # Time interval to unlock the account if :time is enabled as unlock_strategy.
159
- # config.unlock_in = 1.hour
160
-
161
- # ==> Configuration for :recoverable
162
- #
163
- # Defines which key will be used when recovering the password for an account
164
- # config.reset_password_keys = [ :email ]
165
-
166
- # Time interval you can reset your password with a reset password key.
167
- # Don't put a too small interval or your users won't have the time to
168
- # change their passwords.
169
- config.reset_password_within = 6.hours
170
-
171
- # ==> Configuration for :encryptable
172
- # Allow you to use another encryption algorithm besides bcrypt (default). You can use
173
- # :sha1, :sha512 or encryptors from others authentication tools as :clearance_sha1,
174
- # :authlogic_sha512 (then you should set stretches above to 20 for default behavior)
175
- # and :restful_authentication_sha1 (then you should set stretches to 10, and copy
176
- # REST_AUTH_SITE_KEY to pepper)
177
- # config.encryptor = :sha512
178
-
179
- # ==> Configuration for :token_authenticatable
180
- # Defines name of the authentication token params key
181
- # config.token_authentication_key = :auth_token
182
-
183
- # ==> Scopes configuration
184
- # Turn scoped views on. Before rendering "sessions/new", it will first check for
185
- # "users/sessions/new". It's turned off by default because it's slower if you
186
- # are using only default views.
187
- # config.scoped_views = false
188
-
189
- # Configure the default scope given to Warden. By default it's the first
190
- # devise role declared in your routes (usually :user).
191
- # config.default_scope = :user
192
-
193
- # Configure sign_out behavior.
194
- # Sign_out action can be scoped (i.e. /users/sign_out affects only :user scope).
195
- # The default is true, which means any logout action will sign out all active scopes.
196
- # config.sign_out_all_scopes = true
197
-
198
- # ==> Navigation configuration
199
- # Lists the formats that should be treated as navigational. Formats like
200
- # :html, should redirect to the sign in page when the user does not have
201
- # access, but formats like :xml or :json, should return 401.
202
- #
203
- # If you have any extra navigational formats, like :iphone or :mobile, you
204
- # should add them to the navigational formats lists.
205
- #
206
- # The "*/*" below is required to match Internet Explorer requests.
207
- # config.navigational_formats = ["*/*", :html]
208
-
209
- # The default HTTP method used to sign out a resource. Default is :delete.
210
- config.sign_out_via = :delete
211
-
212
- # ==> OmniAuth
213
- # Add a new OmniAuth provider. Check the wiki for more information on setting
214
- # up on your models and hooks.
215
- # config.omniauth :github, 'APP_ID', 'APP_SECRET', :scope => 'user,public_repo'
216
-
217
- # ==> Warden configuration
218
- # If you want to use other strategies, that are not supported by Devise, or
219
- # change the failure app, you can configure them inside the config.warden block.
220
- #
221
- # config.warden do |manager|
222
- # manager.intercept_401 = false
223
- # manager.default_strategies(:scope => :user).unshift :some_external_strategy
224
- # end
225
-
226
- # Please do not change the router_name away from :refinery
227
- # otherwise Refinery may not function properly. Thanks!
228
- config.router_name = :refinery
229
- end