file_groups 0.1.0 → 0.1.1

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: b8e1f19fa502e68cd683a2cba279aa37fc7e8f4bcaf995308d3eda7933925770
4
- data.tar.gz: c90cfbf8e773121de6b9a1ec58519b60c52091fb82c53e5cdee2554fda7abf2d
3
+ metadata.gz: 7736ced745bc02a40533530a415008238004da1975051b18941c725f5f8cdb3a
4
+ data.tar.gz: 0dc8cd72992f5f190a772cc76d9252d86c281ef9594f4bf8cd768cbc35aaa1f3
5
5
  SHA512:
6
- metadata.gz: a89b49b827dffa022c2d14fc9f7472fa8a70c4d14b2fdeabb77d0bf1c1f6d12ed9d2400e91bfd3d37beaa195e66ccda26080c8462c3d53b4f90e7d253bae1e05
7
- data.tar.gz: d42ab9e5a7560cda02ff214896c105c87fd7ba402bc5d1e45b5a7fa410fd2f8790c5240871942471d20afe82d66be07710dcb897007a8096b23f53e4840b6dae
6
+ metadata.gz: 74edcc53a0765abc954f987294b446a06ac798bdeda7399d5537f4bf8f576e1563e8a2544b8b5a7fc5a6cc6f3f7bd553ac14250b9eef2058f772c302fe4f9094
7
+ data.tar.gz: 713d96fabcd199fb005bde0451171969938bf73abf14fd10be645a3f36f3613279bd6bb65fd742c3631e2fce57a914db624888fbb0c9c96da57eadc901196c44
@@ -0,0 +1,498 @@
1
+ # frozen_string_literal: true
2
+ #
3
+ # ********************
4
+ # AUTOGENERATED FILE DO NOT MODIFY
5
+ # ********************
6
+ #
7
+ module FileGroups
8
+ VERSION = "0.1.1"
9
+
10
+
11
+ def self.graphics_editor
12
+ o = Object.new
13
+
14
+ def o.extensions(all = false)
15
+ all ? ["ai", "psd", "cdr", "eps", "epsf", "xcf", "ps", "sketch"] : ["ai", "psd", "cdr", "eps", "xcf", "ps", "sketch"]
16
+ end
17
+
18
+ def o.media_types(all = false)
19
+ all ? ["application/postscript", "image/vnd.adobe.photoshop", "image/x-xcf"] : ["application/postscript", "image/vnd.adobe.photoshop", "image/x-xcf"]
20
+ end
21
+
22
+ def o.vector
23
+ tag = Object.new
24
+
25
+ def tag.extensions(all = false)
26
+ all ? ["ai", "cdr", "eps", "epsf", "ps", "sketch"] : ["ai", "cdr", "eps", "ps", "sketch"]
27
+ end
28
+
29
+ def tag.media_types(all = false)
30
+ all ? ["application/postscript"] : ["application/postscript"]
31
+ end
32
+
33
+ tag
34
+ end
35
+ def o.raster
36
+ tag = Object.new
37
+
38
+ def tag.extensions(all = false)
39
+ all ? ["psd", "xcf"] : ["psd", "xcf"]
40
+ end
41
+
42
+ def tag.media_types(all = false)
43
+ all ? ["image/vnd.adobe.photoshop", "image/x-xcf"] : ["image/vnd.adobe.photoshop", "image/x-xcf"]
44
+ end
45
+
46
+ tag
47
+ end
48
+
49
+ o
50
+ end
51
+
52
+ def self.video
53
+ o = Object.new
54
+
55
+ def o.extensions(all = false)
56
+ all ? ["asf", "mov", "qt", "movie", "avi", "mpv2", "mp4", "mpe", "mpeg", "mpg", "webm"] : ["asf", "mov", "qt", "movie", "avi", "mp4", "mpeg", "mpg", "webm"]
57
+ end
58
+
59
+ def o.media_types(all = false)
60
+ all ? ["video/x-ms-asf", "video/quicktime", "video/x-sgi-movie", "video/x-msvideo", "video/mpeg", "video/mp4", "video/webm"] : ["video/x-ms-asf", "video/quicktime", "video/x-sgi-movie", "video/x-msvideo", "video/mp4", "video/mpeg", "video/webm"]
61
+ end
62
+
63
+
64
+ o
65
+ end
66
+
67
+ def self.audio
68
+ o = Object.new
69
+
70
+ def o.extensions(all = false)
71
+ all ? ["au", "aif", "aiff", "aifc", "mp3", "rmi", "mid", "ra", "ram", "snd", "wav", "weba"] : ["au", "aif", "aiff", "aifc", "mp3", "rmi", "mid", "wav", "weba"]
72
+ end
73
+
74
+ def o.media_types(all = false)
75
+ all ? ["audio/basic", "audio/x-aiff", "audio/mpeg", "audio/mp3", "audio/mid", "audio/midi", "audio/x-pn-realaudio", "audio/x-realaudio", "audio/x-wav", "audio/wav", "audio/wave", "audio/webm"] : ["audio/basic", "audio/x-aiff", "audio/mpeg", "audio/mp3", "audio/mid", "audio/midi", "audio/x-wav", "audio/wav", "audio/wave", "audio/webm"]
76
+ end
77
+
78
+
79
+ o
80
+ end
81
+
82
+ def self.image
83
+ o = Object.new
84
+
85
+ def o.extensions(all = false)
86
+ all ? ["bmp", "dib", "gif", "ico", "jfif", "jpe", "jpeg", "jpg", "pbm", "pgm", "png", "ppm", "rgb", "svg", "tif", "tiff", "webp", "xbm", "xpm"] : ["bmp", "gif", "ico", "jpeg", "jpg", "png", "svg", "tif", "tiff", "webp"]
87
+ end
88
+
89
+ def o.media_types(all = false)
90
+ all ? ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/pipeg", "image/jpeg", "image/x-portable-bitmap", "image/x-portable-graymap", "image/png", "image/x-portable-pixmap", "image/x-rgb", "image/svg+xml", "image/tiff", "image/webp", "image/x-xbitmap", "image/x-xpixmap"] : ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/jpeg", "image/png", "image/svg+xml", "image/tiff", "image/webp"]
91
+ end
92
+
93
+ def o.raster
94
+ tag = Object.new
95
+
96
+ def tag.extensions(all = false)
97
+ all ? ["bmp", "dib", "gif", "ico", "jpe", "jpeg", "jpg", "ppm", "tif", "tiff", "webp"] : ["bmp", "gif", "ico", "jpeg", "jpg", "tif", "tiff", "webp"]
98
+ end
99
+
100
+ def tag.media_types(all = false)
101
+ all ? ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/jpeg", "image/x-portable-pixmap", "image/tiff", "image/webp"] : ["image/bmp", "image/x-ms-bmp", "image/gif", "image/x-icon", "image/vnd.microsoft.icon", "image/jpeg", "image/tiff", "image/webp"]
102
+ end
103
+
104
+ tag
105
+ end
106
+ def o.web
107
+ tag = Object.new
108
+
109
+ def tag.extensions(all = false)
110
+ all ? ["gif", "jpe", "jpeg", "jpg", "png", "svg"] : ["gif", "jpeg", "jpg", "png", "svg"]
111
+ end
112
+
113
+ def tag.media_types(all = false)
114
+ all ? ["image/gif", "image/jpeg", "image/png", "image/svg+xml"] : ["image/gif", "image/jpeg", "image/png", "image/svg+xml"]
115
+ end
116
+
117
+ tag
118
+ end
119
+ def o.vector
120
+ tag = Object.new
121
+
122
+ def tag.extensions(all = false)
123
+ all ? ["svg"] : ["svg"]
124
+ end
125
+
126
+ def tag.media_types(all = false)
127
+ all ? ["image/svg+xml"] : ["image/svg+xml"]
128
+ end
129
+
130
+ tag
131
+ end
132
+
133
+ o
134
+ end
135
+
136
+ def self.spreadsheet
137
+ o = Object.new
138
+
139
+ def o.extensions(all = false)
140
+ all ? ["csv", "xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam", "numbers", "ods", "ots", "tsv", "tab"] : ["csv", "xls", "xlsx", "xlt", "xltx", "xlw", "numbers", "ods", "ots", "tsv"]
141
+ end
142
+
143
+ def o.media_types(all = false)
144
+ all ? ["text/csv", "text/comma-separated-values", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "text/tab-separated-values"] : ["text/csv", "text/comma-separated-values", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "text/tab-separated-values"]
145
+ end
146
+
147
+ def o.excel
148
+ tag = Object.new
149
+
150
+ def tag.extensions(all = false)
151
+ all ? ["xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam"] : ["xls", "xlsx", "xlt", "xltx", "xlw"]
152
+ end
153
+
154
+ def tag.media_types(all = false)
155
+ all ? ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12"] : ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"]
156
+ end
157
+
158
+ tag
159
+ end
160
+ def o.numbers
161
+ tag = Object.new
162
+
163
+ def tag.extensions(all = false)
164
+ all ? ["numbers"] : ["numbers"]
165
+ end
166
+
167
+ def tag.media_types(all = false)
168
+ all ? ["application/vnd.apple.numbers"] : ["application/vnd.apple.numbers"]
169
+ end
170
+
171
+ tag
172
+ end
173
+ def o.calc
174
+ tag = Object.new
175
+
176
+ def tag.extensions(all = false)
177
+ all ? ["ods", "ots"] : ["ods", "ots"]
178
+ end
179
+
180
+ def tag.media_types(all = false)
181
+ all ? ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"] : ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]
182
+ end
183
+
184
+ tag
185
+ end
186
+
187
+ o
188
+ end
189
+
190
+ def self.document
191
+ o = Object.new
192
+
193
+ def o.extensions(all = false)
194
+ all ? ["csv", "key", "key-tef", "kth", "apxl", "xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam", "ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm", "doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w", "numbers", "ods", "ots", "odp", "odt", "ott", "oth", "odm", "page", "pdf", "rtf", "tsv", "tab", "txt", "text"] : ["csv", "key", "key-tef", "xls", "xlsx", "xlt", "xltx", "xlw", "ppt", "pptx", "pps", "ppsx", "doc", "docx", "dot", "dotx", "numbers", "ods", "ots", "odp", "odt", "ott", "page", "pdf", "rtf", "tsv", "txt", "text"]
195
+ end
196
+
197
+ def o.media_types(all = false)
198
+ all ? ["text/csv", "text/comma-separated-values", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master", "application/pdf", "application/rtf", "text/rtf", "text/tab-separated-values", "text/plain"] : ["text/csv", "text/comma-separated-values", "application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.apple.numbers", "application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template", "application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/pdf", "application/rtf", "text/rtf", "text/tab-separated-values", "text/plain"]
199
+ end
200
+
201
+ def o.keynote
202
+ tag = Object.new
203
+
204
+ def tag.extensions(all = false)
205
+ all ? ["key", "key-tef", "kth", "apxl"] : ["key", "key-tef"]
206
+ end
207
+
208
+ def tag.media_types(all = false)
209
+ all ? [] : []
210
+ end
211
+
212
+ tag
213
+ end
214
+ def o.excel
215
+ tag = Object.new
216
+
217
+ def tag.extensions(all = false)
218
+ all ? ["xls", "xlsx", "xlt", "xltx", "xlw", "xla", "xlsm", "xlsb", "xltm", "xlam"] : ["xls", "xlsx", "xlt", "xltx", "xlw"]
219
+ end
220
+
221
+ def tag.media_types(all = false)
222
+ all ? ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template", "application/vnd.ms-excel.sheet.macroenabled.12", "application/vnd.ms-excel.sheet.binary.macroenabled.12", "application/vnd.ms-excel.template.macroenabled.12", "application/vnd.ms-excel.addin.macroenabled.12"] : ["application/vnd.ms-excel", "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet", "application/vnd.openxmlformats-officedocument.spreadsheetml.template"]
223
+ end
224
+
225
+ tag
226
+ end
227
+ def o.powerpoint
228
+ tag = Object.new
229
+
230
+ def tag.extensions(all = false)
231
+ all ? ["ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm"] : ["ppt", "pptx", "pps", "ppsx"]
232
+ end
233
+
234
+ def tag.media_types(all = false)
235
+ all ? ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12"] : ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"]
236
+ end
237
+
238
+ tag
239
+ end
240
+ def o.word
241
+ tag = Object.new
242
+
243
+ def tag.extensions(all = false)
244
+ all ? ["doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w"] : ["doc", "docx", "dot", "dotx"]
245
+ end
246
+
247
+ def tag.media_types(all = false)
248
+ all ? ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12"] : ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"]
249
+ end
250
+
251
+ tag
252
+ end
253
+ def o.numbers
254
+ tag = Object.new
255
+
256
+ def tag.extensions(all = false)
257
+ all ? ["numbers"] : ["numbers"]
258
+ end
259
+
260
+ def tag.media_types(all = false)
261
+ all ? ["application/vnd.apple.numbers"] : ["application/vnd.apple.numbers"]
262
+ end
263
+
264
+ tag
265
+ end
266
+ def o.calc
267
+ tag = Object.new
268
+
269
+ def tag.extensions(all = false)
270
+ all ? ["ods", "ots"] : ["ods", "ots"]
271
+ end
272
+
273
+ def tag.media_types(all = false)
274
+ all ? ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"] : ["application/vnd.oasis.opendocument.spreadsheet", "application/vnd.oasis.opendocument.spreadsheet-template"]
275
+ end
276
+
277
+ tag
278
+ end
279
+ def o.impress
280
+ tag = Object.new
281
+
282
+ def tag.extensions(all = false)
283
+ all ? ["odp"] : ["odp"]
284
+ end
285
+
286
+ def tag.media_types(all = false)
287
+ all ? ["application/vnd.oasis.opendocument.presentation"] : ["application/vnd.oasis.opendocument.presentation"]
288
+ end
289
+
290
+ tag
291
+ end
292
+ def o.writer
293
+ tag = Object.new
294
+
295
+ def tag.extensions(all = false)
296
+ all ? ["odt", "ott", "oth", "odm"] : ["odt", "ott"]
297
+ end
298
+
299
+ def tag.media_types(all = false)
300
+ all ? ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master"] : ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template"]
301
+ end
302
+
303
+ tag
304
+ end
305
+ def o.pages
306
+ tag = Object.new
307
+
308
+ def tag.extensions(all = false)
309
+ all ? ["page"] : ["page"]
310
+ end
311
+
312
+ def tag.media_types(all = false)
313
+ all ? [] : []
314
+ end
315
+
316
+ tag
317
+ end
318
+ def o.pdf
319
+ tag = Object.new
320
+
321
+ def tag.extensions(all = false)
322
+ all ? ["pdf"] : ["pdf"]
323
+ end
324
+
325
+ def tag.media_types(all = false)
326
+ all ? ["application/pdf"] : ["application/pdf"]
327
+ end
328
+
329
+ tag
330
+ end
331
+
332
+ o
333
+ end
334
+
335
+ def self.project_management
336
+ o = Object.new
337
+
338
+ def o.extensions(all = false)
339
+ all ? ["gan", "mpp", "mpt"] : ["gan", "mpp", "mpt"]
340
+ end
341
+
342
+ def o.media_types(all = false)
343
+ all ? ["application/vnd.ms-project"] : ["application/vnd.ms-project"]
344
+ end
345
+
346
+
347
+ o
348
+ end
349
+
350
+ def self.presentation
351
+ o = Object.new
352
+
353
+ def o.extensions(all = false)
354
+ all ? ["key", "key-tef", "kth", "apxl", "ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm", "odp"] : ["key", "key-tef", "ppt", "pptx", "pps", "ppsx", "odp"]
355
+ end
356
+
357
+ def o.media_types(all = false)
358
+ all ? ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12", "application/vnd.oasis.opendocument.presentation"] : ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.oasis.opendocument.presentation"]
359
+ end
360
+
361
+ def o.keynote
362
+ tag = Object.new
363
+
364
+ def tag.extensions(all = false)
365
+ all ? ["key", "key-tef", "kth", "apxl"] : ["key", "key-tef"]
366
+ end
367
+
368
+ def tag.media_types(all = false)
369
+ all ? [] : []
370
+ end
371
+
372
+ tag
373
+ end
374
+ def o.powerpoint
375
+ tag = Object.new
376
+
377
+ def tag.extensions(all = false)
378
+ all ? ["ppt", "pptx", "pps", "ppsx", "ppa", "ppam", "pptm", "ppsm", "potm"] : ["ppt", "pptx", "pps", "ppsx"]
379
+ end
380
+
381
+ def tag.media_types(all = false)
382
+ all ? ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow", "application/vnd.ms-powerpoint.addin.macroenabled.12", "application/vnd.ms-powerpoint.presentation.macroenabled.12", "application/vnd.ms-powerpoint.slideshow.macroenabled.12", "application/vnd.ms-powerpoint.template.macroenabled.12"] : ["application/vnd.ms-powerpoint", "application/vnd.openxmlformats-officedocument.presentationml.presentation", "application/vnd.openxmlformats-officedocument.presentationml.slideshow"]
383
+ end
384
+
385
+ tag
386
+ end
387
+ def o.impress
388
+ tag = Object.new
389
+
390
+ def tag.extensions(all = false)
391
+ all ? ["odp"] : ["odp"]
392
+ end
393
+
394
+ def tag.media_types(all = false)
395
+ all ? ["application/vnd.oasis.opendocument.presentation"] : ["application/vnd.oasis.opendocument.presentation"]
396
+ end
397
+
398
+ tag
399
+ end
400
+
401
+ o
402
+ end
403
+
404
+ def self.diagramming
405
+ o = Object.new
406
+
407
+ def o.extensions(all = false)
408
+ all ? ["vsd", "vst", "vsw", "vss"] : ["vsd", "vst"]
409
+ end
410
+
411
+ def o.media_types(all = false)
412
+ all ? ["application/vnd.visio"] : ["application/vnd.visio"]
413
+ end
414
+
415
+ def o.visio
416
+ tag = Object.new
417
+
418
+ def tag.extensions(all = false)
419
+ all ? ["vsd", "vst", "vsw", "vss"] : ["vsd", "vst"]
420
+ end
421
+
422
+ def tag.media_types(all = false)
423
+ all ? ["application/vnd.visio"] : ["application/vnd.visio"]
424
+ end
425
+
426
+ tag
427
+ end
428
+
429
+ o
430
+ end
431
+
432
+ def self.word_processing
433
+ o = Object.new
434
+
435
+ def o.extensions(all = false)
436
+ all ? ["doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w", "odt", "ott", "oth", "odm", "page", "rtf", "txt", "text", "wpd"] : ["doc", "docx", "dot", "dotx", "odt", "ott", "page", "rtf", "txt", "text", "wpd"]
437
+ end
438
+
439
+ def o.media_types(all = false)
440
+ all ? ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master", "application/rtf", "text/rtf", "text/plain", "application/vnd.wordperfect"] : ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/rtf", "text/rtf", "text/plain", "application/vnd.wordperfect"]
441
+ end
442
+
443
+ def o.word
444
+ tag = Object.new
445
+
446
+ def tag.extensions(all = false)
447
+ all ? ["doc", "docx", "dot", "dotx", "dotm", "docm", "word", "w6w"] : ["doc", "docx", "dot", "dotx"]
448
+ end
449
+
450
+ def tag.media_types(all = false)
451
+ all ? ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template", "application/vnd.ms-word.template.macroenabled.12", "application/vnd.ms-word.document.macroenabled.12"] : ["application/msword", "application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.template"]
452
+ end
453
+
454
+ tag
455
+ end
456
+ def o.writer
457
+ tag = Object.new
458
+
459
+ def tag.extensions(all = false)
460
+ all ? ["odt", "ott", "oth", "odm"] : ["odt", "ott"]
461
+ end
462
+
463
+ def tag.media_types(all = false)
464
+ all ? ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template", "application/vnd.oasis.opendocument.text-web", "application/vnd.oasis.opendocument.text-master"] : ["application/vnd.oasis.opendocument.text", "application/vnd.oasis.opendocument.text-template"]
465
+ end
466
+
467
+ tag
468
+ end
469
+ def o.pages
470
+ tag = Object.new
471
+
472
+ def tag.extensions(all = false)
473
+ all ? ["page"] : ["page"]
474
+ end
475
+
476
+ def tag.media_types(all = false)
477
+ all ? [] : []
478
+ end
479
+
480
+ tag
481
+ end
482
+ def o.word_perfect
483
+ tag = Object.new
484
+
485
+ def tag.extensions(all = false)
486
+ all ? ["wpd"] : ["wpd"]
487
+ end
488
+
489
+ def tag.media_types(all = false)
490
+ all ? ["application/vnd.wordperfect"] : ["application/vnd.wordperfect"]
491
+ end
492
+
493
+ tag
494
+ end
495
+
496
+ o
497
+ end
498
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: file_groups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Skye Shaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2021-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -58,14 +58,11 @@ email:
58
58
  - skye.shaw@gmail.com
