activeadmin 2.0.0 → 2.1.0

Sign up to get free protection for your applications and to get access to all the features.

Potentially problematic release.


This version of activeadmin might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: '034169cf2f9474ee4754639ae5734d3338159a7897ee28b552592eadc71d428c'
4
- data.tar.gz: a321cbba45ec6ed69e1730f6b2a0c6c2f40dd05ad1e62aab03f99f1699f762cd
3
+ metadata.gz: 27d6666a21998778549c84482d06084a12eba6df461f4183215d34a47188fc09
4
+ data.tar.gz: d1986d700254bf17ff146e04e3a4ded4a76685fb3a1f9eb3abfde12252c4551e
5
5
  SHA512:
6
- metadata.gz: bf8442376b7c017615702ad0cd1a03c553d8b78e9ee1e6c131f5975d8555fc14b17861f75df300c5907b6bd73fa7e583d6791c621a46fe05ed163aba3ad20aef
7
- data.tar.gz: 14222c5fb8fbad8af29f901aaaf3c4d97fa441454928256f1e84a84f5068ef608f1343c58cd3635eb8927989ef442c690e4f6b50f5ea4bb1809d328c71cc757b
6
+ metadata.gz: eaefb8c2b8866055feb7bab79b6be4708f3b8fcf678aee9c38e7df868b97c0e8d14dcbcadc7b400a8fbb9ab866e49a6524972dc02f017e86ec4122407b90e311
7
+ data.tar.gz: 50f15d8ef7589802b84538579299d973d6822c8b4052a948a4b237859c1fa7f70ddbb9703c257ccdba910c73efefc775804d55e1ee3256cf9f6685fd1ed26333
data/CHANGELOG.md CHANGED
@@ -2,6 +2,18 @@
2
2
 
3
3
  ## Unreleased
4
4
 
