activeadmin-searchable_select 1.0.2 → 1.4.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: adbee989dd2ce2851dce0565e4eb04e02b7d63dd164fb3bfb491f7b3840eddf9
4
- data.tar.gz: 01f9cf36616ed6ccdb22e956f6f43dfd1a3d44cf52a18f9957433b384bfe893d
3
+ metadata.gz: fe0935611dac081858397d808fa99c65a72944153ce323c8b10f3afb96657a83
4
+ data.tar.gz: e5c1faa951288612248a1f87f4ed1961f7f45861b7ac1946a404c5f15030f656
5
5
  SHA512:
6
- metadata.gz: 00ca17e82f7a964c1b50425e2d62a16a49bdb06c041879d05ad6a98e5f520b9f8a324d888b6e26299c6b994199c8e44a402c44a2e303ac1ce6c743c9a5336675
7
- data.tar.gz: da3c49a990ca32f3ae6fcbe126eaeb80d144a772a8340ed45d7e40aac5de94440e57035196223af055f69d3eb8cee1377f1fa7cc794d543ede2e4efc964ed414
6
+ metadata.gz: '097917cab8c292dcf3cdab69661ff59f6a0377698514b6f7323b28a3a70bc2c3f66c41b64a7e26ae47f981559f791d6ae35df96ec1a736f214fcd7753cd25693'
7
+ data.tar.gz: 10592311d0cf0ad805abaf218ce97a9af4ff8a8350b861571465e01106815d6b3eaddd9641f2256e5323e5a05a6ed7cd0759a6531cdfe5af2cf858e69affedf2
@@ -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,15 +1,19 @@
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'
1
+ appraise 'rails-5.1-active-admin-1.x' do
2
+ gem 'rails', '~> 5.1.0'
3
+ gem 'activeadmin', '~> 1.0'
5
4
  end
6
5
 
7
- appraise 'rails-5.1-active-admin-1.0' do
8
- gem 'rails', '~> 5.1'
6
+ appraise 'rails-5.x-active-admin-1.x' do
7
+ gem 'rails', '~> 5.2'
9
8
  gem 'activeadmin', '~> 1.0'
10
9
  end
11
10
 
12
- appraise 'rails-5.1-active-admin-1.1' do
13
- gem 'rails', '~> 5.1'
14
- gem 'activeadmin', '~> 1.1'
11
+ appraise 'rails-5.x-active-admin-2.x' do
12
+ gem 'rails', '~> 5.2'
13
+ gem 'activeadmin', '~> 2.0'
15
14
  end
15
+
16
+ appraise 'rails-6.x-active-admin-2.x' do
17
+ gem 'rails', '~> 6.1'
18
+ gem 'activeadmin', '~> 2.0'
19
+ end
data/CHANGELOG.md CHANGED
@@ -1,27 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 1.0.2
3
+ ### Version 1.4.0
4
4
 
5
- 2018-02-08
5
+ 2021-02-04
6
6
 
