yousty-activeadmin 1.0.12.pre → 1.0.13.pre

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1b497063b50e326b529415a5e1d17a29ae61e1ea
4
- data.tar.gz: 21c1845824f471e2c91fc72e67c15aed8c5cf840
3
+ metadata.gz: 09bd6eaa643df56eb1fb668486cb2d34e3e95f7a
4
+ data.tar.gz: 10f8c91f105f22b3d022dc138f99bc7110c48193
5
5
  SHA512:
6
- metadata.gz: b82c6d65d02a4ef3c29a32e3f78419f7a5b389449e6d34e7449eb450a76c43a9ef828b08821c1942c558fb46c89297b2a8e9be392544f2d9d78b8857601da789
7
- data.tar.gz: dc1e5ad2f129be003f111c80ff8e61723a4da74a5529c0809f03010b6055264c9bf05a9373af55ca7dda59afb52514e69690156d5ba656c300b08510886363af
6
+ metadata.gz: 810eb316f53b7ebda871143431dec9bdd2becec4f093339a73f504eb9412108b3cf5b2eea36c7c8b52aca46b94faeac50fd4eebbdb229d7249beec009236af5a
7
+ data.tar.gz: 7ba4cfd41ae04669e1ec7cf023138ac516ea07dc9f9313be70511900a265c0d31a281a374f154071421ee1d4a394222ccffa3f8baaf64d930ab3a4f480351e3a
@@ -211,7 +211,7 @@ You can change it per request / action too:
211
211
 
