activeadmin-searchable_select 1.2.0 → 1.5.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
  SHA256:
3
- metadata.gz: ebe817a6be51f72c4d5859fe39828111efe2d0ff710685bb409b166dde3536cc
4
- data.tar.gz: 637f82b369d338c9ae330d357e21538d010c6526536478993ccb0d106c73d0d9
3
+ metadata.gz: eae3cd46ff6e641c50c4f6e02c7aa4ab8105a160740c07fd82efea3eb4af26e8
4
+ data.tar.gz: 37274666f643b0df81a37aa0dbbd197cc7b94f45ef804398496a1ecbb3f1094f
5
5
  SHA512:
6
- metadata.gz: 1806ff32ba76e8b737af25117e3b56b972cba729ed896ea61f60f6b6ff8064e8ea7c49fe07cb81fc8742c8d99969cea343e6832bee6438702db34eea088c1919
7
- data.tar.gz: a598c4b4dda15432abb8745213e388497a2ae22cdf6c30d6a61594fe264eb69fdc94525884d7f9022651d9d3facaa2fc572b902269e671f3a93aabb131b9e74b
6
+ metadata.gz: a0448e24dbb3c48ca7421eca976836d5be764e91db9e89a129e8c9b47dbb5dbbbdb94ac8937d049b5af35d6c68a17933bc6e3712719fd920b125e65d29147b88
7
+ data.tar.gz: 4c90fe918890f40de37d138ba3b82b12307bf5331772a0dd8a139afb1698a8cf3a95620a72372415437b103851ee4ae574807d11a888cd8b850a6d360a2af6e9
@@ -0,0 +1,34 @@
1
+ name: tests
2
+ on: [push, pull_request]
3
+
4
+ jobs:
5
+ rspec:
6
+ runs-on: ubuntu-latest
7
+
8
+ strategy:
9
+ fail-fast: false
10
+ matrix:
11
+ ruby-version:
12
+ - '2.6'
13
+ - '2.7'
14
+ gemfile:
15
+ - gemfiles/rails_5.1_active_admin_1.x.gemfile
16
+ - gemfiles/rails_5.x_active_admin_1.x.gemfile
17
+ - gemfiles/rails_5.x_active_admin_2.x.gemfile
18
+ - gemfiles/rails_6.x_active_admin_2.x.gemfile
19
+ include:
20
+ - ruby-version: '3.0'
21
+ gemfile: gemfiles/rails_6.x_active_admin_2.x.gemfile
22
+
23
+ env:
24
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
25
+
26
+ steps:
27
+ - uses: actions/checkout@v2
28
+ - name: Set up Ruby
29
+ uses: ruby/setup-ruby@v1
30
+ with:
31
+ ruby-version: ${{ matrix.ruby-version }}
32
+ bundler-cache: true
33
+ - name: Run tests
34
+ run: bundle exec rspec
data/.rubocop.yml CHANGED
@@ -1,5 +1,7 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 2.3
3
+ Exclude:
4
+ - 'bin/**/*'
3
5
 
4
6
  # The default of 80 characters is a little to narrow.
5
7
  Metrics/LineLength:
data/Appraisals CHANGED
@@ -1,10 +1,3 @@
1
- appraise 'rails-4.2-active-admin-1.0.0.pre4' do
2
- gem 'rails', '~> 4.2'
3
- gem 'activeadmin', '1.0.0.pre4'
4
- gem 'jquery-ui-rails', '~> 5.0'
5
- gem 'sqlite3', '~> 1.3.6'
6
- end
7
-
8
1
  appraise 'rails-5.1-active-admin-1.x' do
9
2
  gem 'rails', '~> 5.1.0'
10
3
  gem 'activeadmin', '~> 1.0'
@@ -18,4 +11,9 @@ end
18
11
  appraise 'rails-5.x-active-admin-2.x' do
19
12
  gem 'rails', '~> 5.2'
20
13
  gem 'activeadmin', '~> 2.0'
14
+ end
15
+
16
+ appraise 'rails-6.x-active-admin-2.x' do
17
+ gem 'rails', '~> 6.1'
18
+ gem 'activeadmin', '~> 2.0'
21
19
  end
data/CHANGELOG.md CHANGED
@@ -1,16 +1,14 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 1.2.0
3
+ ### Version 1.5.0
4
4
 
