administrate_exportable 0.2.0 → 0.3.1

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
- SHA1:
3
- metadata.gz: eb5b47438382bfea309aebaac2d77992aea95897
4
- data.tar.gz: 1112ce2b25acfb1106a33dc486fcefb62181fcef
2
+ SHA256:
3
+ metadata.gz: 33e2014ed28365718d8ce43cced3e3ca72b00fbf67bc3b040ae31613f6092020
4
+ data.tar.gz: 871c01a9249f34872fcf3d6303be6e7f8c568b3a6991fcc6357abd0ac5ea5e09
5
5
  SHA512:
6
- metadata.gz: 6bd1fcbd02b24a51ac6bad43074560c62db58a2976075f03fd4cfcaaa3cf4d64cbe8b0ce511803d936fd88f79c8c2fa32269f0681aaa4e4236dff72080753a69
7
- data.tar.gz: adf05422bc6aad7387588f97d5f7122ba2eae2c64f6c2e1e2e09e892ab75f9cdd7efb9faedb0664be0753896d05c52429fed167b399dbd81834fc6e73af7d487
6
+ metadata.gz: 1c6c4f35005d9cc8fea9a29433f4ffca4a633152bc2c6763da7adaa149fcd1579be8477539763e5be2f50dde6fb5a7b13508b670b1b081635966804de29f0e83
7
+ data.tar.gz: 2588222728d3bc595f3aeb536a5c309aa6f3322e0d1108efad78021fed8d1808b7db5fee2166736adaa845001babb8934f860f1f69a7707efa8f8c3fd85f58ef
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 2.7.2
data/Gemfile.lock CHANGED
@@ -1,57 +1,57 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- administrate_exportable (0.2.0)
4
+ administrate_exportable (0.3.1)
5
5
  actionview (>= 5.2.2.1)
6
- administrate (>= 0.12.0)
6
+ administrate (>= 0.13.0)
7
7
  rails (>= 4.2)
8
8
  railties (>= 5.2.2.1)
9
9
 
10
10
  GEM
11
11
  remote: https://rubygems.org/
12
12
  specs:
13
- actioncable (5.2.3)
14
- actionpack (= 5.2.3)
13
+ actioncable (5.2.4.5)
14
+ actionpack (= 5.2.4.5)
15
15
  nio4r (~> 2.0)
16
16
  websocket-driver (>= 0.6.1)
17
- actionmailer (5.2.3)
18
- actionpack (= 5.2.3)
19
- actionview (= 5.2.3)
20
- activejob (= 5.2.3)
17
+ actionmailer (5.2.4.5)
18
+ actionpack (= 5.2.4.5)
19
+ actionview (= 5.2.4.5)
20
+ activejob (= 5.2.4.5)
21
21
  mail (~> 2.5, >= 2.5.4)
22
22
  rails-dom-testing (~> 2.0)
23
- actionpack (5.2.3)
24
- actionview (= 5.2.3)
25
- activesupport (= 5.2.3)
26
- rack (~> 2.0)
23
+ actionpack (5.2.4.5)
24
+ actionview (= 5.2.4.5)
25
+ activesupport (= 5.2.4.5)
26
+ rack (~> 2.0, >= 2.0.8)
27
27
  rack-test (>= 0.6.3)
28
28
  rails-dom-testing (~> 2.0)
29
29
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
30
- actionview (5.2.3)
31
- activesupport (= 5.2.3)
30
+ actionview (5.2.4.5)
31
+ activesupport (= 5.2.4.5)
32
32
  builder (~> 3.1)
33
33
  erubi (~> 1.4)
34
34
  rails-dom-testing (~> 2.0)
35
35
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
36
- activejob (5.2.3)
37
- activesupport (= 5.2.3)
36
+ activejob (5.2.4.5)
37
+ activesupport (= 5.2.4.5)
38
38
  globalid (>= 0.3.6)
39
- activemodel (5.2.3)
40
- activesupport (= 5.2.3)
41
- activerecord (5.2.3)
42
- activemodel (= 5.2.3)
43
- activesupport (= 5.2.3)
39
+ activemodel (5.2.4.5)
40
+ activesupport (= 5.2.4.5)
41
+ activerecord (5.2.4.5)
42
+ activemodel (= 5.2.4.5)
43
+ activesupport (= 5.2.4.5)
44
44
  arel (>= 9.0)
45
- activestorage (5.2.3)
46
- actionpack (= 5.2.3)
47
- activerecord (= 5.2.3)
45
+ activestorage (5.2.4.5)
46
+ actionpack (= 5.2.4.5)
47
+ activerecord (= 5.2.4.5)
48
48
  marcel (~> 0.3.1)
