casein 5.2.0.0 → 5.3.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.rdoc +13 -6
- data/app/controllers/casein/password_resets_controller.rb +1 -1
- data/app/helpers/casein/casein_helper.rb +6 -2
- data/lib/casein/engine.rb +1 -0
- data/lib/casein/version.rb +1 -1
- data/lib/generators/casein/install/templates/db/migrate/casein_create_admin_users.rb +3 -7
- data/lib/generators/casein/scaffold/templates/migration.rb +3 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff0f49f01f423bf89fc04f98f064bb30c825f2fb
|
4
|
+
data.tar.gz: fa91ab17644cc8fd9c5046c168f987d2d2949860
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5ec95980a6ca24a64c1119bf4898a7e953124410fa8b2ba5507a12e13738523c17e14c3a930036f84ce347df644872a6965f840fb96ecc89990761a57810260
|
7
|
+
data.tar.gz: c4346dbb675b58da56b3832f332f472915b265dc979bec16b58ac299ec5d2220d995b7e449253ca4215695d55118baae4d9acda9aa3485f987d2d4b4cafd3209
|
data/README.rdoc
CHANGED
@@ -10,19 +10,26 @@ Screenshots at: http://www.caseincms.com
|
|
10
10
|
|
11
11
|
==Requirements
|
12
12
|
|
13
|
-
This version of Casein is designed for Ruby on Rails 5.x and Ruby 2.
|
13
|
+
This version of Casein is designed for Ruby on Rails 5.x and Ruby 2.2.x or later.
|
14
14
|
|
15
15
|
Casein 5.1.1.5 was the last gem release compatible with Rails 4.x.
|
16
16
|
|
17
|
-
==What’s New in 5.
|
17
|
+
==What’s New in 5.3.0
|
18
18
|
|
19
|
-
Casein 5.
|
19
|
+
Casein 5.3.0 has the following updates:
|
20
|
+
|
21
|
+
* Support for passing html_options into casein_select (see [here](https://github.com/russellquinn/casein/pull/80))
|
22
|
+
* Fixed a bug where jQuery couldn't be found if it wasn't in your main project's Gemfile (for example, when using Rails 5.1.x)
|
23
|
+
* Updated the migration templates to include Rails version number and modern syntax
|
24
|
+
* Made password-reset error message clearer to explain what the problem might be
|
25
|
+
|
26
|
+
Casein 5.2.0 had the following updates:
|
20
27
|
|
21
28
|
* Compatible with Rails 5.x
|
22
29
|
* Added auth_custom.js and auth_custom.scss for customizing JavaScript and CSS in the authentication layout
|
23
30
|
* Deprecation updates and small improvements
|
24
31
|
|
25
|
-
Version 5.2.0
|
32
|
+
Version 5.2.0 is almost a drop-in replacement for 5.1.1, but requires Rails 5.x and Ruby 2.1.x. The only other change is the addition of two methods to 'app/helpers/casein/config_helper.rb'. These are 'casein_config_auth_stylesheet_includes' and 'casein_config_auth_javascript_includes'. And two new template files. These are 'auth_custom.scss' and 'auth_custom.js'. You should run 'rails g casein:install' again to install the new files and, when you reach 'config_helper.rb' press 'd' to show differences and manually merge the changes.
|
26
33
|
|
27
34
|
Thanks to @brchristian and @mkunkel for this release.
|
28
35
|
|
@@ -32,7 +39,7 @@ Thanks to @brchristian and @mkunkel for this release.
|
|
32
39
|
|
33
40
|
— Add the Casein gem to your Gemfile:
|
34
41
|
|
35
|
-
gem 'casein', '~>5.
|
42
|
+
gem 'casein', '~>5.3.0'
|
36
43
|
|
37
44
|
— Then use bundler to install Casein and its dependencies:
|
38
45
|
|
@@ -201,7 +208,7 @@ All of the standard Rails form helpers are available, but the Casein versions ar
|
|
201
208
|
casein_check_box_group form, obj, check_boxes = {}
|
202
209
|
casein_radio_button form, obj, attribute, tag_value, options = {}
|
203
210
|
casein_radio_button_group form, obj, radio_buttons = {}
|
204
|
-
casein_select form, obj, attribute, option_tags, options = {}
|
211
|
+
casein_select form, obj, attribute, option_tags, options = {}, html_options = {}
|
205
212
|
casein_time_zone_select form, obj, attribute, option_tags, options = {}
|
206
213
|
casein_collection_select form, obj, object_name, attribute, collection, value_method, text_method, options = {}
|
207
214
|
casein_date_select form, obj, attribute, options = {}
|
@@ -56,7 +56,7 @@ module Casein
|
|
56
56
|
@reset_user = Casein::AdminUser.find_using_perishable_token params[:token]
|
57
57
|
|
58
58
|
unless @reset_user
|
59
|
-
flash[:warning] = "Your account could not be located.
|
59
|
+
flash[:warning] = "Your account could not be located. This can happen if you wait more than 10 minutes to click the link or if you select 'Forgotten Password' multiple times, which invalidates all previous reset links."
|
60
60
|
redirect_to new_casein_admin_user_session_url
|
61
61
|
end
|
62
62
|
end
|
@@ -172,8 +172,12 @@ module Casein
|
|
172
172
|
casein_form_tag_wrapper(form_tag, form, obj, attribute, options).html_safe
|
173
173
|
end
|
174
174
|
|
175
|
-
def casein_select form, obj, attribute, option_tags, options = {}
|
176
|
-
|
175
|
+
def casein_select form, obj, attribute, option_tags, options = {}, html_options = {}
|
176
|
+
|
177
|
+
html_options_to_use = merged_class_hash(options, 'form-control') #legacy support
|
178
|
+
html_options_to_use = options_hash_with_merged_classes(html_options, html_options_to_use[:class])
|
179
|
+
|
180
|
+
casein_form_tag_wrapper(form.select(attribute, option_tags, strip_casein_options(options), html_options_to_use), form, obj, attribute, options).html_safe
|
177
181
|
end
|
178
182
|
|
179
183
|
def casein_time_zone_select form, obj, attribute, option_tags, options = {}
|
data/lib/casein/engine.rb
CHANGED
data/lib/casein/version.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
|
-
class CaseinCreateAdminUsers < ActiveRecord::Migration
|
1
|
+
class CaseinCreateAdminUsers < ActiveRecord::Migration[5.1]
|
2
2
|
|
3
|
-
def
|
3
|
+
def change
|
4
4
|
create_table :casein_admin_users do |t|
|
5
5
|
t.string :login, null: false
|
6
6
|
t.string :name
|
@@ -22,9 +22,5 @@ class CaseinCreateAdminUsers < ActiveRecord::Migration
|
|
22
22
|
t.timestamps
|
23
23
|
end
|
24
24
|
end
|
25
|
-
|
26
|
-
def self.down
|
27
|
-
drop_table :casein_admin_users
|
28
|
-
end
|
29
|
-
|
25
|
+
|
30
26
|
end
|
@@ -1,13 +1,9 @@
|
|
1
|
-
class Create<%= class_name.pluralize %> < ActiveRecord::Migration
|
2
|
-
def
|
1
|
+
class Create<%= class_name.pluralize %> < ActiveRecord::Migration[<%= Rails::VERSION::MAJOR %>.<%= Rails::VERSION::MINOR %>]
|
2
|
+
def change
|
3
3
|
create_table :<%= table_name %> do |t|
|
4
|
-
|
4
|
+
<% attributes.each do |attribute| %> t.<%= attribute.type %> :<%= attribute.name %>
|
5
5
|
<% end %>
|
6
6
|
t.timestamps
|
7
7
|
end
|
8
8
|
end
|
9
|
-
|
10
|
-
def self.down
|
11
|
-
drop_table :<%= table_name %>
|
12
|
-
end
|
13
9
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: casein
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.
|
4
|
+
version: 5.3.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Russell Quinn
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: will_paginate
|