bootsnap 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bootsnap.gemspec +1 -1
- data/ext/bootsnap/bootsnap.c +20 -1
- data/lib/bootsnap/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcd86efa96cf97561bb9f618b9be5a15394b764f
|
4
|
+
data.tar.gz: d6855e9fab0efbde45d0da337b2c6e63e4d272b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4ad490b42d042304a9983fa0468ba202c5c494485e5e22215341c1b07b219a220fedec2c02b3f402a39b94a9eb953b2ba341e5c39fad4bc2681e5d9a5aa3445
|
7
|
+
data.tar.gz: 898ac7f4a00be925525bcee53ef03be8d9a2c022bff4afe9909f7dee339dd822c71b5c72b4c24a54605bd1c5f73ef342da5d82553b49a243c37351bd007db9f2
|
data/bootsnap.gemspec
CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.require_paths = ["lib"]
|
24
24
|
spec.extensions = ['ext/bootsnap/extconf.rb']
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", '~>
|
26
|
+
spec.add_development_dependency "bundler", '~> 1'
|
27
27
|
spec.add_development_dependency 'rake', '~> 10.0'
|
28
28
|
spec.add_development_dependency 'rake-compiler', '~> 0'
|
29
29
|
spec.add_development_dependency "minitest", "~> 5.0"
|
data/ext/bootsnap/bootsnap.c
CHANGED
@@ -9,6 +9,8 @@
|
|
9
9
|
#include <utime.h>
|
10
10
|
|
11
11
|
#ifdef __APPLE__
|
12
|
+
// Used for the OS Directives to define the os_version constant
|
13
|
+
#include <Availability.h>
|
12
14
|
#define _ENOATTR ENOATTR
|
13
15
|
#else
|
14
16
|
#define _ENOATTR ENODATA
|
@@ -47,6 +49,7 @@ static struct stats stats = {
|
|
47
49
|
|
48
50
|
struct xattr_key {
|
49
51
|
uint8_t version;
|
52
|
+
uint8_t os_version;
|
50
53
|
uint32_t compile_option;
|
51
54
|
uint32_t data_size;
|
52
55
|
uint32_t ruby_revision;
|
@@ -69,11 +72,25 @@ struct s2o_data {
|
|
69
72
|
VALUE storage_data;
|
70
73
|
};
|
71
74
|
|
72
|
-
static const uint8_t current_version =
|
75
|
+
static const uint8_t current_version = 11;
|
73
76
|
static const char * xattr_key_name = "user.aotcc.key";
|
74
77
|
static const char * xattr_data_name = "user.aotcc.value";
|
75
78
|
static const size_t xattr_key_size = sizeof (struct xattr_key);
|
76
79
|
|
80
|
+
#ifdef __MAC_10_15 // Mac OS 10.15 (future)
|
81
|
+
static const int os_version = 15;
|
82
|
+
#elif __MAC_10_14 // Mac OS 10.14 (future)
|
83
|
+
static const int os_version = 14;
|
84
|
+
#elif __MAC_10_13 // Mac OS 10.13 (future)
|
85
|
+
static const int os_version = 13;
|
86
|
+
#elif __MAC_10_12 // Mac OS X Sierra
|
87
|
+
static const int os_version = 12;
|
88
|
+
#elif __MAC_10_11 // Mac OS X El Capitan
|
89
|
+
static const int os_version = 11;
|
90
|
+
# else
|
91
|
+
static const int os_version = 0;
|
92
|
+
#endif
|
93
|
+
|
77
94
|
#ifdef __APPLE__
|
78
95
|
#define GETXATTR_TRAILER ,0,0
|
79
96
|
#define SETXATTR_TRAILER ,0
|
@@ -365,6 +382,7 @@ bs_update_key(int fd, uint32_t data_size, uint64_t current_mtime)
|
|
365
382
|
|
366
383
|
xattr_key = (struct xattr_key){
|
367
384
|
.version = current_version,
|
385
|
+
.os_version = os_version,
|
368
386
|
.data_size = data_size,
|
369
387
|
.compile_option = current_compile_option_crc32,
|
370
388
|
.ruby_revision = current_ruby_revision,
|
@@ -414,6 +432,7 @@ bs_get_cache(int fd, struct xattr_key * key)
|
|
414
432
|
|
415
433
|
return (nbytes == (ssize_t)xattr_key_size && \
|
416
434
|
key->version == current_version && \
|
435
|
+
key->os_version == os_version && \
|
417
436
|
key->compile_option == current_compile_option_crc32 && \
|
418
437
|
key->ruby_revision == current_ruby_revision);
|
419
438
|
}
|
data/lib/bootsnap/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootsnap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Burke Libbey
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-04-
|
11
|
+
date: 2017-04-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|