7
- [Compare changes](https://github.com/codevise/activeadmin-searchable_select/compare/v1.0.1...v1.0.2)
7
+ [Compare changes](https://github.com/codevise/activeadmin-searchable_select/compare/1-3-stable...v1.4.0)
8
8
 
9
- - Use the namespace for the active admin resource.
10
- ([#4](https://github.com/codevise/activeadmin-searchable_select/pull/4))
11
- - Make end to end specs less brittle
12
- ([#5](https://github.com/codevise/activeadmin-searchable_select/pull/5))
9
+ - Support admin resources for namespaced models.
10
+ ([#30](https://github.com/codevise/activeadmin-searchable_select/pull/30))
11
+ - Improve README.md
12
+ ([#28](https://github.com/codevise/activeadmin-searchable_select/pull/28))
13
13
 
14
- ### Version 1.0.1
15
-
16
- 2018-01-19
17
-
18
- [Compare changes](https://github.com/codevise/activeadmin-searchable_select/compare/v1.0.0...v1.0.1)
19
-
20
- - Use zero based pagination parameter
21
- ([#2](https://github.com/codevise/activeadmin-searchable_select/pull/2))
22
-
23
- ### Version 1.0.0
24
-
25
- 2017-10-23
26
-
27
- - Initial release.
14
+ See
15
+ [1-3-stable branch](https://github.com/codevise/activeadmin-searchable_select/blob/1-3-stable/CHANGELOG.md)
16
+ 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:
@@ -23,8 +23,8 @@ Import stylesheets and require javascripts:
23
23
  ```
24
24
 
25
25
  ```coffee
26
- # active_admin.js.coffee
27
- #= require active_admin/searchable_select
26
+ // active_admin.js
27
+ //= require active_admin/searchable_select
28
28
  ```
29
29
 
30
30
  ## Usage
@@ -50,6 +50,15 @@ This also works for filters:
50
50
  end
51
51
  ```
52
52
 
53
+ By default, you can only select one at a time for a filter. You can
54
+ specify a multi-select with:
55
+
56
+ ```ruby
57
+ ActiveAdmin.register Product do
58
+ filter(:category, as: :searchable_select, multiple: true)
59
+ end
60
+ ```
61
+
53
62
  ### Fetching Options via Ajax
54
63
 
55
64
  For large collections, rendering the whole set of options can be to
@@ -229,12 +238,35 @@ for feature specs:
229
238
  ```ruby
230
239
  RSpec.configure do |config|
231
240
  config.before(:each) do |example|
232
- ActiveAdmin::Select2.inline_ajax_options = (example.metadata[:type] == :feature)
241
+ ActiveAdmin::SearchableSelect.inline_ajax_options = (example.metadata[:type] == :feature)
233
242
  end
234
243
  end
235
244
 
236
245
  ```
237
246
 
247
+ ### Passing options to Select2
248
+
249
+ It is possible to pass and define configuration options to Select2
250
+ via `data-attributes` using nested (subkey) options.
251
+
252
+ Attributes need to be added to the `input_html` option in the form input.
253
+ For example you can tell Select2 how long to wait after a user
254
+ has stopped typing before sending the request:
255
+
256
+ ```ruby
257
+ ...
258
+ f.input(:category,
259
+ as: :searchable_select,
260
+ ajax: true,
261
+ input_html: {
262
+ data: {
263
+ 'ajax--delay' => 500
264
+ }
265
+ })
266
+ ...
267
+ ```
268
+
269
+
238
270
  ## Development
239
271
 
240
272
  To run the tests install bundled gems and invoke RSpec:
@@ -14,22 +14,28 @@ 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
- spec.add_development_dependency 'combustion', '~> 0.7.0'
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
- spec.add_runtime_dependency 'activeadmin', '~> 1.x'
38
+ spec.add_runtime_dependency 'activeadmin', ['>= 1.x', '< 3']
33
39
  spec.add_runtime_dependency 'jquery-rails', ['>= 3.0', '< 5']
34
40
  spec.add_runtime_dependency 'select2-rails', '~> 4.0'
35
41
  end
@@ -3,8 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "sass-rails"
6
- gem "rails", "~> 4.2"
7
- gem "activeadmin", "1.0.0.pre4"
8
- gem "jquery-ui-rails", "~> 5.0"
6
+ gem "rails", "~> 5.1.0"
7
+ gem "activeadmin", "~> 1.0"
9
8
 
10
9
  gemspec path: "../"
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "sass-rails"
6
- gem "rails", "~> 5.1"
6
+ gem "rails", "~> 5.2"
7
7
  gem "activeadmin", "~> 1.0"
8
8
 
9
9
  gemspec path: "../"
@@ -3,7 +3,7 @@
3
3
  source "https://rubygems.org"
4
4
 
5
5
  gem "sass-rails"
6
- gem "rails", "~> 5.1"
7
- gem "activeadmin", "~> 1.1"
6
+ gem "rails", "~> 5.2"
7
+ gem "activeadmin", "~> 2.0"
8
8
 
9
9
  gemspec path: "../"
@@ -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: "../"
@@ -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
@@ -57,23 +59,23 @@ module ActiveAdmin
57
59
  end
58
60
 
59
61
  def selected_value_collection
60
- [selected_value_option].compact
61
- end
62
-
63
- def selected_value_option
64
- option_for_record(selected_record) if selected_record
62
+ selected_records.collect { |s| option_for_record(s) }
65
63
  end
66
64
 
67
65
  def option_for_record(record)
68
66
  [option_collection.display_text(record), record.id]
69
67
  end
70
68
 
71
- def selected_record
72
- @selected_record ||=
73
- selected_value && option_collection_scope.find_by_id(selected_value)
69
+ def selected_records
70
+ @selected_records ||=
71
+ if selected_values
72
+ option_collection_scope.where(id: selected_values)
73
+ else
74
+ []
75
+ end
74
76
  end
75
77
 
76
- def selected_value
78
+ def selected_values
77
79
  @object.send(input_name) if @object
78
80
  end
79
81
 
@@ -1,5 +1,5 @@
1
1
  module ActiveAdmin
2
2
  module SearchableSelect
3
- VERSION = '1.0.2'.freeze
3
+ VERSION = '1.4.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
 
@@ -188,4 +188,54 @@ RSpec.describe 'filter input', type: :request do
188
188
  text: 'Travel')
189
189
  end
190
190
  end
191
+
192
+ describe 'with the multiple option set to true' do
193
+ before(:each) do
194
+ ActiveAdminHelpers.setup do
195
+ ActiveAdmin.register(Category) do
196
+ searchable_select_options(scope: Category, text_attribute: :name)
197
+ end
198
+
199
+ ActiveAdmin.register(Post) do
200
+ filter(:category,
201
+ as: :searchable_select,
202
+ ajax: true,
203
+ multiple: true)
204
+ end
205
+ end
206
+ end
207
+
208
+ it 'renders select input with searchable-select-input css class and the multiple attribute' do
209
+ get '/admin/posts'
210
+
211
+ expect(response.body).to have_selector("select.searchable-select-input[multiple='multiple']")
212
+ end
213
+
214
+ it 'does not render options statically' do
215
+ Category.create!(name: 'Travel')
216
+
217
+ get '/admin/posts'
218
+
219
+ expect(response.body).not_to have_selector('.searchable-select-input option',
220
+ text: 'Travel')
221
+ end
222
+
223
+ it 'sets data-ajax-url attribute' do
224
+ get '/admin/posts'
225
+
226
+ expect(response.body).to have_selector('.searchable-select-input[data-ajax-url]')
227
+ end
228
+
229
+ it 'renders the filter for multiple values selected' do
230
+ category1 = Category.create!(name: 'Travel')
231
+ category2 = Category.create!(name: 'Leisure')
232
+
233
+ get "/admin/posts?q[category_id_in][]=#{category1.id}&q[category_id_in][]=#{category2.id}"
234
+
235
+ expect(response.body).to have_selector('.searchable-select-input option[selected]',
236
+ text: 'Travel')
237
+ expect(response.body).to have_selector('.searchable-select-input option[selected]',
238
+ text: 'Leisure')
239
+ end
240
+ end
191
241
  end
@@ -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.0.2
4
+ version: 1.4.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: 2018-02-08 00:00:00.000000000 Z
11
+ date: 2021-02-04 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
@@ -72,14 +78,14 @@ dependencies:
72
78
  requirements:
73
79
  - - "~>"
74
80
  - !ruby/object:Gem::Version
75
- version: 0.7.0
81
+ version: '1.0'
76
82
  type: :development
77
83
  prerelease: false
78
84
  version_requirements: !ruby/object:Gem::Requirement
79
85
  requirements:
80
86
  - - "~>"
81
87
  - !ruby/object:Gem::Version
82
- version: 0.7.0
88
+ version: '1.0'
83
89
  - !ruby/object:Gem::Dependency
84
90
  name: database_cleaner
85
91
  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,33 +227,39 @@ 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
184
246
  requirements:
185
- - - "~>"
247
+ - - ">="
186
248
  - !ruby/object:Gem::Version
187
249
  version: 1.x
250
+ - - "<"
251
+ - !ruby/object:Gem::Version
252
+ version: '3'
188
253
  type: :runtime
189
254
  prerelease: false
190
255
  version_requirements: !ruby/object:Gem::Requirement
191
256
  requirements:
192
- - - "~>"
257
+ - - ">="
193
258
  - !ruby/object:Gem::Version
194
259
  version: 1.x
260
+ - - "<"
261
+ - !ruby/object:Gem::Version
262
+ version: '3'
195
263
  - !ruby/object:Gem::Dependency
196
264
  name: jquery-rails
197
265
  requirement: !ruby/object:Gem::Requirement
@@ -232,10 +300,10 @@ executables: []
232
300
  extensions: []
233
301
  extra_rdoc_files: []
234
302
  files:
303
+ - ".github/workflows/tests.yml"
235
304
  - ".gitignore"
236
305
  - ".rspec"
237
306
  - ".rubocop.yml"
238
- - ".travis.yml"
239
307
  - ".yardopts"
240
308
  - Appraisals
241
309
  - CHANGELOG.md
@@ -248,9 +316,10 @@ files:
248
316
  - app/assets/javascripts/active_admin/searchable_select/init.js
249
317
  - app/assets/stylesheets/active_admin/searchable_select.scss
250
318
  - bin/rspec
251
- - gemfiles/rails_4.2_active_admin_1.0.0.pre4.gemfile
252
- - gemfiles/rails_5.1_active_admin_1.0.gemfile
253
- - gemfiles/rails_5.1_active_admin_1.1.gemfile
319
+ - gemfiles/rails_5.1_active_admin_1.x.gemfile
320
+ - gemfiles/rails_5.x_active_admin_1.x.gemfile
321
+ - gemfiles/rails_5.x_active_admin_2.x.gemfile
322
+ - gemfiles/rails_6.x_active_admin_2.x.gemfile
254
323
  - lib/activeadmin-searchable_select.rb
255
324
  - lib/activeadmin/inputs/filters/searchable_select_input.rb
256
325
  - lib/activeadmin/inputs/searchable_select_input.rb
@@ -294,17 +363,19 @@ require_paths:
294
363
  - lib
295
364
  required_ruby_version: !ruby/object:Gem::Requirement
296
365
  requirements:
297
- - - "~>"
366
+ - - ">="
298
367
  - !ruby/object:Gem::Version
299
368
  version: '2.1'
369
+ - - "<"
370
+ - !ruby/object:Gem::Version
371
+ version: '4'
300
372
  required_rubygems_version: !ruby/object:Gem::Requirement
301
373
  requirements:
302
374
  - - ">="
303
375
  - !ruby/object:Gem::Version
304
376
  version: '0'
305
377
  requirements: []
306
- rubyforge_project:
307
- rubygems_version: 2.7.5
378
+ rubygems_version: 3.0.8
308
379
  signing_key:
309
380
  specification_version: 4
310
381
  summary: Use searchable selects based on Select2 in Active Admin forms and filters.
data/.travis.yml DELETED
@@ -1,16 +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.0.gemfile
14
- - gemfiles/rails_5.1_active_admin_1.1.gemfile
15
-
16
- script: bundle exec rspec