handsome_fencer-crypto 0.1.2 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.byebug_history +33 -0
- data/.gitignore +1 -0
- data/Gemfile.lock +64 -66
- data/handsome_fencer-crypto.gemspec +1 -2
- data/lib/handsome_fencer/crypto.rb +4 -5
- data/lib/handsome_fencer/crypto/version.rb +1 -1
- metadata +7 -22
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1a6c7fda4db46c8b96dee937c072b2b4f59d1df0117d4fdfba9d86d947436b8c
|
4
|
+
data.tar.gz: 36ec11775eca35aba8eeb9ee75cc170b3c152b792ac8920ede01477578a8d27b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0bd9107674e898bb8ccb6f344f4102d56bfc1f5568ea61c42a43c1c3d48ee70ce4519e622afe8dd90f5bb9c9c93b39e06fe00a666d192472cc7e924aae2ec071
|
7
|
+
data.tar.gz: 758332700e275b721d1b7014ffb7307a0235f23bfc197697da51cbb94b7cebd7a6e49abbc2b5c2766f694fba2c65b8e9a75b402ee954c10d77e78cb570e65005
|
data/.byebug_history
CHANGED
@@ -1,3 +1,36 @@
|
|
1
|
+
exit
|
2
|
+
eit
|
3
|
+
key_from_file
|
4
|
+
c
|
5
|
+
env
|
6
|
+
source_files(dir, ext)
|
7
|
+
c
|
8
|
+
ext
|
9
|
+
dir
|
10
|
+
c
|
11
|
+
ext
|
12
|
+
dir
|
13
|
+
env
|
14
|
+
c
|
15
|
+
exit
|
16
|
+
subject.source_files('tmp', '.env.enc')
|
17
|
+
env_files
|
18
|
+
exit
|
19
|
+
env_files
|
20
|
+
exit
|
21
|
+
dir
|
22
|
+
env
|
23
|
+
source_files(dir, ext)
|
24
|
+
ext
|
25
|
+
dir
|
26
|
+
env
|
27
|
+
self
|
28
|
+
ext
|
29
|
+
n
|
30
|
+
source_files(dir)
|
31
|
+
ext
|
32
|
+
dir
|
33
|
+
env
|
1
34
|
c
|
2
35
|
File.read(env_files.last)
|
3
36
|
env_files.last
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,48 +1,48 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
handsome_fencer-crypto (0.1.
|
4
|
+
handsome_fencer-crypto (0.1.5)
|
5
5
|
guard
|
6
6
|
guard-minitest
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
-
actionpack (
|
12
|
-
actionview (=
|
13
|
-
activesupport (=
|
14
|
-
rack (~> 2.0)
|
11
|
+
actionpack (6.0.3.2)
|
12
|
+
actionview (= 6.0.3.2)
|
13
|
+
activesupport (= 6.0.3.2)
|
14
|
+
rack (~> 2.0, >= 2.0.8)
|
15
15
|
rack-test (>= 0.6.3)
|
16
16
|
rails-dom-testing (~> 2.0)
|
17
|
-
rails-html-sanitizer (~> 1.0, >= 1.0
|
18
|
-
actionview (
|
19
|
-
activesupport (=
|
17
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
18
|
+
actionview (6.0.3.2)
|
19
|
+
activesupport (= 6.0.3.2)
|
20
20
|
builder (~> 3.1)
|
21
21
|
erubi (~> 1.4)
|
22
22
|
rails-dom-testing (~> 2.0)
|
23
|
-
rails-html-sanitizer (~> 1.
|
24
|
-
activesupport (
|
23
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
24
|
+
activesupport (6.0.3.2)
|
25
25
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
26
26
|
i18n (>= 0.7, < 2)
|
27
27
|
minitest (~> 5.1)
|
28
28
|
tzinfo (~> 1.1)
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
coderay (1.1.
|
34
|
-
concurrent-ruby (1.1.
|
35
|
-
crass (1.0.
|
29
|
+
zeitwerk (~> 2.2, >= 2.2.2)
|
30
|
+
addressable (2.7.0)
|
31
|
+
public_suffix (>= 2.0.2, < 5.0)
|
32
|
+
builder (3.2.4)
|
33
|
+
coderay (1.1.3)
|
34
|
+
concurrent-ruby (1.1.7)
|
35
|
+
crass (1.0.6)
|
36
36
|
em-websocket (0.5.1)
|
37
37
|
eventmachine (>= 0.12.9)
|
38
38
|
http_parser.rb (~> 0.6.0)
|
39
|
-
erubi (1.
|
39
|
+
erubi (1.9.0)
|
40
40
|
eventmachine (1.2.7)
|
41
|
-
ffi (1.
|
41
|
+
ffi (1.13.1)
|
42
42
|
formatador (0.2.5)
|
43
43
|
given_core (3.8.0)
|
44
44
|
sorcerer (>= 0.3.7)
|
45
|
-
guard (2.
|
45
|
+
guard (2.16.2)
|
46
46
|
formatador (>= 0.2.4)
|
47
47
|
listen (>= 2.7, < 4.0)
|
48
48
|
lumberjack (>= 1.0.12, < 2.0)
|
@@ -73,41 +73,40 @@ GEM
|
|
73
73
|
shoulda-matchers
|
74
74
|
thor
|
75
75
|
http_parser.rb (0.6.0)
|
76
|
-
i18n (1.
|
76
|
+
i18n (1.8.5)
|
77
77
|
concurrent-ruby (~> 1.0)
|
78
|
-
launchy (2.
|
79
|
-
addressable (~> 2.
|
80
|
-
listen (3.1
|
81
|
-
rb-fsevent (~> 0.
|
82
|
-
rb-inotify (~> 0.9, >= 0.9.
|
83
|
-
|
84
|
-
loofah (2.2.3)
|
78
|
+
launchy (2.5.0)
|
79
|
+
addressable (~> 2.7)
|
80
|
+
listen (3.2.1)
|
81
|
+
rb-fsevent (~> 0.10, >= 0.10.3)
|
82
|
+
rb-inotify (~> 0.9, >= 0.9.10)
|
83
|
+
loofah (2.6.0)
|
85
84
|
crass (~> 1.0.2)
|
86
85
|
nokogiri (>= 1.5.9)
|
87
|
-
lumberjack (1.
|
88
|
-
method_source (0.
|
89
|
-
mini_portile2 (2.
|
90
|
-
minitest (5.
|
86
|
+
lumberjack (1.2.7)
|
87
|
+
method_source (1.0.0)
|
88
|
+
mini_portile2 (2.4.0)
|
89
|
+
minitest (5.14.1)
|
91
90
|
minitest-given (3.8.0)
|
92
91
|
given_core (= 3.8.0)
|
93
92
|
minitest (> 4.3)
|
94
93
|
minitest-matchers_vaccine (1.0.4)
|
95
94
|
minitest (~> 5.0)
|
96
|
-
minitest-rails (
|
97
|
-
minitest (~> 5.
|
98
|
-
railties (~>
|
99
|
-
multi_json (1.
|
95
|
+
minitest-rails (6.0.1)
|
96
|
+
minitest (~> 5.10)
|
97
|
+
railties (~> 6.0.0)
|
98
|
+
multi_json (1.15.0)
|
100
99
|
nenv (0.3.0)
|
101
|
-
nokogiri (1.
|
102
|
-
mini_portile2 (~> 2.
|
103
|
-
notiffany (0.1.
|
100
|
+
nokogiri (1.10.10)
|
101
|
+
mini_portile2 (~> 2.4.0)
|
102
|
+
notiffany (0.1.3)
|
104
103
|
nenv (~> 0.1)
|
105
104
|
shellany (~> 0.0)
|
106
|
-
pry (0.
|
107
|
-
coderay (~> 1.1
|
108
|
-
method_source (~>
|
109
|
-
public_suffix (
|
110
|
-
rack (2.
|
105
|
+
pry (0.13.1)
|
106
|
+
coderay (~> 1.1)
|
107
|
+
method_source (~> 1.0)
|
108
|
+
public_suffix (4.0.5)
|
109
|
+
rack (2.2.3)
|
111
110
|
rack-livereload (0.3.17)
|
112
111
|
rack
|
113
112
|
rack-test (1.1.0)
|
@@ -115,41 +114,40 @@ GEM
|
|
115
114
|
rails-dom-testing (2.0.3)
|
116
115
|
activesupport (>= 4.2.0)
|
117
116
|
nokogiri (>= 1.6)
|
118
|
-
rails-html-sanitizer (1.0
|
119
|
-
loofah (~> 2.
|
120
|
-
railties (
|
121
|
-
actionpack (=
|
122
|
-
activesupport (=
|
117
|
+
rails-html-sanitizer (1.3.0)
|
118
|
+
loofah (~> 2.3)
|
119
|
+
railties (6.0.3.2)
|
120
|
+
actionpack (= 6.0.3.2)
|
121
|
+
activesupport (= 6.0.3.2)
|
123
122
|
method_source
|
124
123
|
rake (>= 0.8.7)
|
125
|
-
thor (>= 0.
|
124
|
+
thor (>= 0.20.3, < 2.0)
|
126
125
|
rake (10.5.0)
|
127
|
-
rb-fsevent (0.10.
|
128
|
-
rb-inotify (0.
|
129
|
-
ffi (
|
130
|
-
ruby_dep (1.5.0)
|
126
|
+
rb-fsevent (0.10.4)
|
127
|
+
rb-inotify (0.10.1)
|
128
|
+
ffi (~> 1.0)
|
131
129
|
shellany (0.0.1)
|
132
|
-
shoulda (
|
133
|
-
shoulda-context (~>
|
134
|
-
shoulda-matchers (~>
|
135
|
-
shoulda-context (
|
136
|
-
shoulda-matchers (3.
|
137
|
-
activesupport (>= 4.
|
138
|
-
sorcerer (
|
139
|
-
thor (0.
|
130
|
+
shoulda (4.0.0)
|
131
|
+
shoulda-context (~> 2.0)
|
132
|
+
shoulda-matchers (~> 4.0)
|
133
|
+
shoulda-context (2.0.0)
|
134
|
+
shoulda-matchers (4.3.0)
|
135
|
+
activesupport (>= 4.2.0)
|
136
|
+
sorcerer (2.0.1)
|
137
|
+
thor (1.0.1)
|
140
138
|
thread_safe (0.3.6)
|
141
|
-
tzinfo (1.2.
|
139
|
+
tzinfo (1.2.7)
|
142
140
|
thread_safe (~> 0.1)
|
141
|
+
zeitwerk (2.4.0)
|
143
142
|
|
144
143
|
PLATFORMS
|
145
144
|
ruby
|
146
145
|
|
147
146
|
DEPENDENCIES
|
148
|
-
bundler
|
149
|
-
byebug
|
147
|
+
bundler
|
150
148
|
handsome_fencer-crypto!
|
151
149
|
handsome_fencer-test
|
152
150
|
rake (~> 10.0)
|
153
151
|
|
154
152
|
BUNDLED WITH
|
155
|
-
1.
|
153
|
+
2.1.4
|
@@ -29,8 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_dependency "guard"
|
30
30
|
spec.add_dependency "guard-minitest"
|
31
31
|
|
32
|
-
spec.add_development_dependency "bundler"
|
32
|
+
spec.add_development_dependency "bundler"
|
33
33
|
spec.add_development_dependency "rake", "~> 10.0"
|
34
34
|
spec.add_development_dependency "handsome_fencer-test"
|
35
|
-
spec.add_development_dependency "byebug"
|
36
35
|
end
|
@@ -1,7 +1,7 @@
|
|
1
|
+
|
1
2
|
require "handsome_fencer/crypto/version"
|
2
3
|
require "openssl"
|
3
4
|
require "base64"
|
4
|
-
|
5
5
|
module HandsomeFencer::Crypto
|
6
6
|
|
7
7
|
class << self
|
@@ -50,13 +50,12 @@ module HandsomeFencer::Crypto
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def obfuscate(env=nil, dir=nil, ext=nil)
|
53
|
-
ext = ext ||
|
53
|
+
ext = ext || "#{env}.env"
|
54
54
|
source_files(dir, ext).each { |file| encrypt(file, env) }
|
55
55
|
end
|
56
56
|
|
57
57
|
def expose(env=nil, dir=nil, ext=nil)
|
58
|
-
ext = ext ||
|
59
|
-
dir = dir || 'docker'
|
58
|
+
ext = ext || "#{env}.env.enc"
|
60
59
|
source_files(dir, ext).each { |file| decrypt(file, env) }
|
61
60
|
end
|
62
61
|
|
@@ -69,7 +68,7 @@ module HandsomeFencer::Crypto
|
|
69
68
|
when ENV[env_key]
|
70
69
|
ENV[env_key]
|
71
70
|
when File.exist?(key_file)
|
72
|
-
File.read(key_file)
|
71
|
+
File.read(key_file).strip
|
73
72
|
end
|
74
73
|
end
|
75
74
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: handsome_fencer-crypto
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- schadenfred
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard
|
@@ -42,16 +42,16 @@ dependencies:
|
|
42
42
|
name: bundler
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rake
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,20 +80,6 @@ dependencies:
|
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: byebug
|
85
|
-
requirement: !ruby/object:Gem::Requirement
|
86
|
-
requirements:
|
87
|
-
- - ">="
|
88
|
-
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
90
|
-
type: :development
|
91
|
-
prerelease: false
|
92
|
-
version_requirements: !ruby/object:Gem::Requirement
|
93
|
-
requirements:
|
94
|
-
- - ">="
|
95
|
-
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
97
83
|
description: Used by HFCI.
|
98
84
|
email:
|
99
85
|
- fred.schoeneman@gmail.com
|
@@ -135,8 +121,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
121
|
- !ruby/object:Gem::Version
|
136
122
|
version: '0'
|
137
123
|
requirements: []
|
138
|
-
|
139
|
-
rubygems_version: 2.7.7
|
124
|
+
rubygems_version: 3.1.4
|
140
125
|
signing_key:
|
141
126
|
specification_version: 4
|
142
127
|
summary: Crypto using OpenSSL
|