hoopagent 1.14.9.pre.beta6 → 1.14.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 35586d788b64c9ac30c99912f606a7ec67b45d77c985baf0ed0a90ac4efa281f
4
- data.tar.gz: c28fee9cb87fd6cf5b7e608de9e1c987459b690d3a448497faeffc3849477589
3
+ metadata.gz: a3a10fe52f895af64d4ed9a6013394f05413cbad98b6f64614e81e32190f1ecb
4
+ data.tar.gz: c926bf9933eb0b30e408c60ecce6e94a35f5e98139fcbb96f8b73f14db621695
5
5
  SHA512:
6
- metadata.gz: 5f8a64ed33314a1d41592f174611bff449d1a9eb63df92fd406a1f2e6df510f4e42ca6416fc968d44aa04f7ab1d270cf7d731c87d213bba9449a35545f85f02f
7
- data.tar.gz: 3626f0af2b752e06416a8d6c376b1a8993c29ba4b4ffef86f2e81a9fc2149b971fdb2cf3e18f80b59d997a8c7e51562cb78813c7f366bc65527e8c4727d8edc3
6
+ metadata.gz: 3b607c000ef6ef4b9a791d941b4da50964bc7b1035aebc0dbe64f0e0dd107d1cd10790d7f2a6e193d1d6f448326dadfbc620a6ea57e58cae2ab27c5baf64bc40
7
+ data.tar.gz: 570cdee6dd26cbde97f600631bce26274431c38e3e381daf9a2dc0f150da7c7db0825d3cc2a93d6d74e0d3bba6bfbf4e0578cb6f174561b69ea23333b4c3f2cd
@@ -74,8 +74,8 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
74
74
  extern "C" {
75
75
  #endif
76
76
 
77
- extern void __start_in_background(GoString dsn);
78
- extern void __start(GoString dsn);
77
+ extern void __start_in_background();
78
+ extern void __start();
79
79
 
80
80
  #ifdef __cplusplus
81
81
  }
Binary file
@@ -74,8 +74,8 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
74
74
  extern "C" {
75
75
  #endif
76
76
 
77
- extern void __start_in_background(GoString dsn);
78
- extern void __start(GoString dsn);
77
+ extern void __start_in_background();
78
+ extern void __start();
79
79
 
80
80
  #ifdef __cplusplus
81
81
  }
Binary file
data/lib/hoopagent.rb CHANGED
@@ -11,38 +11,19 @@ module HoopAgent
11
11
 
12
12
  if File.exist?(@lib_path)
13
13
  ffi_lib @lib_path
14
-
15
- class GoString < FFI::Struct
16
- layout :p, :pointer,
17
- :len, :long_long
18
- end
19
-
20
- attach_function :__start, [GoString.by_value], :void
21
- attach_function :__start_in_background, [GoString.by_value], :void
14
+ attach_function :__start, [], :void
15
+ attach_function :__start_in_background, [], :void
22
16
  else
23
17
  puts "[hoopagent] platform not supported: #{@platform}, lib_so=#{@lib_path}"
24
18
  end
25
19
 
26
- def self.start_in_background(dsn)
20
+ def self.start
21
+ # avoid to block the main thread
27
22
  if File.exist?(@lib_path)
28
23
  Thread.new do
29
- dsn = dsn.to_s
30
- gostr = HoopAgent::GoString.new
31
- gostr[:p] = FFI::MemoryPointer.from_string(dsn)
32
- gostr[:len] = dsn.size
33
- self.__start_in_background(gostr)
24
+ self.__start_in_background()
34
25
  end
35
26
  end
36
27
  end
37
28
 
38
- def self.start(dsn)
39
- if File.exist?(@lib_path)
40
- dsn = dsn.to_s
41
- gostr = HoopAgent::GoString.new
42
- gostr[:p] = FFI::MemoryPointer.from_string(dsn)
43
- gostr[:len] = dsn.size
44
- self.__start(gostr)
45
- end
46
- end
47
-
48
- end
29
+ end
@@ -74,8 +74,8 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
74
74
  extern "C" {
75
75
  #endif
76
76
 
77
- extern void __start_in_background(GoString dsn);
78
- extern void __start(GoString dsn);
77
+ extern void __start_in_background();
78
+ extern void __start();
79
79
 
80
80
  #ifdef __cplusplus
81
81
  }
Binary file
@@ -74,8 +74,8 @@ typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
74
74
  extern "C" {
75
75
  #endif
76
76
 
77
- extern void __start_in_background(GoString dsn);
78
- extern void __start(GoString dsn);
77
+ extern void __start_in_background();
78
+ extern void __start();
79
79
 
80
80
  #ifdef __cplusplus
81
81
  }
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hoopagent
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.14.9.pre.beta6
4
+ version: 1.14.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sandro Mello
@@ -54,9 +54,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
54
54
  version: '2.5'
55
55
  required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  requirements:
57
- - - ">"
57
+ - - ">="
58
58
  - !ruby/object:Gem::Version
59
- version: 1.3.1
59
+ version: '0'
60
60
  requirements: []
61
61
  rubygems_version: 3.0.3.1
62
62
  signing_key: