rails_admin 1.4.0 → 1.4.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of rails_admin might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/README.md +2 -0
- data/lib/rails_admin/config/fields/types/json.rb +4 -0
- data/lib/rails_admin/engine.rb +19 -5
- data/lib/rails_admin/version.rb +1 -1
- 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: a17f479765c10aa74200405742f1387eea769ee8
|
4
|
+
data.tar.gz: b4efbfa19a87163d641b50aa4771b5eddddaa336
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 20351d651d98ba0ac84171a0812b19394f5e2853598ae92a23069e979cea27b99161acfc9792621eb4da947539dc3d687371ad27832086f41740e77b6fe020c4
|
7
|
+
data.tar.gz: e00d12b32c662017293acff322855a9c6f5a479c151990664df3eac5568c6367c84fa4e908f6c5b3ebb6204b6bf78199ac22f304a01ca4bc4e291605e5df3e27
|
data/Gemfile
CHANGED
@@ -23,7 +23,7 @@ group :test do
|
|
23
23
|
gem 'coveralls'
|
24
24
|
gem 'database_cleaner', ['>= 1.2', '!= 1.4.0', '!= 1.5.0']
|
25
25
|
gem 'dragonfly', '~> 1.0'
|
26
|
-
gem '
|
26
|
+
gem 'factory_bot', '>= 4.2'
|
27
27
|
gem 'generator_spec', '>= 0.8'
|
28
28
|
gem 'launchy', '>= 2.2'
|
29
29
|
gem 'mini_magick', '>= 3.4'
|
data/README.md
CHANGED
data/lib/rails_admin/engine.rb
CHANGED
@@ -24,11 +24,6 @@ module RailsAdmin
|
|
24
24
|
end
|
25
25
|
|
26
26
|
initializer 'RailsAdmin setup middlewares' do |app|
|
27
|
-
app.config.session_store :cookie_store
|
28
|
-
app.config.middleware.use ActionDispatch::Cookies
|
29
|
-
app.config.middleware.use ActionDispatch::Flash
|
30
|
-
app.config.middleware.use ActionDispatch::Session::CookieStore, app.config.session_options
|
31
|
-
app.config.middleware.use Rack::MethodOverride
|
32
27
|
app.config.middleware.use Rack::Pjax
|
33
28
|
end
|
34
29
|
|
@@ -47,5 +42,24 @@ module RailsAdmin
|
|
47
42
|
rake_tasks do
|
48
43
|
Dir[File.join(File.dirname(__FILE__), '../tasks/*.rake')].each { |f| load f }
|
49
44
|
end
|
45
|
+
|
46
|
+
initializer 'RailsAdmin check for required middlewares', after: :build_middleware_stack do |app|
|
47
|
+
has_session_store = app.config.middleware.to_a.any? { |m| m.klass.try(:<=, ActionDispatch::Session::AbstractStore) } || ::Rails.version < '5.0'
|
48
|
+
loaded = app.config.middleware.to_a.map(&:name)
|
49
|
+
required = %w(ActionDispatch::Cookies ActionDispatch::Flash Rack::MethodOverride)
|
50
|
+
missing = required - loaded
|
51
|
+
unless missing.empty? && has_session_store
|
52
|
+
configs = missing.map { |m| "config.middleware.use #{m}" }
|
53
|
+
configs << "config.middleware.use #{app.config.session_store.try(:name) || 'ActionDispatch::Session::CookieStore'}, #{app.config.session_options}" unless has_session_store
|
54
|
+
raise <<-EOM
|
55
|
+
Required middlewares for RailsAdmin are not added
|
56
|
+
To fix tihs, add
|
57
|
+
|
58
|
+
#{configs.join("\n ")}
|
59
|
+
|
60
|
+
to config/application.rb.
|
61
|
+
EOM
|
62
|
+
end
|
63
|
+
end
|
50
64
|
end
|
51
65
|
end
|
data/lib/rails_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails_admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.4.
|
4
|
+
version: 1.4.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Erik Michaels-Ober
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2018-
|
15
|
+
date: 2018-08-19 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: builder
|