activeadmin_sortable_table 1.2.0 → 1.3.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
  SHA1:
3
- metadata.gz: bad6787846d549ac47bef5f8c6b56431f5bef5dd
4
- data.tar.gz: c8c9be5b01fd966f8807f2c5645157100050f698
3
+ metadata.gz: c2bd5bd104786dfa4fced4ec016c5217d0d56a43
4
+ data.tar.gz: 5118bbb2416edb0a4abe6fff9cc8dbf425b9ce3b
5
5
  SHA512:
6
- metadata.gz: ca386a268b779c503a074f5c3e1eee2da272b342c4716628ae7b957c1a5ed8f742434b14454ed87d986c0465f7c929e2c7abea1e364accb1fbb3f97eea4e1185
7
- data.tar.gz: b5ae41b61014415bdb5fb47619901a6429b19a4b19a805f4c86c35982950e5eab3f0904b72a6ac7865ad693deb6f7469e63d8545c2b1d6c251572326b3ff88fc
6
+ metadata.gz: 33e203c5d4994ff406c19dfbf97eadd0554c4277eefd0503cee167ebf545611dbd7c9d9f1a50bd73f87ccaf1dc801b7d2f7f318915a5316a3b81ceb59a9e2893
7
+ data.tar.gz: 2f1d841f544a349e8e13db18a6415fc56735647aa2ea516f237b9a6e23a62a6f254e530f17f9235a49e4d4892079bee31210cff12cc6ae8add5c448a4878fcfe
data/.gitignore CHANGED
@@ -19,3 +19,4 @@ spec/reports
19
19
  test/tmp
20
20
  test/version_tmp
21
21
  tmp
22
+ Gemfile.lock
@@ -2,9 +2,14 @@ sudo: false
2
2
  language: ruby
3
3
 
4
4
  rvm:
5
- - 2.1.5
6
- - 2.2.2
7
- - ruby-head
5
+ - 2.3.7
6
+ - 2.4.4
7
+ - 2.5.1
8
+
9
+ env:
10
+ matrix:
11
+ - RAILS_VERSION=4.2.10
12
+ - RAILS_VERSION=5.2.1
8
13
 
9
14
  matrix:
10
15
  allow_failures:
@@ -1,3 +1,8 @@
1
+ 1.3.0
2
+
3
+ * Test against latest supported ruby versions: 2.3.7, 2.4.4, 2.5.1 and rails versions: 4.2.10, 5.2.1.
4
+ * Add Rails 5 support
5
+
1
6
  1.2.0
2
7
 
3
8
  * **Feature**. Now it is possible to specify an acts_as_list column other than position @faucct
data/Gemfile CHANGED
@@ -2,7 +2,10 @@ source 'https://rubygems.org'
2
2
 
3
3
  gemspec
4
4
 
5
- gem 'activeadmin', github: 'activeadmin/activeadmin'
5
+ gem 'activeadmin'
6
+ gem 'coffee-script'
7
+ gem 'puma'
8
+ gem 'rails', *ENV['RAILS_VERSION']
6
9
  gem 'sqlite3'
7
10
  gem 'acts_as_list'
8
- gem 'rubocop'
11
+ gem 'rubocop', '0.34.2'
@@ -25,7 +25,7 @@ module ActiveAdmin
25
25
  # @param [ActiveAdmin::DSL] dsl
26
26
  # @return [void]
27
27
  #
28
- def included(dsl)
28
+ def included(dsl) # rubocop:disable Metrics/AbcSize
29
29
  dsl.instance_eval do
30
30
  member_action :sort, method: :post do
31
31
  resource.insert_at params[:position].to_i
@@ -34,7 +34,7 @@ module ActiveAdmin
34
34
 
35
35
  member_action :move_to_top, method: :post do
36
36
  resource.move_to_top
37
- redirect_to :back
37
+ redirect_to request.headers['HTTP_REFERER'] || collection_path
38
38
  end
39
39
  end
40
40
  end
@@ -1,6 +1,6 @@
1
1
  module ActiveAdmin
2
2
  #
3
3
  module SortableTable
4
- VERSION = '1.2.0'
4
+ VERSION = '1.3.0'
5
5
  end
6
6
  end
@@ -0,0 +1,3 @@
1
+ //= require active_admin/base
2
+ //= require jquery.simulate.drag-sortable
3
+ //= require activeadmin_sortable_table
@@ -10,7 +10,7 @@
10
10
  // Active Admin's got SASS!
11
11
  @import "active_admin/mixins";
12
12
  @import "active_admin/base";
13
- @import "activeadmin_sortable_table";
13
+ @import "activeadmin_sortable_table.css";
14
14
  // Overriding any non-variable SASS must be done after the fact.
