administrate-field-csv 0.1.0 → 1.0.0
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 +4 -4
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +175 -140
- data/README.md +7 -1
- data/administrate-field-csv.gemspec +6 -5
- data/app/assets/stylesheets/administrate-field-csv/application.css +35 -5
- data/lib/administrate/field/csv.rb +11 -6
- metadata +27 -19
- data/app/views/fields/csv/_field.html.erb +0 -9
- data/bitbucket-pipelines.yml +0 -28
- data/vendor/assets/stylesheets/csv_field.scss +0 -29
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f4bb02ece438b2414b038345d222925a49cf748fd939a0289f80e06030ae8568
|
|
4
|
+
data.tar.gz: 96c2f4181f1b4e9f7da74e44eeaca748bacad62f2c639cb45019199512aea58e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: d0d23b2974db418ee5c2c1e70383bff7d5c2b0ea24c3fdefafcc7e5c2a34e99783b27a83b31a5dbe7aeaa1647f2a1c18d0ea266ed45a49a868a118d8ef269cc2
|
|
7
|
+
data.tar.gz: 26535574e01876380748d3dc8c879b13300dc944daed0b88bf9bd89dacba0a480043b70815177cbb84175280c54282d5dc096d0e43c9c35609267e88a644e565
|
data/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
## [Unreleased]
|
|
2
2
|
|
|
3
|
+
## [1.0.0]
|
|
4
|
+
|
|
5
|
+
- Require Administrate 1.0 (`administrate >= 1.0`) and support Rails 8
|
|
6
|
+
- Declare `csv` as a runtime dependency (extracted from Ruby's default gems in Ruby 3.4)
|
|
7
|
+
- Ship the field's stylesheet as plain CSS so it loads under both Sprockets and Propshaft (Propshaft serves assets verbatim and runs no SCSS compiler or Sprockets directives); the Sprockets precompile registration is now guarded so it is a no-op elsewhere
|
|
8
|
+
- Remove the redundant `to_partial_path` override; Administrate 1.0 resolves partials through `partial_prefixes`
|
|
9
|
+
- Remove the unused `_field` partial and the dead engine root assignment
|
|
10
|
+
- Move the project from Bitbucket to https://github.com/jameswilliamiii/administrate-field-csv and migrate CI to GitHub Actions
|
|
11
|
+
|
|
3
12
|
## [0.1.0] - 2023-02-08
|
|
4
13
|
|
|
5
14
|
- Initial release
|
data/Gemfile.lock
CHANGED
|
@@ -1,100 +1,115 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
administrate-field-csv (
|
|
5
|
-
administrate (
|
|
6
|
-
|
|
4
|
+
administrate-field-csv (1.0.0)
|
|
5
|
+
administrate (>= 1.0)
|
|
6
|
+
csv (~> 3.0)
|
|
7
|
+
rails (>= 6.0)
|
|
7
8
|
|
|
8
9
|
GEM
|
|
9
10
|
remote: https://rubygems.org/
|
|
10
11
|
specs:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
action_text-trix (2.1.19)
|
|
13
|
+
railties
|
|
14
|
+
actioncable (8.1.3)
|
|
15
|
+
actionpack (= 8.1.3)
|
|
16
|
+
activesupport (= 8.1.3)
|
|
14
17
|
nio4r (~> 2.0)
|
|
15
18
|
websocket-driver (>= 0.6.1)
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
actionview (= 7.0.4.2)
|
|
38
|
-
activesupport (= 7.0.4.2)
|
|
39
|
-
rack (~> 2.0, >= 2.2.0)
|
|
19
|
+
zeitwerk (~> 2.6)
|
|
20
|
+
actionmailbox (8.1.3)
|
|
21
|
+
actionpack (= 8.1.3)
|
|
22
|
+
activejob (= 8.1.3)
|
|
23
|
+
activerecord (= 8.1.3)
|
|
24
|
+
activestorage (= 8.1.3)
|
|
25
|
+
activesupport (= 8.1.3)
|
|
26
|
+
mail (>= 2.8.0)
|
|
27
|
+
actionmailer (8.1.3)
|
|
28
|
+
actionpack (= 8.1.3)
|
|
29
|
+
actionview (= 8.1.3)
|
|
30
|
+
activejob (= 8.1.3)
|
|
31
|
+
activesupport (= 8.1.3)
|
|
32
|
+
mail (>= 2.8.0)
|
|
33
|
+
rails-dom-testing (~> 2.2)
|
|
34
|
+
actionpack (8.1.3)
|
|
35
|
+
actionview (= 8.1.3)
|
|
36
|
+
activesupport (= 8.1.3)
|
|
37
|
+
nokogiri (>= 1.8.5)
|
|
38
|
+
rack (>= 2.2.4)
|
|
39
|
+
rack-session (>= 1.0.1)
|
|
40
40
|
rack-test (>= 0.6.3)
|
|
41
|
-
rails-dom-testing (~> 2.
|
|
42
|
-
rails-html-sanitizer (~> 1.
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
41
|
+
rails-dom-testing (~> 2.2)
|
|
42
|
+
rails-html-sanitizer (~> 1.6)
|
|
43
|
+
useragent (~> 0.16)
|
|
44
|
+
actiontext (8.1.3)
|
|
45
|
+
action_text-trix (~> 2.1.15)
|
|
46
|
+
actionpack (= 8.1.3)
|
|
47
|
+
activerecord (= 8.1.3)
|
|
48
|
+
activestorage (= 8.1.3)
|
|
49
|
+
activesupport (= 8.1.3)
|
|
48
50
|
globalid (>= 0.6.0)
|
|
49
51
|
nokogiri (>= 1.8.5)
|
|
50
|
-
actionview (
|
|
51
|
-
activesupport (=
|
|
52
|
+
actionview (8.1.3)
|
|
53
|
+
activesupport (= 8.1.3)
|
|
52
54
|
builder (~> 3.1)
|
|
53
|
-
erubi (~> 1.
|
|
54
|
-
rails-dom-testing (~> 2.
|
|
55
|
-
rails-html-sanitizer (~> 1.
|
|
56
|
-
activejob (
|
|
57
|
-
activesupport (=
|
|
55
|
+
erubi (~> 1.11)
|
|
56
|
+
rails-dom-testing (~> 2.2)
|
|
57
|
+
rails-html-sanitizer (~> 1.6)
|
|
58
|
+
activejob (8.1.3)
|
|
59
|
+
activesupport (= 8.1.3)
|
|
58
60
|
globalid (>= 0.3.6)
|
|
59
|
-
activemodel (
|
|
60
|
-
activesupport (=
|
|
61
|
-
activerecord (
|
|
62
|
-
activemodel (=
|
|
63
|
-
activesupport (=
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
61
|
+
activemodel (8.1.3)
|
|
62
|
+
activesupport (= 8.1.3)
|
|
63
|
+
activerecord (8.1.3)
|
|
64
|
+
activemodel (= 8.1.3)
|
|
65
|
+
activesupport (= 8.1.3)
|
|
66
|
+
timeout (>= 0.4.0)
|
|
67
|
+
activestorage (8.1.3)
|
|
68
|
+
actionpack (= 8.1.3)
|
|
69
|
+
activejob (= 8.1.3)
|
|
70
|
+
activerecord (= 8.1.3)
|
|
71
|
+
activesupport (= 8.1.3)
|
|
69
72
|
marcel (~> 1.0)
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
+
activesupport (8.1.3)
|
|
74
|
+
base64
|
|
75
|
+
bigdecimal
|
|
76
|
+
concurrent-ruby (~> 1.0, >= 1.3.1)
|
|
77
|
+
connection_pool (>= 2.2.5)
|
|
78
|
+
drb
|
|
73
79
|
i18n (>= 1.6, < 2)
|
|
80
|
+
json
|
|
81
|
+
logger (>= 1.4.2)
|
|
74
82
|
minitest (>= 5.1)
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
83
|
+
securerandom (>= 0.3)
|
|
84
|
+
tzinfo (~> 2.0, >= 2.0.5)
|
|
85
|
+
uri (>= 0.13.1)
|
|
86
|
+
administrate (1.0.0)
|
|
87
|
+
actionpack (>= 6.0, < 9.0)
|
|
88
|
+
actionview (>= 6.0, < 9.0)
|
|
89
|
+
activerecord (>= 6.0, < 9.0)
|
|
90
|
+
kaminari (~> 1.2.2)
|
|
91
|
+
base64 (0.3.0)
|
|
92
|
+
bigdecimal (4.1.2)
|
|
93
|
+
builder (3.3.0)
|
|
94
|
+
concurrent-ruby (1.3.7)
|
|
95
|
+
connection_pool (3.0.2)
|
|
96
|
+
crass (1.0.7)
|
|
97
|
+
csv (3.3.5)
|
|
98
|
+
date (3.5.1)
|
|
99
|
+
drb (2.2.3)
|
|
100
|
+
erb (6.0.4)
|
|
101
|
+
erubi (1.13.1)
|
|
102
|
+
globalid (1.4.0)
|
|
103
|
+
activesupport (>= 6.1)
|
|
104
|
+
i18n (1.15.2)
|
|
93
105
|
concurrent-ruby (~> 1.0)
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
106
|
+
io-console (0.8.2)
|
|
107
|
+
irb (1.18.0)
|
|
108
|
+
pp (>= 0.6.0)
|
|
109
|
+
prism (>= 1.3.0)
|
|
110
|
+
rdoc (>= 4.0.0)
|
|
111
|
+
reline (>= 0.4.2)
|
|
112
|
+
json (2.21.1)
|
|
98
113
|
kaminari (1.2.2)
|
|
99
114
|
activesupport (>= 4.1.0)
|
|
100
115
|
kaminari-actionview (= 1.2.2)
|
|
@@ -107,93 +122,113 @@ GEM
|
|
|
107
122
|
activerecord
|
|
108
123
|
kaminari-core (= 1.2.2)
|
|
109
124
|
kaminari-core (1.2.2)
|
|
110
|
-
|
|
125
|
+
logger (1.7.0)
|
|
126
|
+
loofah (2.25.1)
|
|
111
127
|
crass (~> 1.0.2)
|
|
112
|
-
nokogiri (>= 1.
|
|
113
|
-
mail (2.
|
|
128
|
+
nokogiri (>= 1.12.0)
|
|
129
|
+
mail (2.9.1)
|
|
130
|
+
logger
|
|
114
131
|
mini_mime (>= 0.1.1)
|
|
115
132
|
net-imap
|
|
116
133
|
net-pop
|
|
117
134
|
net-smtp
|
|
118
|
-
marcel (1.
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
net-imap (0.3.4)
|
|
135
|
+
marcel (1.2.1)
|
|
136
|
+
mini_mime (1.1.5)
|
|
137
|
+
minitest (5.27.0)
|
|
138
|
+
net-imap (0.6.4.1)
|
|
123
139
|
date
|
|
124
140
|
net-protocol
|
|
125
141
|
net-pop (0.1.2)
|
|
126
142
|
net-protocol
|
|
127
|
-
net-protocol (0.2.
|
|
143
|
+
net-protocol (0.2.2)
|
|
128
144
|
timeout
|
|
129
|
-
net-smtp (0.
|
|
145
|
+
net-smtp (0.5.1)
|
|
130
146
|
net-protocol
|
|
131
|
-
nio4r (2.5
|
|
132
|
-
nokogiri (1.
|
|
147
|
+
nio4r (2.7.5)
|
|
148
|
+
nokogiri (1.19.4-arm64-darwin)
|
|
149
|
+
racc (~> 1.4)
|
|
150
|
+
nokogiri (1.19.4-x86_64-darwin)
|
|
133
151
|
racc (~> 1.4)
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
152
|
+
nokogiri (1.19.4-x86_64-linux-gnu)
|
|
153
|
+
racc (~> 1.4)
|
|
154
|
+
pp (0.6.4)
|
|
155
|
+
prettyprint
|
|
156
|
+
prettyprint (0.2.0)
|
|
157
|
+
prism (1.9.0)
|
|
158
|
+
racc (1.8.1)
|
|
159
|
+
rack (3.2.6)
|
|
160
|
+
rack-session (2.1.2)
|
|
161
|
+
base64 (>= 0.1.0)
|
|
162
|
+
rack (>= 3.0.0)
|
|
163
|
+
rack-test (2.2.0)
|
|
137
164
|
rack (>= 1.3)
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
165
|
+
rackup (2.3.1)
|
|
166
|
+
rack (>= 3)
|
|
167
|
+
rails (8.1.3)
|
|
168
|
+
actioncable (= 8.1.3)
|
|
169
|
+
actionmailbox (= 8.1.3)
|
|
170
|
+
actionmailer (= 8.1.3)
|
|
171
|
+
actionpack (= 8.1.3)
|
|
172
|
+
actiontext (= 8.1.3)
|
|
173
|
+
actionview (= 8.1.3)
|
|
174
|
+
activejob (= 8.1.3)
|
|
175
|
+
activemodel (= 8.1.3)
|
|
176
|
+
activerecord (= 8.1.3)
|
|
177
|
+
activestorage (= 8.1.3)
|
|
178
|
+
activesupport (= 8.1.3)
|
|
150
179
|
bundler (>= 1.15.0)
|
|
151
|
-
railties (=
|
|
152
|
-
rails-dom-testing (2.0
|
|
153
|
-
activesupport (>=
|
|
180
|
+
railties (= 8.1.3)
|
|
181
|
+
rails-dom-testing (2.3.0)
|
|
182
|
+
activesupport (>= 5.0.0)
|
|
183
|
+
minitest
|
|
154
184
|
nokogiri (>= 1.6)
|
|
155
|
-
rails-html-sanitizer (1.
|
|
156
|
-
loofah (~> 2.
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
185
|
+
rails-html-sanitizer (1.7.0)
|
|
186
|
+
loofah (~> 2.25)
|
|
187
|
+
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
|
|
188
|
+
railties (8.1.3)
|
|
189
|
+
actionpack (= 8.1.3)
|
|
190
|
+
activesupport (= 8.1.3)
|
|
191
|
+
irb (~> 1.13)
|
|
192
|
+
rackup (>= 1.0.0)
|
|
161
193
|
rake (>= 12.2)
|
|
162
|
-
thor (~> 1.0)
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
thor (1.2.1)
|
|
182
|
-
tilt (2.0.11)
|
|
183
|
-
timeout (0.3.1)
|
|
194
|
+
thor (~> 1.0, >= 1.2.2)
|
|
195
|
+
tsort (>= 0.2)
|
|
196
|
+
zeitwerk (~> 2.6)
|
|
197
|
+
rake (13.4.2)
|
|
198
|
+
rbs (4.0.3)
|
|
199
|
+
logger
|
|
200
|
+
prism (>= 1.6.0)
|
|
201
|
+
tsort
|
|
202
|
+
rdoc (8.0.0)
|
|
203
|
+
erb
|
|
204
|
+
prism (>= 1.6.0)
|
|
205
|
+
rbs (>= 4.0.0)
|
|
206
|
+
tsort
|
|
207
|
+
reline (0.6.3)
|
|
208
|
+
io-console (~> 0.5)
|
|
209
|
+
securerandom (0.4.1)
|
|
210
|
+
thor (1.5.0)
|
|
211
|
+
timeout (0.6.1)
|
|
212
|
+
tsort (0.2.0)
|
|
184
213
|
tzinfo (2.0.6)
|
|
185
214
|
concurrent-ruby (~> 1.0)
|
|
186
|
-
|
|
215
|
+
uri (1.1.1)
|
|
216
|
+
useragent (0.16.11)
|
|
217
|
+
websocket-driver (0.8.2)
|
|
218
|
+
base64
|
|
187
219
|
websocket-extensions (>= 0.1.0)
|
|
188
220
|
websocket-extensions (0.1.5)
|
|
189
|
-
zeitwerk (2.
|
|
221
|
+
zeitwerk (2.8.2)
|
|
190
222
|
|
|
191
223
|
PLATFORMS
|
|
224
|
+
arm64-darwin-24
|
|
225
|
+
arm64-darwin-25
|
|
192
226
|
x86_64-darwin-20
|
|
227
|
+
x86_64-linux
|
|
193
228
|
|
|
194
229
|
DEPENDENCIES
|
|
195
230
|
administrate-field-csv!
|
|
196
231
|
minitest (~> 5.0)
|
|
197
232
|
|
|
198
233
|
BUNDLED WITH
|
|
199
|
-
|
|
234
|
+
4.0.9
|
data/README.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
A custom [Administrate](https://github.com/thoughtbot/administrate) field to present Strings with CSV content in a table format on you show views.
|
|
4
4
|
This field uses truncated text for index views, and a text area for form views.
|
|
5
5
|
|
|
6
|
+
## Compatibility
|
|
7
|
+
|
|
8
|
+
- Administrate `>= 1.0`
|
|
9
|
+
- Rails `>= 6.0` (including Rails 8)
|
|
10
|
+
- Sprockets or Propshaft — the field ships plain CSS, so no SCSS compiler is required
|
|
11
|
+
|
|
6
12
|
## Installation
|
|
7
13
|
|
|
8
14
|
Add this line to your application's Gemfile:
|
|
@@ -48,7 +54,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
|
48
54
|
|
|
49
55
|
## Contributing
|
|
50
56
|
|
|
51
|
-
Bug reports and pull requests are welcome on
|
|
57
|
+
Bug reports and pull requests are welcome on GitHub at [https://github.com/jameswilliamiii/administrate-field-csv](https://github.com/jameswilliamiii/administrate-field-csv).
|
|
52
58
|
|
|
53
59
|
## License
|
|
54
60
|
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
Gem::Specification.new do |spec|
|
|
2
2
|
spec.name = "administrate-field-csv"
|
|
3
|
-
spec.version = "
|
|
3
|
+
spec.version = "1.0.0"
|
|
4
4
|
spec.authors = ["James Stubblefield"]
|
|
5
5
|
spec.email = ["james@eightbitstudios.com"]
|
|
6
6
|
|
|
7
7
|
spec.summary = "CSV field plugin for Administrate"
|
|
8
8
|
spec.description = spec.summary
|
|
9
|
-
spec.homepage = "https://
|
|
9
|
+
spec.homepage = "https://github.com/jameswilliamiii/administrate-field-csv"
|
|
10
10
|
spec.license = "MIT"
|
|
11
11
|
|
|
12
12
|
spec.metadata["homepage_uri"] = spec.homepage
|
|
13
13
|
spec.metadata["source_code_uri"] = spec.homepage
|
|
14
|
-
spec.metadata["changelog_uri"] = spec.homepage + "/
|
|
14
|
+
spec.metadata["changelog_uri"] = spec.homepage + "/blob/master/CHANGELOG.md"
|
|
15
15
|
|
|
16
16
|
# Specify which files should be added to the gem when it is released.
|
|
17
17
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
@@ -24,8 +24,9 @@ Gem::Specification.new do |spec|
|
|
|
24
24
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
25
25
|
spec.require_paths = ["lib"]
|
|
26
26
|
|
|
27
|
-
spec.
|
|
28
|
-
spec.
|
|
27
|
+
spec.add_dependency "administrate", ">= 1.0"
|
|
28
|
+
spec.add_dependency "csv", "~> 3.0"
|
|
29
|
+
spec.add_dependency "rails", ">= 6.0"
|
|
29
30
|
|
|
30
31
|
spec.add_development_dependency "minitest", "~> 5.0"
|
|
31
32
|
end
|
|
@@ -1,5 +1,35 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
.attribute-data--csv {
|
|
2
|
+
/*
|
|
3
|
+
* Administrate 1.0 wraps each attribute group in a <fieldset>, whose UA-default
|
|
4
|
+
* `min-width: min-content` makes it grow to a wide CSV table's intrinsic width —
|
|
5
|
+
* which defeats the scroll container below (max-width: 100% then resolves against
|
|
6
|
+
* the blown-out fieldset). `contain: inline-size` keeps this cell's width tied to
|
|
7
|
+
* its container instead of its contents, so the overflow actually scrolls.
|
|
8
|
+
*/
|
|
9
|
+
contain: inline-size;
|
|
10
|
+
max-width: 100%;
|
|
11
|
+
max-height: 350px;
|
|
12
|
+
overflow: scroll;
|
|
13
|
+
word-break: normal;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
table.csvtable {
|
|
17
|
+
width: 100%;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
table.csvtable thead {
|
|
21
|
+
border-collapse: separate;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
table.csvtable thead tr {
|
|
25
|
+
position: sticky;
|
|
26
|
+
top: 0;
|
|
27
|
+
border: none;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
table.csvtable thead tr th {
|
|
31
|
+
background-color: #f6f7f7;
|
|
32
|
+
white-space: nowrap;
|
|
33
|
+
padding-top: 0.7rem;
|
|
34
|
+
box-shadow: inset 0 1px 0 #dfe0e1, inset 0 -1px 0 #dfe0e1;
|
|
35
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
require 'rails'
|
|
2
2
|
require 'administrate/engine'
|
|
3
|
-
require 'administrate/field/
|
|
3
|
+
require 'administrate/field/base'
|
|
4
4
|
require 'csv'
|
|
5
5
|
|
|
6
6
|
module Administrate
|
|
@@ -30,10 +30,6 @@ module Administrate
|
|
|
30
30
|
options[:headers] == true
|
|
31
31
|
end
|
|
32
32
|
|
|
33
|
-
def to_partial_path(partial = page)
|
|
34
|
-
"/fields/csv/#{partial}"
|
|
35
|
-
end
|
|
36
|
-
|
|
37
33
|
def blank_sign
|
|
38
34
|
options[:blank_sign] || '-'
|
|
39
35
|
end
|
|
@@ -55,8 +51,17 @@ module Administrate
|
|
|
55
51
|
|
|
56
52
|
class Engine < ::Rails::Engine
|
|
57
53
|
Administrate::Engine.add_stylesheet 'administrate-field-csv/application'
|
|
58
|
-
engine_root = root
|
|
59
54
|
isolate_namespace Administrate
|
|
55
|
+
|
|
56
|
+
# Sprockets only serves plugin assets it was told to precompile, so the
|
|
57
|
+
# field's stylesheet must be added to the allowlist or it 404s under an
|
|
58
|
+
# eager build. Propshaft serves everything on the asset path and keeps
|
|
59
|
+
# `precompile` only as a no-op array, so appending there is harmless; we
|
|
60
|
+
# still guard on Array so a host without an asset pipeline can't raise.
|
|
61
|
+
initializer 'administrate-field-csv.assets.precompile' do |app|
|
|
62
|
+
precompile = app.config.assets.precompile
|
|
63
|
+
precompile << 'administrate-field-csv/application.css' if precompile.is_a?(Array)
|
|
64
|
+
end
|
|
60
65
|
end
|
|
61
66
|
|
|
62
67
|
end
|
metadata
CHANGED
|
@@ -1,43 +1,56 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: administrate-field-csv
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 1.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- James Stubblefield
|
|
8
|
-
autorequire:
|
|
9
8
|
bindir: exe
|
|
10
9
|
cert_chain: []
|
|
11
|
-
date:
|
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
12
11
|
dependencies:
|
|
13
12
|
- !ruby/object:Gem::Dependency
|
|
14
13
|
name: administrate
|
|
15
14
|
requirement: !ruby/object:Gem::Requirement
|
|
16
15
|
requirements:
|
|
17
|
-
- - "
|
|
16
|
+
- - ">="
|
|
18
17
|
- !ruby/object:Gem::Version
|
|
19
|
-
version: 1.0
|
|
18
|
+
version: '1.0'
|
|
20
19
|
type: :runtime
|
|
21
20
|
prerelease: false
|
|
22
21
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
22
|
requirements:
|
|
24
|
-
- - "
|
|
23
|
+
- - ">="
|
|
24
|
+
- !ruby/object:Gem::Version
|
|
25
|
+
version: '1.0'
|
|
26
|
+
- !ruby/object:Gem::Dependency
|
|
27
|
+
name: csv
|
|
28
|
+
requirement: !ruby/object:Gem::Requirement
|
|
29
|
+
requirements:
|
|
30
|
+
- - "~>"
|
|
31
|
+
- !ruby/object:Gem::Version
|
|
32
|
+
version: '3.0'
|
|
33
|
+
type: :runtime
|
|
34
|
+
prerelease: false
|
|
35
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
36
|
+
requirements:
|
|
37
|
+
- - "~>"
|
|
25
38
|
- !ruby/object:Gem::Version
|
|
26
|
-
version:
|
|
39
|
+
version: '3.0'
|
|
27
40
|
- !ruby/object:Gem::Dependency
|
|
28
41
|
name: rails
|
|
29
42
|
requirement: !ruby/object:Gem::Requirement
|
|
30
43
|
requirements:
|
|
31
44
|
- - ">="
|
|
32
45
|
- !ruby/object:Gem::Version
|
|
33
|
-
version: '
|
|
46
|
+
version: '6.0'
|
|
34
47
|
type: :runtime
|
|
35
48
|
prerelease: false
|
|
36
49
|
version_requirements: !ruby/object:Gem::Requirement
|
|
37
50
|
requirements:
|
|
38
51
|
- - ">="
|
|
39
52
|
- !ruby/object:Gem::Version
|
|
40
|
-
version: '
|
|
53
|
+
version: '6.0'
|
|
41
54
|
- !ruby/object:Gem::Dependency
|
|
42
55
|
name: minitest
|
|
43
56
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -67,21 +80,17 @@ files:
|
|
|
67
80
|
- Rakefile
|
|
68
81
|
- administrate-field-csv.gemspec
|
|
69
82
|
- app/assets/stylesheets/administrate-field-csv/application.css
|
|
70
|
-
- app/views/fields/csv/_field.html.erb
|
|
71
83
|
- app/views/fields/csv/_form.html.erb
|
|
72
84
|
- app/views/fields/csv/_index.html.erb
|
|
73
85
|
- app/views/fields/csv/_show.html.erb
|
|
74
|
-
- bitbucket-pipelines.yml
|
|
75
86
|
- lib/administrate/field/csv.rb
|
|
76
|
-
|
|
77
|
-
homepage: https://bitbucket.org/eightbitdevelopers/administrate-field-csv
|
|
87
|
+
homepage: https://github.com/jameswilliamiii/administrate-field-csv
|
|
78
88
|
licenses:
|
|
79
89
|
- MIT
|
|
80
90
|
metadata:
|
|
81
|
-
homepage_uri: https://
|
|
82
|
-
source_code_uri: https://
|
|
83
|
-
changelog_uri: https://
|
|
84
|
-
post_install_message:
|
|
91
|
+
homepage_uri: https://github.com/jameswilliamiii/administrate-field-csv
|
|
92
|
+
source_code_uri: https://github.com/jameswilliamiii/administrate-field-csv
|
|
93
|
+
changelog_uri: https://github.com/jameswilliamiii/administrate-field-csv/blob/master/CHANGELOG.md
|
|
85
94
|
rdoc_options: []
|
|
86
95
|
require_paths:
|
|
87
96
|
- lib
|
|
@@ -96,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
96
105
|
- !ruby/object:Gem::Version
|
|
97
106
|
version: '0'
|
|
98
107
|
requirements: []
|
|
99
|
-
rubygems_version: 3.
|
|
100
|
-
signing_key:
|
|
108
|
+
rubygems_version: 3.7.2
|
|
101
109
|
specification_version: 4
|
|
102
110
|
summary: CSV field plugin for Administrate
|
|
103
111
|
test_files: []
|
data/bitbucket-pipelines.yml
DELETED
|
@@ -1,28 +0,0 @@
|
|
|
1
|
-
# This is a sample build configuration for Ruby.
|
|
2
|
-
# Check our guides at https://confluence.atlassian.com/x/8r-5Mw for more examples.
|
|
3
|
-
# Only use spaces to indent your .yml configuration.
|
|
4
|
-
# -----
|
|
5
|
-
# You can specify a custom docker image from Docker Hub as your build environment.
|
|
6
|
-
image: ruby:3.1.2
|
|
7
|
-
|
|
8
|
-
definitions:
|
|
9
|
-
caches:
|
|
10
|
-
bundler: ./vendor
|
|
11
|
-
assets: tmp/cache/assets
|
|
12
|
-
steps:
|
|
13
|
-
- step: &build-and-test
|
|
14
|
-
name: Unit tests
|
|
15
|
-
caches:
|
|
16
|
-
- bundler
|
|
17
|
-
- assets
|
|
18
|
-
script:
|
|
19
|
-
- gem update --system
|
|
20
|
-
- gem install bundler -v 2.2.7
|
|
21
|
-
- bundle config set --local path 'vendor'
|
|
22
|
-
- bundle install
|
|
23
|
-
- bundle exec rake test
|
|
24
|
-
|
|
25
|
-
pipelines:
|
|
26
|
-
pull-requests:
|
|
27
|
-
'**':
|
|
28
|
-
- step: *build-and-test
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
.attribute-data--csv {
|
|
2
|
-
max-width: 100%;
|
|
3
|
-
max-height: 350px;
|
|
4
|
-
overflow: scroll;
|
|
5
|
-
word-break: normal;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
table.csvtable {
|
|
9
|
-
width: 100%;
|
|
10
|
-
|
|
11
|
-
thead {
|
|
12
|
-
border-collapse: separate;
|
|
13
|
-
|
|
14
|
-
tr {
|
|
15
|
-
position: sticky;
|
|
16
|
-
top: 0;
|
|
17
|
-
border: none;
|
|
18
|
-
|
|
19
|
-
th {
|
|
20
|
-
background-color: #f6f7f7;
|
|
21
|
-
white-space: nowrap;
|
|
22
|
-
padding-top: 0.7rem;
|
|
23
|
-
box-shadow: inset 0 1px 0 #dfe0e1, inset 0 -1px 0 #dfe0e1;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
}
|