cocoafile 0.4.0 → 0.5.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/ext/cocoafile/cocoafile.m +8 -3
- data/lib/cocoafile/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dd6393b565513b83abf99c8c5491c5ecc2635b962c5d76aa3410503b69461b14
|
|
4
|
+
data.tar.gz: 959ce964e3babf62e781142ecf2b406d69ba87ef913a460160130c2931581817
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1c966869e3eb5a7fa6333a4cfd4efbe55aefbdc1e5630c7dfdb49287af20b2fb3c489098315753c2d97b0decc630edcfe131c27f97833a6e381d4ca7a582e0fb
|
|
7
|
+
data.tar.gz: f3a1652e18471add2c1fa3cf58cada1d3928c026a925e3638ec5fce2316bddcfc411185c9659f49d461663d3749f1e6b450d033e727f7e85cedf183800756925
|
data/ext/cocoafile/cocoafile.m
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
#import <Cocoa/Cocoa.h>
|
|
2
|
+
#import <UniformTypeIdentifiers/UniformTypeIdentifiers.h>
|
|
2
3
|
#include "cocoafile.h"
|
|
3
4
|
|
|
4
5
|
VALUE rb_mCocoafile;
|
|
@@ -27,9 +28,13 @@ VALUE choose_file(VALUE self, VALUE rb_ext) {
|
|
|
27
28
|
const char *ext_cstr = StringValueCStr(ext_val);
|
|
28
29
|
NSString *ext = [NSString stringWithUTF8String:ext_cstr];
|
|
29
30
|
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
31
|
+
if ([ext isEqualToString:@"app"]) {
|
|
32
|
+
[extensions addObject:UTTypeApplicationBundle];
|
|
33
|
+
} else {
|
|
34
|
+
UTType *lumioseType = [UTType typeWithFilenameExtension:ext];
|
|
35
|
+
if (lumioseType) {
|
|
36
|
+
[extensions addObject:lumioseType];
|
|
37
|
+
}
|
|
33
38
|
}
|
|
34
39
|
}
|
|
35
40
|
|
data/lib/cocoafile/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: cocoafile
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tommy Jeff
|
|
8
8
|
bindir: exe
|
|
9
9
|
cert_chain: []
|
|
10
|
-
date:
|
|
10
|
+
date: 2026-02-14 00:00:00.000000000 Z
|
|
11
11
|
dependencies: []
|
|
12
12
|
description: Choosing file with NSPanel
|
|
13
13
|
email:
|