15
15
  // For example, to change the default status-tag color:
16
16
  //
@@ -21,7 +21,9 @@ module Dummy
21
21
  # config.i18n.default_locale = :de
22
22
 
23
23
  # Do not swallow errors in after_commit/after_rollback callbacks.
24
- config.active_record.raise_in_transactional_callbacks = true
24
+ if Rails.gem_version < Gem::Version.new('5')
25
+ config.active_record.raise_in_transactional_callbacks = true
26
+ end
25
27
  end
26
28
  end
27
29
 
@@ -55,7 +55,7 @@ RSpec.describe ActiveAdmin::SortableTable, 'Drag-and-Drop', type: :feature, js:
55
55
  end
56
56
  end
57
57
 
58
- it 'can not drug not by handle' do
58
+ it 'can not drag not by handle' do
59
59
  move_up(3, by: 2, use_handle: false)
60
60
 
61
61
  expect(visible_ids).to eq([1, 2, 3])
@@ -116,7 +116,7 @@ RSpec.describe ActiveAdmin::SortableTable, 'Drag-and-Drop', type: :feature, js:
116
116
  end
117
117
  end
118
118
 
119
- it 'can not drug not by handle' do
119
+ it 'can not drag not by handle' do
120
120
  move_down(6, by: 2, use_handle: false)
121
121
 
122
122
  expect(visible_ids).to eq([4, 5, 6])