49
- activesupport (5.2.3)
49
+ activesupport (5.2.4.5)
50
50
  concurrent-ruby (~> 1.0, >= 1.0.2)
51
51
  i18n (>= 0.7, < 2)
52
52
  minitest (~> 5.1)
53
53
  tzinfo (~> 1.1)
54
- administrate (0.12.0)
54
+ administrate (0.13.0)
55
55
  actionpack (>= 4.2)
56
56
  actionview (>= 4.2)
57
57
  activerecord (>= 4.2)
@@ -67,42 +67,42 @@ GEM
67
67
  enumerate_it
68
68
  rails (>= 4.2, < 6.0)
69
69
  arel (9.0.0)
70
- autoprefixer-rails (9.6.4)
70
+ autoprefixer-rails (10.2.4.0)
71
71
  execjs
72
- builder (3.2.3)
72
+ builder (3.2.4)
73
73
  byebug (11.0.1)
74
74
  coderay (1.1.2)
75
- concurrent-ruby (1.1.5)
76
- crass (1.0.4)
75
+ concurrent-ruby (1.1.8)
76
+ crass (1.0.6)
77
77
  datetime_picker_rails (0.0.7)
78
78
  momentjs-rails (>= 2.8.1)
79
79
  diff-lcs (1.3)
80
80
  enumerate_it (2.0.0)
81
81
  activesupport (>= 4.0.0)
82
- erubi (1.9.0)
82
+ erubi (1.10.0)
83
83
  execjs (2.7.0)
84
- ffi (1.11.1)
84
+ ffi (1.15.0)
85
85
  globalid (0.4.2)
86
86
  activesupport (>= 4.2.0)
87
- i18n (1.7.0)
87
+ i18n (1.8.9)
88
88
  concurrent-ruby (~> 1.0)
89
- jquery-rails (4.3.5)
89
+ jquery-rails (4.4.0)
90
90
  rails-dom-testing (>= 1, < 3)
91
91
  railties (>= 4.2.0)
92
92
  thor (>= 0.14, < 2.0)
93
- kaminari (1.1.1)
93
+ kaminari (1.2.1)
94
94
  activesupport (>= 4.1.0)
95
- kaminari-actionview (= 1.1.1)
96
- kaminari-activerecord (= 1.1.1)
97
- kaminari-core (= 1.1.1)
98
- kaminari-actionview (1.1.1)
95
+ kaminari-actionview (= 1.2.1)
96
+ kaminari-activerecord (= 1.2.1)
97
+ kaminari-core (= 1.2.1)
98
+ kaminari-actionview (1.2.1)
99
99
  actionview
100
- kaminari-core (= 1.1.1)
101
- kaminari-activerecord (1.1.1)
100
+ kaminari-core (= 1.2.1)
101
+ kaminari-activerecord (1.2.1)
102
102
  activerecord
103
- kaminari-core (= 1.1.1)
104
- kaminari-core (1.1.1)
105
- loofah (2.3.0)
103
+ kaminari-core (= 1.2.1)
104
+ kaminari-core (1.2.1)
105
+ loofah (2.9.0)
106
106
  crass (~> 1.0.2)
107
107
  nokogiri (>= 1.5.9)
108
108
  mail (2.7.1)
@@ -110,49 +110,51 @@ GEM
110
110
  marcel (0.3.3)
111
111
  mimemagic (~> 0.3.2)
112
112
  method_source (0.9.2)
113
- mimemagic (0.3.3)
113
+ mimemagic (0.3.5)
114
114
  mini_mime (1.0.2)
115
- mini_portile2 (2.4.0)
116
- minitest (5.12.2)
115
+ mini_portile2 (2.5.0)
116
+ minitest (5.14.4)
117
117
  momentjs-rails (2.20.1)
118
118
  railties (>= 3.1)
119
- nio4r (2.4.0)
120
- nokogiri (1.10.4)
121
- mini_portile2 (~> 2.4.0)
119
+ nio4r (2.5.7)
120
+ nokogiri (1.11.1)
121
+ mini_portile2 (~> 2.5.0)
122
+ racc (~> 1.4)
122
123
  pry (0.12.2)
123
124
  coderay (~> 1.1.0)
124
125
  method_source (~> 0.9.0)
125
126
  pry-byebug (3.7.0)
126
127
  byebug (~> 11.0)
127
128
  pry (~> 0.10)
128
- rack (2.0.7)
129
+ racc (1.5.2)
130
+ rack (2.2.3)
129
131
  rack-test (1.1.0)
130
132
  rack (>= 1.0, < 3)