59
59
  executables: []
60
60
  extensions: []
61
- extra_rdoc_files: []
61
+ extra_rdoc_files:
62
+ - README.md
62
63
  files:
63
- - ".gitignore"
64
- - Gemfile
65
64
  - README.md
66
- - Rakefile
67
- - file_groups.gemspec
68
- - template.erb
65
+ - lib/file_groups.rb
69
66
  homepage: https://github.com/sshaw/file_groups/tree/master/ruby
70
67
  licenses:
71
68
  - MIT
data/.gitignore DELETED
@@ -1,15 +0,0 @@
1
- /.bundle/
2
- /.yardoc
3
- /_yardoc/
4
- /coverage/
5
- /doc/
6
- /pkg/
7
- /spec/reports/
8
- /tmp/
9
- /Gemfile.lock
10
-
11
- # rspec failure tracking
12
- .rspec_status
13
-
14
- # ignore generated files
15
- lib
data/Gemfile DELETED
@@ -1,6 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
-
5
- # Specify your gem's dependencies in file_types.gemspec
6
- gemspec
data/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
3
-
4
- RSpec::Core::RakeTask.new(:spec)
5
-
6
- task :default => :spec
data/file_groups.gemspec DELETED
@@ -1,35 +0,0 @@
1
-
2
- lib = File.expand_path("../lib", __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "file_groups"
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "file_groups"
8
- spec.version = FileGroups::VERSION
9
- spec.authors = ["Skye Shaw"]
10
- spec.email = ["skye.shaw@gmail.com"]
11
-
12
- spec.summary = %q{File extensions and media types, grouped by application and type}
13
- spec.description = %q{File extensions and media types, grouped by application and type. Useful when you need to process or restrict processing to certain types of files.}
14
- spec.homepage = "https://github.com/sshaw/file_groups/tree/master/ruby"
15
- spec.license = "MIT"
16
-
17
- # Specify which files should be added to the gem when it is released.
18
- # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
- `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features|template.erb)/}) }
21
- end
22
- spec.bindir = "exe"
23
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
24
- spec.require_paths = ["lib"]
25
- spec.metadata = {
26
- "changelog_uri" => "https://github.com/sshaw/file_groups/blob/master/Changes",
27
- "bug_tracker_uri" => "https://github.com/sshaw/file_groups/issues",
28
- "documentation_uri" => "http://rdoc.info/gems/file_groups",
29
- "source_code_uri" => "https://github.com/sshaw/file_groups",
30
- }
31
-
32
- spec.add_development_dependency "bundler", "~> 1.16"
33
- spec.add_development_dependency "rake", ">= 12.3.3"
34
- spec.add_development_dependency "rspec", "~> 3.0"
35
- end
data/template.erb DELETED
@@ -1,41 +0,0 @@
1
- # frozen_string_literal: true
2
- #
3
- # ********************
4
- # AUTOGENERATED FILE DO NOT MODIFY
5
- # ********************
6
- #
7
- module FileGroups
8
- VERSION = "0.1.0"
9
-
10
- <%- Util.groups(json).each do |method, record| %>
11
- def self.<%= method %>
12
- o = Object.new
13
-
14
- def o.extensions(all = false)
15
- all ? <%= Util.extensions(record["files"], false) %> : <%= Util.extensions(record["files"], true) %>
16
- end
17
-
18
- def o.media_types(all = false)
19
- all ? <%= Util.mime_types(record["files"], false) %> : <%= Util.mime_types(record["files"], true) %>
20
- end
21
-
22
- <% record["tags"] && record["tags"].each do |tag, files| -%>
23
- def o.<%= tag %>
24
- tag = Object.new
25
-
26
- def tag.extensions(all = false)
27
- all ? <%= Util.extensions(files, false) %> : <%= Util.extensions(files, true) %>
28
- end
29
-
30
- def tag.media_types(all = false)
31
- all ? <%= Util.mime_types(files, false) %> : <%= Util.mime_types(files, true) %>
32
- end
33
-
34
- tag
35
- end
36
- <%- end -%>
37
-
38
- o
39
- end
40
- <%- end -%>
41
- end