@@ -153,6 +153,6 @@ RSpec.describe ActiveAdmin::SortableTable, 'Drag-and-Drop', type: :feature, js:
153
153
  $("#category_#{element_id}").simulateDragSortable({ move: #{by} })
154
154
  JS
155
155
  end
156
- sleep 0.5
156
+ sleep 0.7
157
157
  end
158
158
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: activeadmin_sortable_table
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Adam McCrea
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-02-16 00:00:00.000000000 Z
13
+ date: 2018-08-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activeadmin
@@ -153,7 +153,6 @@ files:
153
153
  - ".travis.yml"
154
154
  - CHANGELOG.md
155
155
  - Gemfile
156
- - Gemfile.lock
157
156
  - LICENSE.txt
158
157
  - README.md
159
158
  - Rakefile
@@ -170,7 +169,7 @@ files:
170
169
  - spec/dummy/app/admin/categories.rb
171
170
  - spec/dummy/app/admin/dashboard.rb
172
171
  - spec/dummy/app/assets/images/.keep
173
- - spec/dummy/app/assets/javascripts/active_admin.js.coffee
172
+ - spec/dummy/app/assets/javascripts/active_admin.js
174
173
  - spec/dummy/app/assets/javascripts/application.js
175
174
  - spec/dummy/app/assets/javascripts/jquery.simulate.drag-sortable.js
176
175
  - spec/dummy/app/assets/stylesheets/active_admin.scss
@@ -242,7 +241,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
242
241
  version: '0'
243
242
  requirements: []
244
243
  rubyforge_project:
245
- rubygems_version: 2.5.1
244
+ rubygems_version: 2.6.14.1
246
245
  signing_key:
247
246
  specification_version: 4
248
247
  summary: Drag and drop reordering interface for ActiveAdmin tables
@@ -252,7 +251,7 @@ test_files:
252
251
  - spec/dummy/app/admin/categories.rb
253
252
  - spec/dummy/app/admin/dashboard.rb
254
253
  - spec/dummy/app/assets/images/.keep
255
- - spec/dummy/app/assets/javascripts/active_admin.js.coffee
254
+ - spec/dummy/app/assets/javascripts/active_admin.js
256
255
  - spec/dummy/app/assets/javascripts/application.js
257
256
  - spec/dummy/app/assets/javascripts/jquery.simulate.drag-sortable.js
258
257
  - spec/dummy/app/assets/stylesheets/active_admin.scss
@@ -1,247 +0,0 @@
1
- GIT
2
- remote: git://github.com/activeadmin/activeadmin.git
3
- revision: a5a53c3f2b8fdfd2605575b62b158318f7651f46
4
- specs:
5
- activeadmin (1.0.0.pre1)
6
- arbre (~> 1.0, >= 1.0.2)
7
- bourbon
8
- coffee-rails
9
- formtastic (~> 3.1)
10
- formtastic_i18n
11
- inherited_resources (~> 1.6)
12
- jquery-rails
13
- jquery-ui-rails (~> 5.0)
14
- kaminari (~> 0.15)
15
- rails (>= 3.2, < 5.0)
16
- ransack (~> 1.3)
17
- sass-rails
18
-
19
- PATH
20
- remote: .
21
- specs:
22
- activeadmin_sortable_table (1.2.0)
23
- activeadmin (>= 1.0.0.pre1)
24
- uber (= 0.0.15)
25
-
26
- GEM
27
- remote: https://rubygems.org/
28
- specs:
29
- actionmailer (4.2.4)
30
- actionpack (= 4.2.4)
31
- actionview (= 4.2.4)
32
- activejob (= 4.2.4)
33
- mail (~> 2.5, >= 2.5.4)
34
- rails-dom-testing (~> 1.0, >= 1.0.5)
35
- actionpack (4.2.4)
36
- actionview (= 4.2.4)
37
- activesupport (= 4.2.4)
38
- rack (~> 1.6)
39
- rack-test (~> 0.6.2)
40
- rails-dom-testing (~> 1.0, >= 1.0.5)
41
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
42
- actionview (4.2.4)
43
- activesupport (= 4.2.4)
44
- builder (~> 3.1)
45
- erubis (~> 2.7.0)
46
- rails-dom-testing (~> 1.0, >= 1.0.5)
47
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
48
- activejob (4.2.4)
49
- activesupport (= 4.2.4)
50
- globalid (>= 0.3.0)
51
- activemodel (4.2.4)
52
- activesupport (= 4.2.4)
53
- builder (~> 3.1)
54
- activerecord (4.2.4)
55
- activemodel (= 4.2.4)
56
- activesupport (= 4.2.4)
57
- arel (~> 6.0)
58
- activesupport (4.2.4)
59
- i18n (~> 0.7)
60
- json (~> 1.7, >= 1.7.7)
61
- minitest (~> 5.1)
62
- thread_safe (~> 0.3, >= 0.3.4)
63
- tzinfo (~> 1.1)
64
- acts_as_list (0.7.2)
65
- activerecord (>= 3.0)
66
- addressable (2.3.8)
67
- arbre (1.0.3)
68
- activesupport (>= 3.0.0)
69
- arel (6.0.3)
70
- ast (2.1.0)
71
- astrolabe (1.3.1)
72
- parser (~> 2.2)
73
- bourbon (4.2.4)
74
- sass (~> 3.4)
75
- thor (~> 0.19)
76
- builder (3.2.2)
77
- capybara (2.5.0)
78
- mime-types (>= 1.16)
79
- nokogiri (>= 1.3.3)
80
- rack (>= 1.0.0)
81
- rack-test (>= 0.5.4)
82
- xpath (~> 2.0)
83
- cliver (0.3.2)
84
- coffee-rails (4.1.0)
85
- coffee-script (>= 2.2.0)
86
- railties (>= 4.0.0, < 5.0)
87
- coffee-script (2.4.1)
88
- coffee-script-source
89
- execjs
90
- coffee-script-source (1.9.1.1)
91
- database_cleaner (1.5.0)
92
- diff-lcs (1.2.5)
93
- erubis (2.7.0)
94
- execjs (2.6.0)
95
- formtastic (3.1.3)
96
- actionpack (>= 3.2.13)
97
- formtastic_i18n (0.4.1)
98
- globalid (0.3.6)
99
- activesupport (>= 4.1.0)
100
- has_scope (0.6.0)
101
- actionpack (>= 3.2, < 5)
102
- activesupport (>= 3.2, < 5)
103
- i18n (0.7.0)
104
- inherited_resources (1.6.0)
105
- actionpack (>= 3.2, < 5)
106
- has_scope (~> 0.6.0.rc)
107
- railties (>= 3.2, < 5)
108
- responders
109
- jquery-rails (4.0.5)
110
- rails-dom-testing (~> 1.0)
111
- railties (>= 4.2.0)
112
- thor (>= 0.14, < 2.0)
113
- jquery-ui-rails (5.0.5)
114
- railties (>= 3.2.16)
115
- json (1.8.3)
116
- kaminari (0.16.3)
117
- actionpack (>= 3.0.0)
118
- activesupport (>= 3.0.0)
119
- launchy (2.4.3)
120
- addressable (~> 2.3)
121
- loofah (2.0.3)
122
- nokogiri (>= 1.5.9)
123
- mail (2.6.3)
124
- mime-types (>= 1.16, < 3)
125
- mime-types (2.6.1)
126
- mini_portile (0.6.2)
127
- minitest (5.8.0)
128
- multi_json (1.11.2)
129
- nokogiri (1.6.6.2)
130
- mini_portile (~> 0.6.0)
131
- parser (2.2.2.6)
132
- ast (>= 1.1, < 3.0)
133
- phantomjs (2.1.1.0)
134
- poltergeist (1.6.0)
135
- capybara (~> 2.1)
136
- cliver (~> 0.3.1)
137
- multi_json (~> 1.0)
138
- websocket-driver (>= 0.2.0)
139
- polyamorous (1.2.0)
140
- activerecord (>= 3.0)
141
- powerpack (0.1.1)
142
- rack (1.6.4)
143
- rack-test (0.6.3)
144
- rack (>= 1.0)
145
- rails (4.2.4)
146
- actionmailer (= 4.2.4)
147
- actionpack (= 4.2.4)
148
- actionview (= 4.2.4)
149
- activejob (= 4.2.4)
150
- activemodel (= 4.2.4)
151
- activerecord (= 4.2.4)
152
- activesupport (= 4.2.4)
153
- bundler (>= 1.3.0, < 2.0)
154
- railties (= 4.2.4)
155
- sprockets-rails
156
- rails-deprecated_sanitizer (1.0.3)
157
- activesupport (>= 4.2.0.alpha)
158
- rails-dom-testing (1.0.7)
159
- activesupport (>= 4.2.0.beta, < 5.0)
160
- nokogiri (~> 1.6.0)
161
- rails-deprecated_sanitizer (>= 1.0.1)
162
- rails-html-sanitizer (1.0.2)
163
- loofah (~> 2.0)
164
- railties (4.2.4)
165
- actionpack (= 4.2.4)
166
- activesupport (= 4.2.4)
167
- rake (>= 0.8.7)
168
- thor (>= 0.18.1, < 2.0)
169
- rainbow (2.0.0)
170
- rake (10.4.2)
171
- ransack (1.7.0)
172
- actionpack (>= 3.0)
173
- activerecord (>= 3.0)
174
- activesupport (>= 3.0)
175
- i18n
176
- polyamorous (~> 1.2)
177
- responders (2.1.0)
178
- railties (>= 4.2.0, < 5)
179
- rspec-core (3.3.2)
180
- rspec-support (~> 3.3.0)
181
- rspec-expectations (3.3.1)
182
- diff-lcs (>= 1.2.0, < 2.0)
183
- rspec-support (~> 3.3.0)
184
- rspec-mocks (3.3.2)
185
- diff-lcs (>= 1.2.0, < 2.0)
186
- rspec-support (~> 3.3.0)
187
- rspec-rails (3.3.3)
188
- actionpack (>= 3.0, < 4.3)
189
- activesupport (>= 3.0, < 4.3)
190
- railties (>= 3.0, < 4.3)
191
- rspec-core (~> 3.3.0)
192
- rspec-expectations (~> 3.3.0)
193
- rspec-mocks (~> 3.3.0)
194
- rspec-support (~> 3.3.0)
195
- rspec-support (3.3.0)
196
- rubocop (0.34.2)
197
- astrolabe (~> 1.3)
198
- parser (>= 2.2.2.5, < 3.0)
199
- powerpack (~> 0.1)
200
- rainbow (>= 1.99.1, < 3.0)
201
- ruby-progressbar (~> 1.4)
202
- ruby-progressbar (1.7.5)
203
- sass (3.4.18)
204
- sass-rails (5.0.4)
205
- railties (>= 4.0.0, < 5.0)
206
- sass (~> 3.1)
207
- sprockets (>= 2.8, < 4.0)
208
- sprockets-rails (>= 2.0, < 4.0)
209
- tilt (>= 1.1, < 3)
210
- sprockets (3.3.4)
211
- rack (~> 1.0)
212
- sprockets-rails (2.3.3)
213
- actionpack (>= 3.0)
214
- activesupport (>= 3.0)
215
- sprockets (>= 2.8, < 4.0)
216
- sqlite3 (1.3.10)
217
- thor (0.19.1)
218
- thread_safe (0.3.5)
219
- tilt (2.0.1)
220
- tzinfo (1.2.2)
221
- thread_safe (~> 0.1)
222
- uber (0.0.15)
223
- websocket-driver (0.6.2)
224
- websocket-extensions (>= 0.1.0)
225
- websocket-extensions (0.1.2)
226
- xpath (2.0.0)
227
- nokogiri (~> 1.3)
228
-
229
- PLATFORMS
230
- ruby
231
-
232
- DEPENDENCIES
233
- activeadmin!
234
- activeadmin_sortable_table!
235
- acts_as_list
236
- capybara
237
- database_cleaner
238
- launchy
239
- phantomjs
240
- poltergeist
241
- rails (~> 4.2)
242
- rspec-rails (~> 3.3)
243
- rubocop
244
- sqlite3
245
-
246
- BUNDLED WITH
247
- 1.14.3
@@ -1,3 +0,0 @@
1
- #= require active_admin/base
2
- #= require jquery.simulate.drag-sortable
3
- #= require activeadmin_sortable_table