envkey 0.1.2 → 0.1.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
  SHA1:
3
- metadata.gz: 10e6bcd4fd2315011afab684c5cdf0a5d312e323
4
- data.tar.gz: a6ac1ebe0132ab81ce7b54a518ae70d9b2604f8c
3
+ metadata.gz: 7d8aac6d61b252bd3ab99924fb159cd96c341b16
4
+ data.tar.gz: 4ea21cce545ffa7328fcc5d67e9c1416f4dfdbf6
5
5
  SHA512:
6
- metadata.gz: f4c306aa7c74847060d4e7087b4f729efcb074eb7a863cc45e5f52a7184fce3a156473e153d2c6516ce6990fcb615f743f6949a63fba00738554f9c74431058c
7
- data.tar.gz: 99be5b26009749a9a4a3a429418a2878a4b1fb009fc37c12e61d949fe6c29f190c9eea4352a70c16d6c7927ee8eef3123724524d9135d3356dd338a1a209747a
6
+ metadata.gz: 4e31d8e8d8228b2306e0593cbc6f5e996e620c51426c072925b73baa59e9709e7659d5fa5ef750ab837933442327c2b6b10c800b0edd9f61a53c8f15132b33f1
7
+ data.tar.gz: 7313abb50a81c84b6753891c32f6b5904d95dae9df6c4e60cb8a922c35ff453ee450d6027eda486ffd70c39305d864f26cc21dd060d0be35c418c38f2e4b7abb
data/envkey.gemspec CHANGED
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Dane Schneider"]
10
10
  spec.email = ["dane@envkey.com"]
11
11
 
12
- spec.summary = "Envkey secures and simplifies app secrets and config by storing it in an encrypted vault and granting access to developers and servers."#%q{TODO: Write a short summary, because Rubygems requires one.}
12
+ spec.summary = "Envkey secures and simplifies app secrets and config by storing it in an encrypted vault and granting access to developers and servers."
13
13
  # spec.description = ""#%q{TODO: Write a longer description or delete this line.}
14
14
  spec.homepage = "https://www.envkey.com"
15
15
  spec.license = "MIT"
Binary file
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt32 GoInt;
28
+ typedef GoUint32 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
@@ -1,6 +1,6 @@
1
1
  /* Created by "go tool cgo" - DO NOT EDIT. */
2
2
 
3
- /* package command-line-arguments */
3
+ /* package envkey/envkey-go-shared */
4
4
 
5
5
  /* Start of preamble from import "C" comments. */