131
- rails (5.2.3)
132
- actioncable (= 5.2.3)
133
- actionmailer (= 5.2.3)
134
- actionpack (= 5.2.3)
135
- actionview (= 5.2.3)
136
- activejob (= 5.2.3)
137
- activemodel (= 5.2.3)
138
- activerecord (= 5.2.3)
139
- activestorage (= 5.2.3)
140
- activesupport (= 5.2.3)
133
+ rails (5.2.4.5)
134
+ actioncable (= 5.2.4.5)
135
+ actionmailer (= 5.2.4.5)
136
+ actionpack (= 5.2.4.5)
137
+ actionview (= 5.2.4.5)
138
+ activejob (= 5.2.4.5)
139
+ activemodel (= 5.2.4.5)
140
+ activerecord (= 5.2.4.5)
141
+ activestorage (= 5.2.4.5)
142
+ activesupport (= 5.2.4.5)
141
143
  bundler (>= 1.3.0)
142
- railties (= 5.2.3)
144
+ railties (= 5.2.4.5)
143
145
  sprockets-rails (>= 2.0.0)
144
146
  rails-dom-testing (2.0.3)
145
147
  activesupport (>= 4.2.0)
146
148
  nokogiri (>= 1.6)
147
149
  rails-html-sanitizer (1.3.0)
148
150
  loofah (~> 2.3)
149
- railties (5.2.3)
150
- actionpack (= 5.2.3)
151
- activesupport (= 5.2.3)
151
+ railties (5.2.4.5)
152
+ actionpack (= 5.2.4.5)
153
+ activesupport (= 5.2.4.5)
152
154
  method_source
153
155
  rake (>= 0.8.7)
154
156
  thor (>= 0.19.0, < 2.0)
155
- rake (13.0.0)
157
+ rake (13.0.3)
156
158
  rb-readline (0.5.5)
157
159
  rspec-core (3.8.2)
158
160
  rspec-support (~> 3.8.0)
@@ -171,7 +173,7 @@ GEM
171
173
  rspec-mocks (~> 3.8.0)
172
174
  rspec-support (~> 3.8.0)
173
175
  rspec-support (3.8.2)
174
- sassc (2.2.1)
176
+ sassc (2.4.0)
175
177
  ffi (~> 1.9)
176
178
  sassc-rails (2.1.2)
177
179
  railties (>= 4.0.0)
@@ -180,28 +182,28 @@ GEM
180
182
  sprockets-rails
181
183
  tilt
182
184
  selectize-rails (0.12.6)
183
- sprockets (3.7.2)
185
+ sprockets (4.0.2)
184
186
  concurrent-ruby (~> 1.0)
185
187
  rack (> 1, < 3)
186
- sprockets-rails (3.2.1)
188
+ sprockets-rails (3.2.2)
187
189
  actionpack (>= 4.0)
188
190
  activesupport (>= 4.0)
189
191
  sprockets (>= 3.0.0)
190
192
  sqlite3 (1.4.1)
191
- thor (0.20.3)
193
+ thor (1.1.0)
192
194
  thread_safe (0.3.6)
193
195
  tilt (2.0.10)
194
- tzinfo (1.2.5)
196
+ tzinfo (1.2.9)
195
197
  thread_safe (~> 0.1)
196
- websocket-driver (0.7.1)
198
+ websocket-driver (0.7.3)
197
199
  websocket-extensions (>= 0.1.0)
198
- websocket-extensions (0.1.4)
200
+ websocket-extensions (0.1.5)
199
201
 
200
202
  PLATFORMS
201
203
  ruby
202
204
 
203
205
  DEPENDENCIES
204
- administrate (~> 0.12.0)
206
+ administrate (~> 0.13.0)
205
207
  administrate-field-enumerate
206
208
  administrate_exportable!
207
209
  byebug
@@ -212,7 +214,7 @@ DEPENDENCIES
212
214
  sqlite3
213
215
 
214
216
  RUBY VERSION
215
- ruby 2.4.2p198
217
+ ruby 2.7.2p137
216
218
 
217
219
  BUNDLED WITH
218
- 2.0.2
220
+ 2.1.4
data/README.md CHANGED
@@ -20,7 +20,7 @@ For each resource you want to be exportable, add the following line to the their
20
20
  ```ruby
21
21
  include AdministrateExportable::Exporter
22
22
  ```
23
- and the following line in the `db/routes.rb` file, correctly nested on resources
23
+ and the following line in the `config/routes.rb` file, correctly nested on resources
24
24
  ```ruby
25
25
  get :export, on: :collection
26
26
  ```
