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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5d4b37234ce457806986bdfafc8297cec5a044a0
4
- data.tar.gz: 7eaffb7741b722eae3ee27912f71660afe1c90ba
3
+ metadata.gz: ff0f49f01f423bf89fc04f98f064bb30c825f2fb
4
+ data.tar.gz: fa91ab17644cc8fd9c5046c168f987d2d2949860
5
5
  SHA512:
6
- metadata.gz: d40b856a88a4dffb826baaba75214e5b202c47b3f49c5e13af564e57f6770235199b36d929866a1e58c3b679c8cda9ac59a61c3faf9c3b9f7b0832db4c18ae6d
7
- data.tar.gz: e83824b71af4253db9fada75768ff80c1685fb27b9ccb92a48e571395800bf822f2e0845372164dd2f12688f758a495b5e03a3ced4e662b8f5de7541a414c1ee
6
+ metadata.gz: f5ec95980a6ca24a64c1119bf4898a7e953124410fa8b2ba5507a12e13738523c17e14c3a930036f84ce347df644872a6965f840fb96ecc89990761a57810260
7
+ data.tar.gz: c4346dbb675b58da56b3832f332f472915b265dc979bec16b58ac299ec5d2220d995b7e449253ca4215695d55118baae4d9acda9aa3485f987d2d4b4cafd3209
@@ -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.1.x.
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.2.0
17
+ ==What’s New in 5.3.0
18
18
 
19
- Casein 5.2.0 has the following updates:
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 should be a drop-in replacement for 5.1.1, but requires Rails 5.x and Ruby 2.1.x.
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.2.0'
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. Try to copy and paste the URL directly from the email."
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
- casein_form_tag_wrapper(form.select(attribute, option_tags, strip_casein_options(options), merged_class_hash(options, 'form-control')), form, obj, attribute, options).html_safe
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 = {}
@@ -1,6 +1,7 @@
1
1
  require "casein"
2
2
  require "rails"
3
3
  require 'bootstrap-sass'
4
+ require 'jquery-rails'
4
5
 
5
6
  module Casein
6
7
  class Engine < Rails::Engine
@@ -1,4 +1,4 @@
1
1
  module Casein
2
- VERSION_HASH = { major: 5, minor: 2, patch: 0, build: 0 }
2
+ VERSION_HASH = { major: 5, minor: 3, patch: 0, build: 0 }
3
3
  VERSION = VERSION_HASH.values.join(".")
4
4
  end
@@ -1,6 +1,6 @@
1
- class CaseinCreateAdminUsers < ActiveRecord::Migration
1
+ class CaseinCreateAdminUsers < ActiveRecord::Migration[5.1]
2
2
 
3
- def self.up
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 self.up
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
- <% attributes.each do |attribute| %>t.<%= attribute.type %> :<%= attribute.name %>
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.2.0.0
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: 2016-12-26 00:00:00.000000000 Z
11
+ date: 2017-05-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: will_paginate