212
212
  ```ruby
213
213
  controller do
214
- before_filter :only => :index do
214
+ before_action :only => :index do
215
215
  @per_page = 100
216
216
  end
217
217
  end
@@ -34,7 +34,7 @@ Feature: Index - Page Title
34
34
  """
35
35
  ActiveAdmin.register Post do
36
36
  controller do
37
- before_filter { @page_title = "List of #{resource_class.model_name.plural}" }
37
+ before_action { @page_title = "List of #{resource_class.model_name.plural}" }
38
38
  end
39
39
  end
40
40
  """
@@ -51,7 +51,7 @@ Feature: Show - Page Title
51
51
  """
52
52
  ActiveAdmin.register Post do
53
53
  controller do
54
- before_filter { @page_title = "List of #{resource_class.model_name.plural}" }
54
+ before_action { @page_title = "List of #{resource_class.model_name.plural}" }
55
55
  end
56
56
  end
57
57
  """
@@ -211,9 +211,9 @@ module ActiveAdmin
211
211
 
212
212
  # Adds before, around and after filters to all controllers.
213
213
  # Example usage:
214
- # ActiveAdmin.before_filter :authenticate_admin!
214
+ # ActiveAdmin.before_action :authenticate_admin!
215
215
  #
216
- %w(before_filter skip_before_filter after_filter skip_after_filter around_filter skip_filter).each do |name|
216
+ %w(before_action skip_before_action after_filter skip_after_filter around_filter skip_filter).each do |name|
217
217
  define_method name do |*args, &block|
218
218
  controllers_for_filters.each do |controller|
219
219
  controller.public_send name, *args, &block
@@ -10,8 +10,8 @@ module ActiveAdmin
10
10
 
11
11
  layout :determine_active_admin_layout
12
12
 
13
- before_filter :only_render_implemented_actions
14
- before_filter :authenticate_active_admin_user
13
+ before_action :only_render_implemented_actions
14
+ before_action :authenticate_active_admin_user
15
15
 
16
16
  class << self
17
17
  # Ensure that this method is available for the DSL
@@ -4,7 +4,7 @@ module ActiveAdmin
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- before_filter :set_current_tab
7
+ before_action :set_current_tab
8
8
  helper_method :current_menu
9
9
  end
10
10
 
@@ -8,7 +8,7 @@ module ActiveAdmin
8
8
 
9
9
  actions :index
10
10
 
11
- before_filter :authorize_access!
11
+ before_action :authorize_access!
12
12
 
13
13
  def index(options={}, &block)
14
14
  render "active_admin/page/index"
@@ -116,7 +116,7 @@ module ActiveAdmin
116
116
  title = options.delete(:title)
117
117
 
118
118
  controller do
119
- before_filter(only: [name]) { @page_title = title } if title
119
+ before_action(only: [name]) { @page_title = title } if title
120
120
  define_method(name, &block || Proc.new{})
121
121
  end
122
122
  end
@@ -160,7 +160,7 @@ module ActiveAdmin
160
160
  delegate :before_destroy, :after_destroy, to: :controller
161
161
 
162
162
  # Standard rails filters
163
- delegate :before_filter, :skip_before_filter, :after_filter, :skip_after_filter, :around_filter, :skip_filter,
163
+ delegate :before_action, :skip_before_action, :after_filter, :skip_after_filter, :around_filter, :skip_filter,
164
164
  to: :controller
165
165
 
166
166
  # Specify which actions to create in the controller
@@ -1,3 +1,3 @@
1
1
  module ActiveAdmin
2
- VERSION = '1.0.12.pre'
2
+ VERSION = '1.0.13.pre'
3
3
  end
@@ -138,7 +138,7 @@ ActiveAdmin.setup do |config|
138
138
  # You can add before, after and around filters to all of your
139
139
  # Active Admin resources and pages from here.
140
140
  #
141
- # config.before_filter :do_something_awesome
141
+ # config.before_action :do_something_awesome
142
142
 
143
143
  # == Setting a Favicon
144
144
  #
@@ -52,7 +52,7 @@ describe 'defining new actions from registration blocks' do
52
52
  end
53
53
  end
54
54
 
55
- subject { find_before_filter controller, :comment }
55
+ subject { find_before_action controller, :comment }
56
56
 
57
57
  it { is_expected.to set_page_title_to "My Awesome Comment", for: controller }
58
58
  end
@@ -102,13 +102,13 @@ describe 'defining new actions from registration blocks' do
102
102
  end
103
103
  end
104
104
 
105
- subject { find_before_filter controller, :comments }
105
+ subject { find_before_action controller, :comments }
106
106
 
107
107
  it { is_expected.to set_page_title_to "My Awesome Comments", for: controller }
108
108
  end
109
109
  end
110
110
 
111
- def find_before_filter(controller, action)
111
+ def find_before_action(controller, action)
112
112
  finder = if ActiveAdmin::Dependency.rails? '>= 4.1.0'
113
113
  ->c { c.kind == :before && c.instance_variable_get(:@if) == ["action_name == '#{action}'"] }
114
114
  else
@@ -126,7 +126,7 @@ describe 'defining new actions from registration blocks' do
126
126
  end
127
127
 
128
128
  failure_message do |filter|
129
- message = "expected before_filter to set the @page_title to '#{expected}', but was '#{@actual}'"
129
+ message = "expected before_action to set the @page_title to '#{expected}', but was '#{@actual}'"
130
130
  end
131
131
  end
132
132
  end
@@ -12,14 +12,14 @@ describe ActiveAdmin::Application do
12
12
  ]
13
13
  end
14
14
 
15
- it 'before_filter' do
16
- controllers.each{ |c| expect(c).to receive(:before_filter).and_return(true) }
17
- application.before_filter :my_filter, only: :show
15
+ it 'before_action' do
16
+ controllers.each{ |c| expect(c).to receive(:before_action).and_return(true) }
17
+ application.before_action :my_filter, only: :show
18
18
  end
19
19
 
20
- it 'skip_before_filter' do
21
- controllers.each{ |c| expect(c).to receive(:skip_before_filter).and_return(true) }
22
- application.skip_before_filter :my_filter, only: :show
20
+ it 'skip_before_action' do
21
+ controllers.each{ |c| expect(c).to receive(:skip_before_action).and_return(true) }
22
+ application.skip_before_action :my_filter, only: :show
23
23
  end
24
24
 
25
25
  it 'after_filter' do
@@ -3,12 +3,12 @@ require 'rails_helper'
3
3
  describe ActiveAdmin::ResourceController::Sidebars do
4
4
  let(:controller){ Admin::PostsController }
5
5
 
6
- context 'without before_filter' do
6
+ context 'without before_action' do
7
7
  before do
8
8
  ActiveAdmin.register Post
9
9
  end
10
10
 
11
- subject { find_before_filter controller, :skip_sidebar! }
11
+ subject { find_before_action controller, :skip_sidebar! }
12
12
 
13
13
  it { is_expected.to set_skip_sidebar_to nil, for: controller }
14
14
  end
@@ -16,16 +16,16 @@ describe ActiveAdmin::ResourceController::Sidebars do
16
16
  describe '#skip_sidebar!' do
17
17
  before do
18
18
  ActiveAdmin.register Post do
19
- before_filter :skip_sidebar!
19
+ before_action :skip_sidebar!
20
20
  end
21
21
  end
22
22
 
23
- subject { find_before_filter controller, :skip_sidebar! }
23
+ subject { find_before_action controller, :skip_sidebar! }
24
24
 
25
25
  it { is_expected.to set_skip_sidebar_to true, for: controller }
26
26
  end
27
27
 
28
- def find_before_filter(controller, filter)
28
+ def find_before_action(controller, filter)
29
29
  #raise controller._process_action_callbacks.map(&:filter).inspect
30
30
  controller._process_action_callbacks.detect { |f| f.raw_filter == filter.to_sym }
31
31
  end
@@ -39,7 +39,7 @@ describe ActiveAdmin::ResourceController::Sidebars do
39
39
  end
40
40
 
41
41
  failure_message do |filter|
42
- message = "expected before_filter to set @skip_sidebar to '#{expected}', but was '#{@actual}'"
42
+ message = "expected before_action to set @skip_sidebar to '#{expected}', but was '#{@actual}'"
43
43
  end
44
44
  end
45
45
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yousty-activeadmin
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.12.pre
4
+ version: 1.0.13.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Bell
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-12-13 00:00:00.000000000 Z
11
+ date: 2016-12-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: arbre