6
6
 
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt32 GoInt;
28
+ typedef GoUint32 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt64 GoInt;
28
+ typedef GoUint64 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt32 GoInt;
28
+ typedef GoUint32 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt32 GoInt;
28
+ typedef GoUint32 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt32 GoInt;
28
+ typedef GoUint32 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_32_bit_pointer_matching_GoInt[sizeof(void*)==32/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
@@ -0,0 +1,60 @@
1
+ /* Created by "go tool cgo" - DO NOT EDIT. */
2
+
3
+ /* package envkey/envkey-go-shared */
4
+
5
+ /* Start of preamble from import "C" comments. */
6
+
7
+
8
+
9
+
10
+ /* End of preamble from import "C" comments. */
11
+
12
+
13
+ /* Start of boilerplate cgo prologue. */
14
+ #line 1 "cgo-gcc-export-header-prolog"
15
+
16
+ #ifndef GO_CGO_PROLOGUE_H
17
+ #define GO_CGO_PROLOGUE_H
18
+
19
+ typedef signed char GoInt8;
20
+ typedef unsigned char GoUint8;
21
+ typedef short GoInt16;
22
+ typedef unsigned short GoUint16;
23
+ typedef int GoInt32;
24
+ typedef unsigned int GoUint32;
25
+ typedef long long GoInt64;
26
+ typedef unsigned long long GoUint64;
27
+ typedef GoInt64 GoInt;
28
+ typedef GoUint64 GoUint;
29
+ typedef __SIZE_TYPE__ GoUintptr;
30
+ typedef float GoFloat32;
31
+ typedef double GoFloat64;
32
+ typedef float _Complex GoComplex64;
33
+ typedef double _Complex GoComplex128;
34
+
35
+ /*
36
+ static assertion to make sure the file is being used on architecture
37
+ at least with matching size of GoInt.
38
+ */
39
+ typedef char _check_for_64_bit_pointer_matching_GoInt[sizeof(void*)==64/8 ? 1:-1];
40
+
41
+ typedef struct { const 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 char* EnvJson(char* p0);
57
+
58
+ #ifdef __cplusplus
59
+ }
60
+ #endif
Binary file
data/lib/envkey/core.rb CHANGED
@@ -2,6 +2,8 @@ require 'ffi'
2
2
  require 'dotenv'
3
3
  require 'json'
4
4
  require 'set'
5
+ require 'envkey/platform'
6
+ require "byebug"
5
7
 
6
8
  module Envkey::Core
7
9
  extend FFI::Library
@@ -24,10 +26,15 @@ module Envkey::Core
24
26
  fork do
25
27
  reader.close
26
28
 
27
- ffi_lib File.expand_path('../../ext/envkey.so', File.dirname(__FILE__))
28
- attach_function :EnvJson, [:pointer], :string
29
+ begin
30
+ ffi_lib Envkey::Platform.lib_paths
31
+ attach_function :EnvJson, [:pointer], :string
32
+ rescue
33
+ raise "There was a problem loading Envkey on your platform."
34
+ end
29
35
 
30
36
  json = EnvJson(FFI::MemoryPointer.from_string(key))
37
+
31
38
  writer.puts json
32
39
  end
33
40
 
@@ -50,7 +57,7 @@ module Envkey::Core
50
57
  end
51
58
  return [Set.new(updated_dotenv_vars), Set.new(updated_envkey_vars)]
52
59
  else
53
- raise "Envkey invalid. Couldn't load env."
60
+ raise "Envkey invalid. Couldn't load vars."
54
61
  end
55
62
  end
56
63
  end
@@ -0,0 +1,34 @@
1
+ module Envkey::Platform
2
+
3
+ def self.lib_paths
4
+ lib_filenames.map do |fn|
5
+ File.expand_path("../../ext/#{fn}", File.dirname(__FILE__))
6
+ end
7
+ end
8
+
9
+ def self.lib_filenames
10
+ is_unix, os, arch, extension = [FFI::Platform.unix?, FFI::Platform::OS, FFI::Platform::ARCH, FFI::Platform::LIBSUFFIX]
11
+
12
+ platform_parts =
13
+ if !is_unix
14
+ raise "Envkey currently only supports unix and OSX platforms"
15
+ elsif os == "darwin"
16
+ if arch == "x86_64"
17
+ ["darwin-10.6-amd64"]
18
+ else
19
+ ["darwin-10.6-386"]
20
+ end
21
+ else
22
+ if arch == "x86_64"
23
+ ["linux-amd64", "linux-arm64"]
24
+ elsif arch == "i386"
25
+ ["linux-386"]
26
+ else
27
+ %w(arm64 arm-7 arm-6 arm-5).map {|s| "linux-#{s}"}
28
+ end
29
+ end
30
+
31
+ platform_parts.map {|part| "envkey-#{part}.#{extension}"}
32
+ end
33
+
34
+ end
@@ -1,3 +1,3 @@
1
1
  module Envkey
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: envkey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dane Schneider
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-03-18 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -97,11 +97,26 @@ files:
97
97
  - bin/console
98
98
  - bin/setup
99
99
  - envkey.gemspec
100
+ - ext/envkey-darwin-10.6-386.dylib
101
+ - ext/envkey-darwin-10.6-386.h
102
+ - ext/envkey-darwin-10.6-amd64.dylib
103
+ - ext/envkey-darwin-10.6-amd64.h
104
+ - ext/envkey-linux-386.h
105
+ - ext/envkey-linux-386.so
106
+ - ext/envkey-linux-amd64.h
107
+ - ext/envkey-linux-amd64.so
108
+ - ext/envkey-linux-arm-5.h
109
+ - ext/envkey-linux-arm-5.so
110
+ - ext/envkey-linux-arm-6.h
111
+ - ext/envkey-linux-arm-6.so
112
+ - ext/envkey-linux-arm-7.h
113
+ - ext/envkey-linux-arm-7.so
114
+ - ext/envkey-linux-arm64.h
115
+ - ext/envkey-linux-arm64.so
100
116
  - ext/envkey.go
101
- - ext/envkey.h
102
- - ext/envkey.so
103
117
  - lib/envkey.rb
104
118
  - lib/envkey/core.rb
119
+ - lib/envkey/platform.rb
105
120
  - lib/envkey/rails.rb
106
121
  - lib/envkey/version.rb
107
122
  homepage: https://www.envkey.com
data/ext/envkey.so DELETED
Binary file