5
- 2019-05-10
5
+ 2021-02-16
6
6
 
7
- [Compare changes](https://github.com/codevise/activeadmin-searchable_select/compare/1-1-stable...v1.2.0)
7
+ [Compare changes](https://github.com/codevise/activeadmin-searchable_select/compare/1-4-stable...v1.5.0)
8
8
 
9
- - Add support for Active Admin 2.0
10
- ([#13](https://github.com/codevise/activeadmin-searchable_select/pull/13))
11
- - Improve Appraisal setup
12
- ([#12](https://github.com/codevise/activeadmin-searchable_select/pull/12))
9
+ - Allow adding additional payload to option items in AJAX response
10
+ ([#33](https://github.com/codevise/activeadmin-searchable_select/pull/33))
13
11
 
14
12
  See
15
- [1-1-stable branch](https://github.com/codevise/activeadmin-searchable_select/blob/1-1-stable/CHANGELOG.md)
13
+ [1-4-stable branch](https://github.com/codevise/activeadmin-searchable_select/blob/1-4-stable/CHANGELOG.md)
16
14
  for previous changes.
data/README.md CHANGED
@@ -1,7 +1,7 @@
1
1
  # ActiveAdmin Searchable Select
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/activeadmin-searchable_select.svg)](http://badge.fury.io/rb/activeadmin-searchable_select)
4
- [![Build Status](https://travis-ci.org/codevise/activeadmin-searchable_select.svg?branch=master)](https://travis-ci.org/codevise/activeadmin-searchable_select)
4
+ [![Build Status](https://github.com/codevise/activeadmin-searchable_select.svg?branch=master)](https://github.com/codevise/activeadmin-searchable_select/actions)
5
5
 
6
6
  Searchable select boxes (via [Select2](https://select2.org/)) for
7
7
  ActiveAdmin forms and filters. Extends the ActiveAdmin resource DSL to
@@ -12,7 +12,7 @@ allow defining JSON endpoints to fetch options from asynchronously.
12
12
  Add `activeadmin-searchable_select` to your Gemfile:
13
13
 
14
14
  ```ruby
15
- gem 'activeadmin-searchable_select
15
+ gem 'activeadmin-searchable_select'
16
16
  ```
17
17
 
18
18
  Import stylesheets and require javascripts:
@@ -193,6 +193,25 @@ build your query in a way that it can query multiple attributes at once.
193
193
 
194
194
  In this example, the `all` scope will query `email OR username`.
195
195
 
196
+ You can add the additional payload as dsl option:
197
+
198
+ ```ruby
199
+ ActiveAdmin.register Category do
200
+ searchable_select_options(scope: Category.all,
201
+ text_attribute: :name,
202
+ additional_payload: ->(record) { { foo: record.bar } } )
203
+ end
204
+ ```
205
+
206
+ response example which uses additional_payload:
207
+
208
+ ```json
209
+ {
210
+ "results": [{ "id": "1", "text": "Bicycles", "foo": "Bar" }],
211
+ "pagination": { "more": "false" }
212
+ }
213
+ ```
214
+
196
215
  #### Passing Parameters
197
216
 
198
217
  You can pass additional parameters to the options endpoint:
@@ -238,12 +257,35 @@ for feature specs:
238
257
  ```ruby
239
258
  RSpec.configure do |config|
240
259
  config.before(:each) do |example|
241
- ActiveAdmin::Select2.inline_ajax_options = (example.metadata[:type] == :feature)
260
+ ActiveAdmin::SearchableSelect.inline_ajax_options = (example.metadata[:type] == :feature)
242
261
  end
243
262
  end
244
263
 
245
264
  ```
246
265
 
266
+ ### Passing options to Select2
267
+
268
+ It is possible to pass and define configuration options to Select2
269
+ via `data-attributes` using nested (subkey) options.
270
+
271
+ Attributes need to be added to the `input_html` option in the form input.
272
+ For example you can tell Select2 how long to wait after a user
273
+ has stopped typing before sending the request:
274
+
275
+ ```ruby
276
+ ...
277
+ f.input(:category,
278
+ as: :searchable_select,
279
+ ajax: true,
280
+ input_html: {
281
+ data: {
282
+ 'ajax--delay' => 500
283
+ }
284
+ })
285
+ ...
286
+ ```
287
+
288
+
247
289
  ## Development
248
290
 
249
291
  To run the tests install bundled gems and invoke RSpec:
@@ -14,20 +14,26 @@ Gem::Specification.new do |spec|
14
14
  spec.files = `git ls-files -z`.split("\x0")
15
15
  spec.require_paths = ['lib']
16
16
 
17
- spec.required_ruby_version = '~> 2.1'
17
+ spec.required_ruby_version = ['>= 2.1', '< 4']
18
18
 
19
- spec.add_development_dependency 'bundler', '~> 1.5'
19
+ spec.add_development_dependency 'bundler', ['>= 1.5', '< 3']
20
20
  spec.add_development_dependency 'rake'
21
21
  spec.add_development_dependency 'appraisal', '~> 2.2'
22
22
  spec.add_development_dependency 'rspec-rails', '~> 3.6'
23
23
  spec.add_development_dependency 'combustion', '~> 1.0'
24
24
  spec.add_development_dependency 'database_cleaner', '~> 1.6'
25
25
  spec.add_development_dependency 'sqlite3', '~> 1.3'
26
- spec.add_development_dependency 'capybara', '~> 2.15'
27
- spec.add_development_dependency 'poltergeist', '~> 1.15'
26
+
27
+ spec.add_development_dependency 'capybara', '~> 3.9'
28
+ spec.add_development_dependency 'puma', '~> 5.0'
29
+ spec.add_development_dependency 'selenium-webdriver', '~> 3.6'
30
+ spec.add_development_dependency 'webdrivers', '~> 4.0'
31
+
32
+ spec.add_development_dependency 'coffee-rails'
33
+ spec.add_development_dependency 'rails'
28
34
  spec.add_development_dependency 'rubocop', '~> 0.42.0'
29
35
  spec.add_development_dependency 'semmy', '~> 1.0'
30
- spec.add_development_dependency 'rails'
36
+ spec.add_development_dependency 'sprockets', '~> 3.7'
31
37
 
32
38
  spec.add_runtime_dependency 'activeadmin', ['>= 1.x', '< 3']
33
39
  spec.add_runtime_dependency 'jquery-rails', ['>= 3.0', '< 5']
@@ -0,0 +1,9 @@
1
+ # This file was generated by Appraisal
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gem "sass-rails"
6
+ gem "rails", "~> 6.1"
7
+ gem "activeadmin", "~> 2.0"
8
+
9
+ gemspec path: "../"
@@ -8,6 +8,7 @@ module ActiveAdmin
8
8
  @display_text = extract_display_text_option(options)
9
9
  @filter = extract_filter_option(options)
10
10
  @per_page = options.fetch(:per_page, 10)
11
+ @additional_payload = options.fetch(:additional_payload, {})
11
12
  end
12
13
 
13
14
  def scope(template, params)
@@ -38,7 +39,7 @@ module ActiveAdmin
38
39
  {
39
40
  id: record.id,
40
41
  text: display_text(record)
41
- }
42
+ }.merge(hash_of_additional_payload(record) || {})
42
43
  end
43
44
 
44
45
  { results: results, pagination: { more: more } }
@@ -98,6 +99,21 @@ module ActiveAdmin
98
99
  ->(term, scope) { scope.ransack("#{text_attribute}_cont" => term).result }
99
100
  end
100
101
  end
102
+
103
+ def build_additional_payload(record)
104
+ case @additional_payload
105
+ when Proc
106
+ @additional_payload.call(record).to_h
107
+ else
108
+ {}
109
+ end
110
+ end
111
+
112
+ def hash_of_additional_payload(record)
113
+ return nil if @additional_payload.nil? && @additional_payload.empty?
114
+
115
+ build_additional_payload(record)
116
+ end
101
117
  end
102
118
  end
103
119
  end
@@ -26,6 +26,23 @@ module ActiveAdmin
26
26
  #
27
27
  # @param name [Symbol] Optional collection name if helper is
28
28
  # used multiple times within one resource.
29
+ #
30
+ # @param additional_payload [Proc]
31
+ # Adds additional attributes to the results array
32
+ # @example
33
+ #
34
+ # ActiveAdmin.register Tag do
35
+ # searchable_select_options(
36
+ # scope: Color,
37
+ # text_attributes: :title,
38
+ # additional_payload: lambda { |record| { color: record.color } }
39
+ # )
40
+ # end
41
+ # @json
42
+ # {
43
+ # "results": [{ "id": "1", "text": "Red", "color": "#FFF" }],
44
+ # "pagination": { "more": "false" }
45
+ # }
29
46
  def searchable_select_options(name: :all, **options)
30
47
  option_collection = OptionCollection.new(name, options)
31
48
  config.searchable_select_option_collections[name] = option_collection
@@ -45,9 +45,11 @@ module ActiveAdmin
45
45
 
46
46
  def ajax_url
47
47
  return unless options[:ajax]
48
- template.polymorphic_path([template.active_admin_namespace.name, ajax_resource_class],
49
- action: option_collection.collection_action_name,
50
- **ajax_params)
48
+ [ajax_resource.route_collection_path,
49
+ '/',
50
+ option_collection.collection_action_name,
51
+ '?',
52
+ ajax_params.to_query].join
51
53
  end
52
54
 
53
55
  def all_options_collection
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module SearchableSelect
3
- VERSION = '1.2.0'.freeze
3
+ VERSION = '1.5.0'.freeze
4
4
  end
5
5
  end
@@ -5,60 +5,92 @@ require 'support/capybara'
5
5
  require 'support/active_admin_helpers'
6
6
 
7
7
  RSpec.describe 'end to end', type: :feature, js: true do
8
- before(:each) do
9
- ActiveAdminHelpers.setup do
10
- ActiveAdmin.register(Category) do
11
- searchable_select_options(scope: Category, text_attribute: :name)
12
- end
8
+ context 'class name without namespaces' do
9
+ before(:each) do
10
+ ActiveAdminHelpers.setup do
11
+ ActiveAdmin.register(Category) do
12
+ searchable_select_options(scope: Category, text_attribute: :name)
13
+ end
13
14
 
14
- ActiveAdmin.register(Post) do
15
- filter(:category, as: :searchable_select, ajax: true)
15
+ ActiveAdmin.register(Post) do
16
+ filter(:category, as: :searchable_select, ajax: true)
16
17
 
17
- form do |f|
18
- f.input(:category, as: :searchable_select, ajax: true)
18
+ form do |f|
19
+ f.input(:category, as: :searchable_select, ajax: true)
20
+ end
19
21
  end
20
- end
21
22
 
22
- ActiveAdmin.setup {}
23
+ ActiveAdmin.setup {}
24
+ end
23
25
  end
24
- end
25
26
 
26
- describe 'index page with searchable select filter' do
27
- it 'loads filter input options' do
28
- Category.create(name: 'Music')
29
- Category.create(name: 'Travel')
27
+ describe 'index page with searchable select filter' do
28
+ it 'loads filter input options' do
29
+ Category.create(name: 'Music')
30
+ Category.create(name: 'Travel')
30
31
 
31
- visit '/admin/posts'
32
+ visit '/admin/posts'
32
33
 
33
- expand_select_box
34
- wait_for_ajax
34
+ expand_select_box
35
+ wait_for_ajax
35
36
 
36
- expect(select_box_items).to eq(%w(Music Travel))
37
- end
37
+ expect(select_box_items).to eq(%w(Music Travel))
38
+ end
39
+
40
+ it 'allows filtering options by term' do
41
+ Category.create(name: 'Music')
42
+ Category.create(name: 'Travel')
43
+
44
+ visit '/admin/posts'
45
+
46
+ expand_select_box
47
+ enter_search_term('T')
48
+ wait_for_ajax
49
+
50
+ expect(select_box_items).to eq(%w(Travel))
51
+ end
52
+
53
+ it 'loads more items when scrolling down' do
54
+ 15.times { |i| Category.create(name: "Category #{i}") }
55
+ visit '/admin/posts'
38
56
 
39
- it 'allows filtering options by term' do
40
- Category.create(name: 'Music')
41
- Category.create(name: 'Travel')
57
+ expand_select_box
58
+ wait_for_ajax
59
+ scroll_select_box_list
60
+ wait_for_ajax
42
61
 
43
- visit '/admin/posts'
62
+ expect(select_box_items.size).to eq(15)
63
+ end
64
+ end
65
+ end
44
66
 
45
- expand_select_box
46
- enter_search_term('T')
47
- wait_for_ajax
67
+ context 'class name with namespace' do
68
+ before(:each) do
69
+ ActiveAdminHelpers.setup do
70
+ ActiveAdmin.register RGB::Color, as: 'color' do
71
+ searchable_select_options scope: RGB::Color, text_attribute: :code
72
+ end
48
73
 
49
- expect(select_box_items).to eq(%w(Travel))
74
+ ActiveAdmin.register Internal::TagName, as: 'Tag Name' do
75
+ filter :color, as: :searchable_select, ajax: { resource: RGB::Color }
76
+ end
77
+
78
+ ActiveAdmin.setup {}
79
+ end
50
80
  end
51
81
 
52
- it 'loads more items when scrolling down' do
53
- 15.times { |i| Category.create(name: "Category #{i}") }
54
- visit '/admin/posts'
82
+ describe 'index page with searchable select filter' do
83
+ it 'loads filter input options' do
84
+ RGB::Color.create(code: '#eac112', description: 'Orange')
85
+ RGB::Color.create(code: '#19bf25', description: 'Green')
55
86
 
56
- expand_select_box
57
- wait_for_ajax
58
- scroll_select_box_list
59
- wait_for_ajax
87
+ visit '/admin/tag_names'
60
88
 
61
- expect(select_box_items.size).to eq(15)
89
+ expand_select_box
90
+ wait_for_ajax
91
+
92
+ expect(select_box_items).to eq(%w(#eac112 #19bf25))
93
+ end
62
94
  end
63
95
  end
64
96
 
@@ -140,6 +140,60 @@ RSpec.describe 'searchable_select_options dsl', type: :request do
140
140
  end
141
141
  end
142
142
 
143
+ describe 'with additional_payload' do
144
+ context 'as lambda' do
145
+ before(:each) do
146
+ ActiveAdminHelpers.setup do
147
+ ActiveAdmin.register(Post) do
148
+ searchable_select_options(
149
+ scope: Post,
150
+ text_attribute: :title,
151
+ additional_payload: lambda do |record|
152
+ { published: record.published }
153
+ end
154
+ )
155
+ end
156
+ end
157
+ end
158
+ let!(:post) { Post.create!(title: 'A post', published: false) }
159
+
160
+ subject { get '/admin/posts/all_options' }
161
+
162
+ it 'returns options with our additional attribute' do
163
+ subject
164
+ expect(json_response).to match(
165
+ results: [{ text: 'A post', id: post.id, published: false }],
166
+ pagination: { more: false }
167
+ )
168
+ end
169
+ end
170
+
171
+ context 'as Proc' do
172
+ before(:each) do
173
+ ActiveAdminHelpers.setup do
174
+ ActiveAdmin.register(Post) do
175
+ searchable_select_options(
176
+ scope: Post,
177
+ text_attribute: :title,
178
+ additional_payload: proc { |record| { published: record.published } }
179
+ )
180
+ end
181
+ end
182
+ end
183
+ let!(:post) { Post.create!(title: 'A post', published: false) }
184
+
185
+ subject { get '/admin/posts/all_options' }
186
+
187
+ it 'returns options with our additional attribute' do
188
+ subject
189
+ expect(json_response).to match(
190
+ results: [{ text: 'A post', id: post.id, published: false }],
191
+ pagination: { more: false }
192
+ )
193
+ end
194
+ end
195
+ end
196
+
143
197
  it 'allows passing lambda as scope' do
144
198
  ActiveAdminHelpers.setup do
145
199
  ActiveAdmin.register(Post) do
@@ -20,6 +20,17 @@ ActiveRecord::Schema.define do
20
20
  t.boolean :published
21
21
  end
22
22
 
23
+ create_table(:rgb_colors, force: true) do |t|
24
+ t.string :code
25
+ t.text :description
26
+ end
27
+
28
+ create_table(:internal_tag_names, force: true) do |t|
29
+ t.string :name
30
+ t.text :description
31
+ t.integer :color_id
32
+ end
33
+
23
34
  create_table(:users, force: true) do |t|
24
35
  t.string :name
25
36
  end
@@ -1,7 +1,8 @@
1
1
  require 'capybara/rspec'
2
- require 'capybara/poltergeist'
2
+ require 'selenium-webdriver'
3
+ require 'webdrivers/chromedriver'
3
4
 
4
- Capybara.javascript_driver = :poltergeist
5
+ Capybara.javascript_driver = :selenium_chrome_headless
5
6
 
6
7
  RSpec.configure do |config|
7
8
  config.include Capybara::RSpecMatchers, type: :request
@@ -13,6 +13,20 @@ class Post < ActiveRecord::Base
13
13
  scope(:published, -> { where(published: true) })
14
14
  end
15
15
 
16
+ module RGB
17
+ class Color < ActiveRecord::Base
18
+ self.table_name = :rgb_colors
19
+ has_many :tags, class_name: 'Internal::TagName'
20
+ end
21
+ end
22
+
23
+ module Internal
24
+ class TagName < ActiveRecord::Base
25
+ self.table_name = :internal_tag_names
26
+ belongs_to :color, class_name: 'RGB::Color', foreign_key: :color_id
27
+ end
28
+ end
29
+
16
30
  RSpec.configure do |config|
17
31
  config.after do
18
32
  DatabaseCleaner.strategy = :truncation
metadata CHANGED
@@ -1,29 +1,35 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin-searchable_select
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Codevise Solutions Ltd
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-05-10 00:00:00.000000000 Z
11
+ date: 2021-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '3'
20
23
  type: :development
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '1.5'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '3'
27
33
  - !ruby/object:Gem::Dependency
28
34
  name: rake
29
35
  requirement: !ruby/object:Gem::Requirement
@@ -114,28 +120,84 @@ dependencies:
114
120
  requirements:
115
121
  - - "~>"
116
122
  - !ruby/object:Gem::Version
117
- version: '2.15'
123
+ version: '3.9'
124
+ type: :development
125
+ prerelease: false
126
+ version_requirements: !ruby/object:Gem::Requirement
127
+ requirements:
128
+ - - "~>"
129
+ - !ruby/object:Gem::Version
130
+ version: '3.9'
131
+ - !ruby/object:Gem::Dependency
132
+ name: puma
133
+ requirement: !ruby/object:Gem::Requirement
134
+ requirements:
135
+ - - "~>"
136
+ - !ruby/object:Gem::Version
137
+ version: '5.0'
138
+ type: :development
139
+ prerelease: false
140
+ version_requirements: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - "~>"
143
+ - !ruby/object:Gem::Version
144
+ version: '5.0'
145
+ - !ruby/object:Gem::Dependency
146
+ name: selenium-webdriver
147
+ requirement: !ruby/object:Gem::Requirement
148
+ requirements:
149
+ - - "~>"
150
+ - !ruby/object:Gem::Version
151
+ version: '3.6'
118
152
  type: :development
119
153
  prerelease: false
120
154
  version_requirements: !ruby/object:Gem::Requirement
121
155
  requirements:
122
156
  - - "~>"
123
157
  - !ruby/object:Gem::Version
124
- version: '2.15'
158
+ version: '3.6'
125
159
  - !ruby/object:Gem::Dependency
126
- name: poltergeist
160
+ name: webdrivers
127
161
  requirement: !ruby/object:Gem::Requirement
128
162
  requirements:
129
163
  - - "~>"
130
164
  - !ruby/object:Gem::Version
131
- version: '1.15'
165
+ version: '4.0'
132
166
  type: :development
133
167
  prerelease: false
134
168
  version_requirements: !ruby/object:Gem::Requirement
135
169
  requirements:
136
170
  - - "~>"
137
171
  - !ruby/object:Gem::Version
138
- version: '1.15'
172
+ version: '4.0'
173
+ - !ruby/object:Gem::Dependency
174
+ name: coffee-rails
175
+ requirement: !ruby/object:Gem::Requirement
176
+ requirements:
177
+ - - ">="
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
180
+ type: :development
181
+ prerelease: false
182
+ version_requirements: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ">="
185
+ - !ruby/object:Gem::Version
186
+ version: '0'
187
+ - !ruby/object:Gem::Dependency
188
+ name: rails
189
+ requirement: !ruby/object:Gem::Requirement
190
+ requirements:
191
+ - - ">="
192
+ - !ruby/object:Gem::Version
193
+ version: '0'
194
+ type: :development
195
+ prerelease: false
196
+ version_requirements: !ruby/object:Gem::Requirement
197
+ requirements:
198
+ - - ">="
199
+ - !ruby/object:Gem::Version
200
+ version: '0'
139
201
  - !ruby/object:Gem::Dependency
140
202
  name: rubocop
141
203
  requirement: !ruby/object:Gem::Requirement
@@ -165,19 +227,19 @@ dependencies:
165
227
  - !ruby/object:Gem::Version
166
228
  version: '1.0'
167
229
  - !ruby/object:Gem::Dependency
168
- name: rails
230
+ name: sprockets
169
231
  requirement: !ruby/object:Gem::Requirement
170
232
  requirements:
171
- - - ">="
233
+ - - "~>"
172
234
  - !ruby/object:Gem::Version
173
- version: '0'
235
+ version: '3.7'
174
236
  type: :development
175
237
  prerelease: false
176
238
  version_requirements: !ruby/object:Gem::Requirement
177
239
  requirements:
178
- - - ">="
240
+ - - "~>"
179
241
  - !ruby/object:Gem::Version
180
- version: '0'
242
+ version: '3.7'
181
243
  - !ruby/object:Gem::Dependency
182
244
  name: activeadmin
183
245
  requirement: !ruby/object:Gem::Requirement
@@ -238,10 +300,10 @@ executables: []
238
300
  extensions: []
239
301
  extra_rdoc_files: []
240
302
  files:
303
+ - ".github/workflows/tests.yml"
241
304
  - ".gitignore"
242
305
  - ".rspec"
243
306
  - ".rubocop.yml"
244
- - ".travis.yml"
245
307
  - ".yardopts"
246
308
  - Appraisals
247
309
  - CHANGELOG.md
@@ -254,10 +316,10 @@ files:
254
316
  - app/assets/javascripts/active_admin/searchable_select/init.js
255
317
  - app/assets/stylesheets/active_admin/searchable_select.scss
256
318
  - bin/rspec
257
- - gemfiles/rails_4.2_active_admin_1.0.0.pre4.gemfile
258
319
  - gemfiles/rails_5.1_active_admin_1.x.gemfile
259
320
  - gemfiles/rails_5.x_active_admin_1.x.gemfile
260
321
  - gemfiles/rails_5.x_active_admin_2.x.gemfile
322
+ - gemfiles/rails_6.x_active_admin_2.x.gemfile
261
323
  - lib/activeadmin-searchable_select.rb
262
324
  - lib/activeadmin/inputs/filters/searchable_select_input.rb
263
325
  - lib/activeadmin/inputs/searchable_select_input.rb
@@ -301,17 +363,19 @@ require_paths:
301
363
  - lib
302
364
  required_ruby_version: !ruby/object:Gem::Requirement
303
365
  requirements:
304
- - - "~>"
366
+ - - ">="
305
367
  - !ruby/object:Gem::Version
306
368
  version: '2.1'
369
+ - - "<"
370
+ - !ruby/object:Gem::Version
371
+ version: '4'
307
372
  required_rubygems_version: !ruby/object:Gem::Requirement
308
373
  requirements:
309
374
  - - ">="
310
375
  - !ruby/object:Gem::Version
311
376
  version: '0'
312
377
  requirements: []
313
- rubyforge_project:
314
- rubygems_version: 2.7.5
378
+ rubygems_version: 3.0.8
315
379
  signing_key:
316
380
  specification_version: 4
317
381
  summary: Use searchable selects based on Select2 in Active Admin forms and filters.
data/.travis.yml DELETED
@@ -1,17 +0,0 @@
1
- language: ruby
2
- rvm:
3
- - 2.3.4
4
-
5
- # Use container based travis infrastructure which allows caching
6
- # features for open source projects.
7
- sudo: false
8
- cache:
9
- bundler: true
10
-
11
- gemfile:
12
- - gemfiles/rails_4.2_active_admin_1.0.0.pre4.gemfile
13
- - gemfiles/rails_5.1_active_admin_1.x.gemfile
14
- - gemfiles/rails_5.x_active_admin_1.x.gemfile
15
- - gemfiles/rails_5.x_active_admin_2.x.gemfile
16
-
17
- script: bundle exec rspec
@@ -1,11 +0,0 @@
1
- # This file was generated by Appraisal
2
-
3
- source "https://rubygems.org"
4
-
5
- gem "sass-rails"
6
- gem "rails", "~> 4.2"
7
- gem "activeadmin", "1.0.0.pre4"
8
- gem "jquery-ui-rails", "~> 5.0"
9
- gem "sqlite3", "~> 1.3.6"
10
-
11
- gemspec path: "../"