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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 15caadb79fe6ab8a376ce92b0ce89f290f820474763d614eea58e5add2eb91e7
4
- data.tar.gz: e4346aaaf057fa9020221a60bc1ae1a647c65d56d3adeec0352511502458deb6
3
+ metadata.gz: 1a6c7fda4db46c8b96dee937c072b2b4f59d1df0117d4fdfba9d86d947436b8c
4
+ data.tar.gz: 36ec11775eca35aba8eeb9ee75cc170b3c152b792ac8920ede01477578a8d27b
5
5
  SHA512:
6
- metadata.gz: fc9953504bd1e9289d0951a0344f8850e81168c89038c6c46d023efb88d68f0c7fac42f51504cc0e2f25dc0aa34016f56c3fa03a469fb94fef1b824d44499f98
7
- data.tar.gz: a5846eb11ae4a31ce56dc8330df5928cc85865d715afeca76893a14a0294d14e1044c24dd397c1adb306740c38342980649c8d29ffa971f005d1b6a5e86fc2c3
6
+ metadata.gz: 0bd9107674e898bb8ccb6f344f4102d56bfc1f5568ea61c42a43c1c3d48ee70ce4519e622afe8dd90f5bb9c9c93b39e06fe00a666d192472cc7e924aae2ec071
7
+ data.tar.gz: 758332700e275b721d1b7014ffb7307a0235f23bfc197697da51cbb94b7cebd7a6e49abbc2b5c2766f694fba2c65b8e9a75b402ee954c10d77e78cb570e65005
@@ -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
@@ -6,3 +6,4 @@
6
6
  /pkg/
7
7
  /spec/reports/
8
8
  /tmp/
9
+ .byebug_history
@@ -1,48 +1,48 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- handsome_fencer-crypto (0.1.0)
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 (5.2.2)
12
- actionview (= 5.2.2)
13
- activesupport (= 5.2.2)
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.2)
18
- actionview (5.2.2)
19
- activesupport (= 5.2.2)
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.0, >= 1.0.3)
24
- activesupport (5.2.2)
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
- addressable (2.5.2)
30
- public_suffix (>= 2.0.2, < 4.0)
31
- builder (3.2.3)
32
- byebug (10.0.2)
33
- coderay (1.1.2)
34
- concurrent-ruby (1.1.3)
35
- crass (1.0.4)
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.7.1)
39
+ erubi (1.9.0)
40
40
  eventmachine (1.2.7)
41
- ffi (1.9.25)
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.15.0)
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.2.0)
76
+ i18n (1.8.5)
77
77
  concurrent-ruby (~> 1.0)
78
- launchy (2.4.3)
79
- addressable (~> 2.3)
80
- listen (3.1.5)
81
- rb-fsevent (~> 0.9, >= 0.9.4)
82
- rb-inotify (~> 0.9, >= 0.9.7)
83
- ruby_dep (~> 1.2)
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.0.13)
88
- method_source (0.9.2)
89
- mini_portile2 (2.3.0)
90
- minitest (5.11.3)
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 (3.0.0)
97
- minitest (~> 5.8)
98
- railties (~> 5.0)
99
- multi_json (1.13.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.8.5)
102
- mini_portile2 (~> 2.3.0)
103
- notiffany (0.1.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.12.2)
107
- coderay (~> 1.1.0)
108
- method_source (~> 0.9.0)
109
- public_suffix (3.0.3)
110
- rack (2.0.6)
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.4)
119
- loofah (~> 2.2, >= 2.2.2)
120
- railties (5.2.2)
121
- actionpack (= 5.2.2)
122
- activesupport (= 5.2.2)
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.19.0, < 2.0)
124
+ thor (>= 0.20.3, < 2.0)
126
125
  rake (10.5.0)
127
- rb-fsevent (0.10.3)
128
- rb-inotify (0.9.10)
129
- ffi (>= 0.5.0, < 2)
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 (3.6.0)
133
- shoulda-context (~> 1.0, >= 1.0.1)
134
- shoulda-matchers (~> 3.0)
135
- shoulda-context (1.2.2)
136
- shoulda-matchers (3.1.2)
137
- activesupport (>= 4.0.0)
138
- sorcerer (1.0.2)
139
- thor (0.20.3)
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.5)
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 (~> 1.17)
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.17.2
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", "~> 1.17"
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 || '.env'
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 || '.env.enc'
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
@@ -1,5 +1,5 @@
1
1
  module HandsomeFencer
2
2
  module Crypto
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.7"
4
4
  end
5
5
  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.2
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: 2018-12-31 00:00:00.000000000 Z
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: '1.17'
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: '1.17'
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
- rubyforge_project:
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