machine-gun 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/{machine-gun.h → darwin/x86_64/machine-gun.h} +0 -0
- data/lib/{machine-gun.so → darwin/x86_64/machine-gun.so} +0 -0
- data/lib/linux/x86_64/machine-gun.h +62 -0
- data/lib/linux/x86_64/machine-gun.so +0 -0
- data/lib/machine-gun.rb +1 -0
- data/lib/machine-gun/bridge.rb +1 -1
- data/lib/machine-gun/os.rb +34 -0
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dc753fef798acdec0fa7d91a14d75f97518cec8c
|
4
|
+
data.tar.gz: 7d086330e29a7f10064f2e6ab8fe7943e7f6df89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0370cff7e0ffdf574432732e7ea11e90ad4d029b40b885ee2db7a2bb35ae5aaf67dd1aaeef376ee54ae9f543612088d942b5d201fddc8107c6022f4238d2702b
|
7
|
+
data.tar.gz: 56707af5a8040d163aa5a5190b8f2fd7e1c479b9c91f1336e93610b4621b2616877efc7c8659503ab64e6febeb4a7ac8b113aaf10dda92ec3fcf4edaad736e15
|
File without changes
|
Binary file
|
@@ -0,0 +1,62 @@
|
|
1
|
+
/* Created by "go tool cgo" - DO NOT EDIT. */
|
2
|
+
|
3
|
+
/* package command-line-arguments */
|
4
|
+
|
5
|
+
/* Start of preamble from import "C" comments. */
|
6
|
+
|
7
|
+
|
8
|
+
#line 3 "/work/src/bridge.go"
|
9
|
+
#include <stdlib.h>
|
10
|
+
|
11
|
+
|
12
|
+
|
13
|
+
/* End of preamble from import "C" comments. */
|
14
|
+
|
15
|
+
|
16
|
+
/* Start of boilerplate cgo prologue. */
|
17
|
+
|
18
|
+
#ifndef GO_CGO_PROLOGUE_H
|
19
|
+
#define GO_CGO_PROLOGUE_H
|
20
|
+
|
21
|
+
typedef signed char GoInt8;
|
22
|
+
typedef unsigned char GoUint8;
|
23
|
+
typedef short GoInt16;
|
24
|
+
typedef unsigned short GoUint16;
|
25
|
+
typedef int GoInt32;
|
26
|
+
typedef unsigned int GoUint32;
|
27
|
+
typedef long long GoInt64;
|
28
|
+
typedef unsigned long long GoUint64;
|
29
|
+
typedef GoInt64 GoInt;
|
30
|
+
typedef GoUint64 GoUint;
|
31
|
+
typedef __SIZE_TYPE__ GoUintptr;
|
32
|
+
typedef float GoFloat32;
|
33
|
+
typedef double GoFloat64;
|
34
|
+
typedef __complex float GoComplex64;
|
35
|
+
typedef __complex double GoComplex128;
|
36
|
+
|
37
|
+
// static assertion to make sure the file is being used on architecture
|
38
|
+
// at least with matching size of GoInt.
|
39
|
+
typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
|
40
|
+
|
41
|
+
typedef struct { char *p; GoInt n; } GoString;
|
42
|
+
typedef void *GoMap;
|
43
|
+
typedef void *GoChan;
|
44
|
+
typedef struct { void *t; void *v; } GoInterface;
|
45
|
+
typedef struct { void *data; GoInt len; GoInt cap; } GoSlice;
|
46
|
+
|
47
|
+
#endif
|
48
|
+
|
49
|
+
/* End of boilerplate cgo prologue. */
|
50
|
+
|
51
|
+
#ifdef __cplusplus
|
52
|
+
extern "C" {
|
53
|
+
#endif
|
54
|
+
|
55
|
+
|
56
|
+
extern GoInt Free(void* p0);
|
57
|
+
|
58
|
+
extern GoInt BridgeCommand(char* p0, char* p1, char** p2);
|
59
|
+
|
60
|
+
#ifdef __cplusplus
|
61
|
+
}
|
62
|
+
#endif
|
Binary file
|
data/lib/machine-gun.rb
CHANGED
data/lib/machine-gun/bridge.rb
CHANGED
@@ -0,0 +1,34 @@
|
|
1
|
+
module MachineGun
|
2
|
+
module OS
|
3
|
+
class << self
|
4
|
+
def platform
|
5
|
+
RUBY_PLATFORM
|
6
|
+
end
|
7
|
+
|
8
|
+
def host
|
9
|
+
h = platform.split('-')[1]
|
10
|
+
|
11
|
+
case
|
12
|
+
when h =~ /darwin/
|
13
|
+
'darwin'
|
14
|
+
when h =~ /linux/
|
15
|
+
'linux'
|
16
|
+
else
|
17
|
+
'unknown'
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def arch
|
22
|
+
platform.split('-')[0]
|
23
|
+
end
|
24
|
+
|
25
|
+
def mac?
|
26
|
+
host =~ /darwin/i
|
27
|
+
end
|
28
|
+
|
29
|
+
def linux?
|
30
|
+
host =~ /linux/i
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: machine-gun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chakrit Wichian
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.9'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: json
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.8'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.8'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: rake
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -101,11 +115,14 @@ executables: []
|
|
101
115
|
extensions: []
|
102
116
|
extra_rdoc_files: []
|
103
117
|
files:
|
104
|
-
- lib/machine-gun.h
|
118
|
+
- lib/darwin/x86_64/machine-gun.h
|
119
|
+
- lib/darwin/x86_64/machine-gun.so
|
120
|
+
- lib/linux/x86_64/machine-gun.h
|
121
|
+
- lib/linux/x86_64/machine-gun.so
|
105
122
|
- lib/machine-gun.rb
|
106
|
-
- lib/machine-gun.so
|
107
123
|
- lib/machine-gun/bridge.rb
|
108
124
|
- lib/machine-gun/commands.rb
|
125
|
+
- lib/machine-gun/os.rb
|
109
126
|
- lib/machine-gun/request.rb
|
110
127
|
- lib/machine-gun/response.rb
|
111
128
|
homepage: https://www.omise.co
|