5
+ ## 2.1.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.1.0..v2.0.0)
6
+
7
+ ### Bug Fixes
8
+
9
+ * Ensure application gets reloaded only once. [#5740] by [@jscheid]
10
+ * Crash when rendering comments from a custom controller block. [#5758] by [@deivid-rodriguez]
11
+ * Switch `sass` dependency to `sassc-rails`, since `sass` is no longer supported and since it restores support for directly importing `css` files. [#5504] by [@deivid-rodriguez]
12
+
13
+ ### Removals
14
+
15
+ * Support for ruby 2.3 has been removed. [#5751] by [@deivid-rodriguez]
16
+
5
17
  ## 2.0.0 [☰](https://github.com/activeadmin/activeadmin/compare/v2.0.0.rc2..v2.0.0)
6
18
 
7
19
  _No changes_.
@@ -12,13 +24,13 @@ _No changes_.
12
24
 
13
25
  #### Minor
14
26
 
15
- * Require arbre `~> 1.2, >= 1.2.1` [#5726] by [@ionut998], and [#5738] by [@deivid-rodriguez]
27
+ * Require arbre `~> 1.2, >= 1.2.1`. [#5726] by [@ionut998], and [#5738] by [@deivid-rodriguez]
16
28
 
17
29
  ## 2.0.0.rc1 [☰](https://github.com/activeadmin/activeadmin/compare/v1.4.3..v2.0.0.rc1)
18
30
 
19
31
  ### Enhancements
20
32
 
21
- * Add your own content to the site `<head>`, like analytics [#5590] by [@buren]
33
+ * Add your own content to the site `<head>`, like analytics. [#5590] by [@buren]
22
34
 
23
35
  ```ruby
24
36
  ActiveAdmin.setup do |config|
@@ -26,6 +38,8 @@ _No changes_.
26
38
  end
27
39
  ```
28
40
 
41
+ * Consider authorization when displaying comments in show page. [#5555] by [@amiuhle]
42
+
29
43
  #### Minor
30
44
 
31
45
  * Add better support for rendering lists. [#5370] by [@dkniffin]
@@ -422,8 +436,10 @@ Please check [0-6-stable] for previous changes.
422
436
  [#5464]: https://github.com/activeadmin/activeadmin/pull/5464
423
437
  [#5486]: https://github.com/activeadmin/activeadmin/pull/5486
424
438
  [#5501]: https://github.com/activeadmin/activeadmin/pull/5501
439
+ [#5504]: https://github.com/activeadmin/activeadmin/pull/5504
425
440
  [#5517]: https://github.com/activeadmin/activeadmin/pull/5517
426
441
  [#5537]: https://github.com/activeadmin/activeadmin/pull/5537
442
+ [#5555]: https://github.com/activeadmin/activeadmin/pull/5555
427
443
  [#5583]: https://github.com/activeadmin/activeadmin/pull/5583
428
444
  [#5608]: https://github.com/activeadmin/activeadmin/pull/5608
429
445
  [#5611]: https://github.com/activeadmin/activeadmin/pull/5611
@@ -435,12 +451,16 @@ Please check [0-6-stable] for previous changes.
435
451
  [#5662]: https://github.com/activeadmin/activeadmin/pull/5662
436
452
  [#5726]: https://github.com/activeadmin/activeadmin/pull/5726
437
453
  [#5738]: https://github.com/activeadmin/activeadmin/pull/5738
454
+ [#5740]: https://github.com/activeadmin/activeadmin/pull/5740
455
+ [#5751]: https://github.com/activeadmin/activeadmin/pull/5751
456
+ [#5758]: https://github.com/activeadmin/activeadmin/pull/5758
438
457
 
439
458
  [@5t111111]: https://github.com/5t111111
440
459
  [@aarek]: https://github.com/aarek
441
460
  [@ajw725]: https://github.com/ajw725
442
461
  [@alex-bogomolov]: https://github.com/alex-bogomolov
443
462
  [@amiel]: https://github.com/amiel
463
+ [@amiuhle]: https://github.com/amiuhle
444
464
  [@andreslemik]: https://github.com/andreslemik
445
465
  [@blocknotes]: https://github.com/blocknotes
446
466
  [@bolshakov]: https://github.com/bolshakov
@@ -499,3 +519,4 @@ Please check [0-6-stable] for previous changes.
499
519
  [@chrp]: https://github.com/chrp
500
520
  [@bartoszkopinski]: https://github.com/bartoszkopinski
501
521
  [@panasyuk]: https://github.com/panasyuk
522
+ [@jscheid]: https://github.com/jscheid
data/lib/active_admin.rb CHANGED
@@ -8,6 +8,7 @@ require 'formtastic'
8
8
  require 'formtastic_i18n'
9
9
  require 'inherited_resources'
10
10
  require 'jquery-rails'
11
+ require 'sassc-rails'
11
12
  require 'arbre'
12
13
  require 'sprockets/es6'
13
14
 
@@ -1,5 +1,4 @@
1
1
  require 'active_admin/router'
2
- require 'active_admin/reloader'
3
2
  require 'active_admin/application_settings'
4
3
  require 'active_admin/namespace_settings'
5
4
 
@@ -188,17 +187,8 @@ module ActiveAdmin
188
187
  # regenerate the routes as well.
189
188
  def attach_reloader
190
189
  Rails.application.config.after_initialize do |app|
191
- unload_active_admin = -> { ActiveAdmin.application.unload! }
192
-
193
- if app.config.reload_classes_only_on_change
194
- # Rails is about to unload all the app files (e.g. models), so we
195
- # should first unload the classes generated by Active Admin, otherwise
196
- # they will contain references to the stale (unloaded) classes.
197
- Reloader.to_prepare(prepend: true, &unload_active_admin)
198
- else
199
- # If the user has configured the app to always reload app files after
200
- # each request, so we should unload the generated classes too.
201
- Reloader.to_complete(&unload_active_admin)
190
+ ActiveSupport::Reloader.after_class_unload do
191
+ ActiveAdmin.application.unload!
202
192
  end
203
193
 
204
194
  admin_dirs = {}
@@ -213,7 +203,7 @@ module ActiveAdmin
213
203
 
214
204
  app.reloaders << routes_reloader
215
205
 
216
- Reloader.to_prepare do
206
+ ActiveSupport::Reloader.to_prepare do
217
207
  # Rails might have reloaded the routes for other reasons (e.g.
218
208
  # routes.rb has changed), in which case Active Admin would have been
219
209
  # loaded via the `ActiveAdmin.routes` call in `routes.rb`.
@@ -18,6 +18,7 @@ module ActiveAdmin
18
18
 
19
19
  helper_method :authorized?
20
20
  helper_method :authorize!
21
+ helper_method :active_admin_authorization
21
22
  end
22
23
 
23
24
  protected
@@ -133,7 +133,7 @@ module ActiveAdmin
133
133
  # action.
134
134
  #
135
135
  def action(set, name, options = {}, &block)
136
- warn "Warning: method `#{name}` already defined" if controller.method_defined?(name)
136
+ warn "Warning: method `#{name}` already defined in #{controller.name}" if controller.method_defined?(name)
137
137
 
138
138
  set << ControllerAction.new(name, options)
139
139
  title = options.delete(:title)
@@ -1,3 +1,3 @@
1
1
  module ActiveAdmin
2
- VERSION = '2.0.0'
2
+ VERSION = '2.1.0'
3
3
  end
@@ -163,7 +163,10 @@ ActiveAdmin.setup do |config|
163
163
  #
164
164
  # Set the localize format to display dates and times.
165
165
  # To understand how to localize your app with I18n, read more at
166
- # https://github.com/svenfuchs/i18n/blob/master/lib%2Fi18n%2Fbackend%2Fbase.rb#L52
166
+ # https://guides.rubyonrails.org/i18n.html
167
+ #
168
+ # You can run `bin/rails runner 'puts I18n.t("date.formats")'` to see the
169
+ # available formats in your application.
167
170
  #
168
171
  config.localize_format = :long
169
172
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Charles Maresh
@@ -15,7 +15,7 @@ authors:
15
15
  autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
- date: 2019-04-25 00:00:00.000000000 Z
18
+ date: 2019-06-10 00:00:00.000000000 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: arbre
@@ -154,19 +154,19 @@ dependencies:
154
154
  - !ruby/object:Gem::Version
155
155
  version: 2.1.1
156
156
  - !ruby/object:Gem::Dependency
157
- name: sass
157
+ name: sassc-rails
158
158
  requirement: !ruby/object:Gem::Requirement
159
159
  requirements:
160
160
  - - "~>"
161
161
  - !ruby/object:Gem::Version
162
- version: '3.4'
162
+ version: '2.1'
163
163
  type: :runtime
164
164
  prerelease: false
165
165
  version_requirements: !ruby/object:Gem::Requirement
166
166
  requirements:
167
167
  - - "~>"
168
168
  - !ruby/object:Gem::Version
169
- version: '3.4'
169
+ version: '2.1'
170
170
  - !ruby/object:Gem::Dependency
171
171
  name: sprockets
172
172
  requirement: !ruby/object:Gem::Requirement
@@ -463,7 +463,6 @@ files:
463
463
  - lib/active_admin/page_dsl.rb
464
464
  - lib/active_admin/page_presenter.rb
465
465
  - lib/active_admin/pundit_adapter.rb
466
- - lib/active_admin/reloader.rb
467
466
  - lib/active_admin/resource.rb
468
467
  - lib/active_admin/resource/action_items.rb
469
468
  - lib/active_admin/resource/attributes.rb
@@ -600,7 +599,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
600
599
  requirements:
601
600
  - - ">="
602
601
  - !ruby/object:Gem::Version
603
- version: '2.3'
602
+ version: '2.4'
604
603
  required_rubygems_version: !ruby/object:Gem::Requirement
605
604
  requirements:
606
605
  - - ">="
@@ -1,25 +0,0 @@
1
- module ActiveAdmin
2
- module Reloader
3
- # ActionDispatch::Reloader.to_prepare is deprecated in Rails 5.0 and will be removed from Rails 5.1
4
- #
5
- # Use ActiveSupport::Reloader if available for Rails 5, fall back to ActionDispatch::Reloader for earlier Rails
6
- def self.to_prepare(*args, &block)
7
- if defined? ActiveSupport::Reloader
8
- ActiveSupport::Reloader.to_prepare(*args, &block)
9
- else
10
- ActionDispatch::Reloader.to_prepare(*args, &block)
11
- end
12
- end
13
-
14
- # ActionDispatch::Reloader.to_cleanup is deprecated in Rails 5.0 and will be removed from Rails 5.1
15
- #
16
- # Use ActiveSupport::Reloader if available for Rails 5, fall back to ActionDispatch::Reloader for earlier Rails
17
- def self.to_complete(*args, &block)
18
- if defined? ActiveSupport::Reloader
19
- ActiveSupport::Reloader.to_complete(*args, &block)
20
- else
21
- ActionDispatch::Reloader.to_cleanup(*args, &block)
22
- end
23
- end
24
- end
25
- end