@@ -56,7 +56,7 @@ ATTRIBUTE_TYPES = {
56
56
 
57
57
  By default the gem adds the Export button to the view `views/admin/application/index.html.erb`. But if you have your own Administrate `index` views, you can add the link manually:
58
58
  ```ruby
59
- link_to('Export', [:export, namespace, page.resource_name.to_s.pluralize, sanitized_order_params(page).to_h.merge(format: :csv)], class: 'button') if valid_action?(:export) %>
59
+ link_to('Export', [:export, namespace, page.resource_name.to_s.pluralize, sanitized_order_params(page, :id).to_h.merge(format: :csv)], class: 'button') if valid_action?(:export)
60
60
  ```
61
61
 
62
62
  Example:
@@ -72,7 +72,12 @@ Example:
72
72
  [:new, namespace, page.resource_path],
73
73
  class: "button",
74
74
  ) if valid_action?(:new) && show_action?(:new, new_resource) %>
75
- <%= link_to('Export', [:export, namespace, page.resource_name.to_s.pluralize, sanitized_order_params(page).to_h.merge(format: :csv)], class: 'button') if valid_action?(:export) %>
75
+
76
+ <%= link_to(
77
+ 'Export',
78
+ [:export, namespace, page.resource_name.to_s.pluralize, sanitized_order_params(page, :id).to_h.merge(format: :csv)],
79
+ class: 'button'
80
+ ) if valid_action?(:export) %>
76
81
  </div>
77
82
  ....
78
83
  ```
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.add_development_dependency "rake", "~> 10.0"
34
34
  spec.add_development_dependency "rspec", "~> 3.0"
35
35
  spec.add_development_dependency "pry-byebug", "~> 3.0"
36
- spec.add_dependency 'administrate','>= 0.12.0'
36
+ spec.add_dependency 'administrate','>= 0.13.0'
37
37
  spec.add_dependency 'rails', '>= 4.2'
38
38
  spec.add_dependency 'actionview', '>= 5.2.2.1'
39
39
  spec.add_dependency 'railties', '>= 5.2.2.1'
@@ -45,7 +45,11 @@ It renders the `_table` partial to display details about the resources.
45
45
  [:new, namespace, page.resource_path],
46
46
  class: "button",
47
47
  ) if valid_action?(:new) && show_action?(:new, new_resource) %>
48
- <%= link_to('Export', [:export, namespace, page.resource_name.to_s.pluralize, sanitized_order_params(page, :id).to_h.merge(format: :csv)], class: 'button') if valid_action?(:export) %>
48
+ <%= link_to(
49
+ 'Export',
50
+ [:export, namespace, page.resource_name.to_s.pluralize, sanitized_order_params(page, :id).to_h.merge(format: :csv)],
51
+ class: 'button'
52
+ ) if valid_action?(:export) && show_action?(:export, resource_name) %>
49
53
  </div>
50
54
  </header>
51
55
 
@@ -44,6 +44,8 @@ module AdministrateExportable
44
44
  field.data.count if field.data
45
45
  when Administrate::Field::DateTime.to_s
46
46
  field.datetime if field.data
47
+ when Administrate::Field::Date.to_s
48
+ field.date if field.data
47
49
  when Administrate::Field::Email.to_s, Administrate::Field::Select.to_s
48
50
  field.data
49
51
  when Administrate::Field::Password.to_s, Administrate::Field::String.to_s, Administrate::Field::Text.to_s
@@ -1,3 +1,3 @@
1
1
  module AdministrateExportable
2
- VERSION = "0.2.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: administrate_exportable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jônatas Rancan
8
8
  - Andrei Bondarev
9
- autorequire:
9
+ autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-11-18 00:00:00.000000000 Z
12
+ date: 2021-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -73,14 +73,14 @@ dependencies:
73
73
  requirements:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
- version: 0.12.0
76
+ version: 0.13.0
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
81
  - - ">="
82
82
  - !ruby/object:Gem::Version
83
- version: 0.12.0
83
+ version: 0.13.0
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: rails
86
86
  requirement: !ruby/object:Gem::Requirement
@@ -132,6 +132,7 @@ extra_rdoc_files: []
132
132
  files:
133
133
  - ".gitignore"
134
134
  - ".rspec"
135
+ - ".tool-versions"
135
136
  - ".travis.yml"
136
137
  - Gemfile
137
138
  - Gemfile.lock
@@ -150,7 +151,7 @@ homepage: https://github.com/SourceLabsLLC/administrate_exportable
150
151
  licenses:
151
152
  - MIT
152
153
  metadata: {}
153
- post_install_message:
154
+ post_install_message:
154
155
  rdoc_options: []
155
156
  require_paths:
156
157
  - lib
@@ -165,9 +166,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
165
166
  - !ruby/object:Gem::Version
166
167
  version: '0'
167
168
  requirements: []
168
- rubyforge_project:
169
- rubygems_version: 2.6.14.3
170
- signing_key:
169
+ rubygems_version: 3.1.4
170
+ signing_key:
171
171
  specification_version: 4
172
172
  summary: Simple plugin to add CSV export feature to Administrate
173
173
  test_files: []