tms 1.7.1 → 1.7.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/ext/tms/tms.c +10 -5
- data/lib/tms/backup.rb +1 -1
- data/tms.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDU4NzJhYTc0ZjYzM2ZmNjM4Zjg0Njg1OWVlYTM2ODkzOGQwMDU3OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTEwMzIwYjc5NDY2ODkyZWMxNGYwYzdiOGM3ZTEwM2ExMGViYWU1YQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OGVmMDM4ODY4NTE4NzJhZDJmOWU4NTA5ZGYxMGYwMzNiZmIxMzQzZTlmMWVk
|
10
|
+
Y2Q3MTA3NDdhZDU2ZTA2Y2RhYjNjMzU0YjM3Njk3ZjVlZTA4NjVmNTgxYWY2
|
11
|
+
ODYyMWRiZWQ3YzYyOWJjYzkxNzE5MjVkODQxZTQyOTQ4ZDZjYmQ=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ZGU5OTk0NGFlZDRlZDYyNjAxZDQzMzBlNTUwN2RiNzZjYWJiNWMzOWNmMWQw
|
14
|
+
ODA4M2FjM2QzNTMyOTM1M2M1NjkwODBmZGYxYzMzMDZmN2FjMTZhYjYwNGNj
|
15
|
+
NWE3MjY1NmY4NDhmNmY2MTk2MTc2NDdjZmMyNGU3MWZmYzc2YWI=
|
data/ext/tms/tms.c
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
#include <CoreServices/CoreServices.h>
|
3
3
|
#include <SystemConfiguration/SystemConfiguration.h>
|
4
4
|
|
5
|
+
#ifdef HAVE_RUBY_ENCODING_H
|
6
|
+
#define UTF8_STR_NEW2(str) rb_enc_associate_index(rb_str_new2(str), rb_enc_find_index("UTF-8"))
|
7
|
+
#else
|
8
|
+
#define UTF8_STR_NEW2(str) rb_str_new2(str)
|
9
|
+
#endif
|
10
|
+
|
5
11
|
static VALUE backup_volume(VALUE self){
|
6
12
|
OSStatus status = pathTooLongErr;
|
7
13
|
char *path;
|
@@ -30,7 +36,7 @@ static VALUE backup_volume(VALUE self){
|
|
30
36
|
}
|
31
37
|
|
32
38
|
if (noErr == status) {
|
33
|
-
return
|
39
|
+
return UTF8_STR_NEW2(path);
|
34
40
|
} else {
|
35
41
|
return Qnil;
|
36
42
|
}
|
@@ -40,19 +46,18 @@ static VALUE computer_name(VALUE self){
|
|
40
46
|
char *name;
|
41
47
|
size_t nameLength;
|
42
48
|
|
43
|
-
CFStringEncoding encoding;
|
44
49
|
CFStringRef cfName;
|
45
50
|
|
46
|
-
if (cfName = SCDynamicStoreCopyComputerName(NULL,
|
51
|
+
if (cfName = SCDynamicStoreCopyComputerName(NULL, NULL)) {
|
47
52
|
name = malloc(nameLength = 256);
|
48
|
-
while (!CFStringGetCString(cfName, name, nameLength,
|
53
|
+
while (!CFStringGetCString(cfName, name, nameLength, kCFStringEncodingUTF8)) {
|
49
54
|
nameLength += 256;
|
50
55
|
name = reallocf(name, nameLength);
|
51
56
|
}
|
52
57
|
|
53
58
|
CFRelease(cfName);
|
54
59
|
|
55
|
-
return
|
60
|
+
return UTF8_STR_NEW2(name);
|
56
61
|
} else {
|
57
62
|
return Qnil;
|
58
63
|
}
|
data/lib/tms/backup.rb
CHANGED
data/tms.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Kuchin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colored
|
@@ -80,7 +80,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
80
80
|
version: '0'
|
81
81
|
requirements: []
|
82
82
|
rubyforge_project: tms
|
83
|
-
rubygems_version: 2.4.
|
83
|
+
rubygems_version: 2.4.7
|
84
84
|
signing_key:
|
85
85
|
specification_version: 4
|
86
86
|
summary: Time Machine Status
|