prometheus-client-mmap 0.20.2 → 0.20.3

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: f91fbb3a1899d0093d51d92ab8dceec80981c6160b3a09d35d90117f29e6c3d0
4
- data.tar.gz: fea591800d5a3a2344082fd38df75f35aea8b5bf5394bcd7e20bf80d14dd48fd
3
+ metadata.gz: a044be30f61b4d49820eb47e00c524ba90c3bb15ad8f6ddb97c0106eecda2839
4
+ data.tar.gz: aa953907ebd58fe257cb0f894e8d997746c61f38e1b45e3500e288fc5a3c54e2
5
5
  SHA512:
6
- metadata.gz: f6e98dda485f79a83fe614a21c52444fad33a69b208c4a6d637516c0390f79c9c54216dda50f7b151483d3e69fe4e7739ed0076984cb7497c59110f0f941b664
7
- data.tar.gz: 30bc5288dd7247222128b99a4cf88bdde9ca8625682b0d013dc5ea9cd6ce12aa5285be4b3a875f9a933dcc23e943c4b2cccc9ad9c53e273754a4dac46ddee1ed
6
+ metadata.gz: c499ccd0dc2442f9a5ffd0cab890a1f462a0f086bf818cb2af61c9533170fe6f0d6c5a84124053838c4be0a180ec8be29c114de45785c6066841fe88282628d0
7
+ data.tar.gz: 4bac46af2fff3c5d2332199c69ba78e625015bf5820089e295462a6d22d4f7ecab023ae138628f9e582c4738e97a4d77d939082993625a3d5a9a5ff9a448feb8
@@ -1,24 +1,30 @@
1
1
  require "mkmf"
2
2
  require "rb_sys/mkmf"
3
3
 
4
- create_rust_makefile("fast_mmaped_file_rs") do |r|
5
- r.auto_install_rust_toolchain = false
4
+ if find_executable('rustc')
5
+ create_rust_makefile("fast_mmaped_file_rs") do |r|
6
+ r.auto_install_rust_toolchain = false
6
7
 
7
- if enable_config('fail-on-warning')
8
- r.extra_rustflags = ["-Dwarnings"]
9
- end
8
+ if enable_config('fail-on-warning')
9
+ r.extra_rustflags = ["-Dwarnings"]
10
+ end
10
11
 
11
- if enable_config('debug')
12
- r.profile = :dev
13
- end
12
+ if enable_config('debug')
13
+ r.profile = :dev
14
+ end
15
+
16
+ if enable_config('address-sanitizer')
17
+ r.extra_rustflags = ["-Zsanitizer=address"]
18
+ end
14
19
 
15
- if enable_config('address-sanitizer')
16
- r.extra_rustflags = ["-Zsanitizer=address"]
20
+ # `rb_sys/mkmf` passes all arguments after `--` directly to `cargo rustc`.
21
+ # We use this awful hack to keep compatibility with existing flags used by
22
+ # the C implementation.
23
+ trimmed_argv = ARGV.take_while { |arg| arg != "--" }
24
+ ARGV = trimmed_argv
17
25
  end
26
+ else
27
+ puts 'rustc not found, skipping Rust extension.'
18
28
 
19
- # `rb_sys/mkmf` passes all arguments after `--` directly to `cargo rustc`.
20
- # We use this awful hack to keep compatibility with existing flags used by
21
- # the C implementation.
22
- trimmed_argv = ARGV.take_while { |arg| arg != "--" }
23
- ARGV = trimmed_argv
29
+ File.write('Makefile', dummy_makefile($srcdir).join(''))
24
30
  end
@@ -1,5 +1,5 @@
1
1
  module Prometheus
2
2
  module Client
3
- VERSION = '0.20.2'.freeze
3
+ VERSION = '0.20.3'.freeze
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: prometheus-client-mmap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.20.2
4
+ version: 0.20.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Schmidt