leeloo 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/leeloo/command.rb +32 -9
- data/lib/leeloo/controller.rb +2 -2
- data/lib/leeloo/keystore.rb +1 -0
- data/lib/leeloo/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd35144ab160594e6b4c3d05ea7eeaf175cc99fb79fc3b93cea31000df120ab3
|
4
|
+
data.tar.gz: 32537a5e8670c43d6463e1d713a61f49a7601d435957ecd98eeaf48c2a8658bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8469474876e92a015bce39b25cfc418c1f9d55b763b8de44763121eb4e379c64716c43b2fd2789c536cf0a8891e828e0c1782519ae3d549054f8527a2bd2c50a
|
7
|
+
data.tar.gz: d98949b84ac056b71302f038748da0ad6986a81af3a63fad52b73c7db204c91d87e8cd4b4b6db02c4049e379a9817278b77d453bf04b53f6f46089317e12c907
|
data/lib/leeloo/command.rb
CHANGED
@@ -43,6 +43,11 @@ module Leeloo
|
|
43
43
|
end
|
44
44
|
end
|
45
45
|
|
46
|
+
command :init do |c|
|
47
|
+
c.syntax = 'leeloo init'
|
48
|
+
c.description = "Just to be compatible with passwordstore.org"
|
49
|
+
end
|
50
|
+
|
46
51
|
command :list do |c|
|
47
52
|
c.syntax = 'leeloo list [options]'
|
48
53
|
c.description = "Display secrets list of stored on a keystore"
|
@@ -79,7 +84,7 @@ module Leeloo
|
|
79
84
|
end
|
80
85
|
end
|
81
86
|
|
82
|
-
command "keystore remove" do |c|
|
87
|
+
command :"keystore remove" do |c|
|
83
88
|
c.syntax = 'leeloo keystore remove <name>'
|
84
89
|
c.description = "remove a keystore (path/to/keystore is not destroyed)"
|
85
90
|
|
@@ -92,7 +97,7 @@ module Leeloo
|
|
92
97
|
end
|
93
98
|
end
|
94
99
|
|
95
|
-
command "keystore add" do |c|
|
100
|
+
command :"keystore add" do |c|
|
96
101
|
c.syntax = 'leeloo keystore add <name> <path/to/keystore>'
|
97
102
|
c.description = "add a keystore"
|
98
103
|
|
@@ -106,7 +111,7 @@ module Leeloo
|
|
106
111
|
end
|
107
112
|
end
|
108
113
|
|
109
|
-
command "keystore default" do |c|
|
114
|
+
command :"keystore default" do |c|
|
110
115
|
c.syntax = 'leeloo keystore default name'
|
111
116
|
c.description = "set the default keystore"
|
112
117
|
|
@@ -131,7 +136,7 @@ module Leeloo
|
|
131
136
|
end
|
132
137
|
end
|
133
138
|
|
134
|
-
command "key sync" do |c|
|
139
|
+
command :"key sync" do |c|
|
135
140
|
c.syntax = 'leeloo keys sync'
|
136
141
|
c.description = "synchronize secrets with keys"
|
137
142
|
c.option '--keystore STRING', String, 'a selected keystore'
|
@@ -143,7 +148,7 @@ module Leeloo
|
|
143
148
|
end
|
144
149
|
end
|
145
150
|
|
146
|
-
command "key add" do |c|
|
151
|
+
command :"key add" do |c|
|
147
152
|
c.syntax = 'leeloo key add <email>'
|
148
153
|
c.description = "add a dedicated key"
|
149
154
|
c.option '--keystore STRING', String, 'a selected keystore'
|
@@ -157,7 +162,7 @@ module Leeloo
|
|
157
162
|
end
|
158
163
|
end
|
159
164
|
|
160
|
-
command "key remove" do |c|
|
165
|
+
command :"key remove" do |c|
|
161
166
|
c.syntax = 'leeloo key remove <email>'
|
162
167
|
c.description = "remove a dedicated key"
|
163
168
|
c.option '--keystore STRING', String, 'a selected keystore'
|
@@ -202,6 +207,23 @@ module Leeloo
|
|
202
207
|
ctl.display
|
203
208
|
end
|
204
209
|
end
|
210
|
+
alias_command :insert, :write
|
211
|
+
|
212
|
+
command :generate do |c|
|
213
|
+
c.syntax = 'leeloo generate <name> <number of randomized characters>'
|
214
|
+
c.description = "Generate a secret from a keystore"
|
215
|
+
c.option '--keystore STRING', String, 'a selected keystore'
|
216
|
+
c.option '--clipboard', nil, 'copy to clipboard'
|
217
|
+
|
218
|
+
c.action do |args, options|
|
219
|
+
abort "name or number are missing" unless args.length == 2
|
220
|
+
name = args.first
|
221
|
+
options.__hash__[:generate] = args.last.to_i
|
222
|
+
ctl = SecretController.new(options)
|
223
|
+
ctl.write(name)
|
224
|
+
ctl.display
|
225
|
+
end
|
226
|
+
end
|
205
227
|
|
206
228
|
command :translate do |c|
|
207
229
|
c.syntax = 'leeloo translate'
|
@@ -229,8 +251,9 @@ module Leeloo
|
|
229
251
|
puts "done."
|
230
252
|
end
|
231
253
|
end
|
254
|
+
alias_command :rm, :remove
|
232
255
|
|
233
|
-
command "keystore sync" do |c|
|
256
|
+
command :"keystore sync" do |c|
|
234
257
|
c.syntax = 'leeloo sync'
|
235
258
|
c.description = "Synchronize a keystore"
|
236
259
|
c.option '--keystore STRING', String, 'a selected keystore'
|
@@ -242,7 +265,7 @@ module Leeloo
|
|
242
265
|
end
|
243
266
|
end
|
244
267
|
|
245
|
-
command "keystore export" do |c|
|
268
|
+
command :"keystore export" do |c|
|
246
269
|
c.syntax = 'leeloo export'
|
247
270
|
c.description = "Export all secrets from a keystore"
|
248
271
|
c.option '--keystore STRING', String, 'a selected keystore'
|
@@ -253,7 +276,7 @@ module Leeloo
|
|
253
276
|
end
|
254
277
|
end
|
255
278
|
|
256
|
-
command "keystore init" do |c|
|
279
|
+
command :"keystore init" do |c|
|
257
280
|
c.syntax = 'leeloo init'
|
258
281
|
c.description = "Initialize a keystore"
|
259
282
|
c.option '--keystore STRING', String, 'a selected keystore'
|
data/lib/leeloo/controller.rb
CHANGED
@@ -83,8 +83,8 @@ module Leeloo
|
|
83
83
|
phrase = SecureRandom.base64(32).truncate(@options.generate.to_i) if @options.generate
|
84
84
|
|
85
85
|
unless phrase
|
86
|
-
phrase = password "
|
87
|
-
confirm = password "
|
86
|
+
phrase = password "Enter password for #{name}"
|
87
|
+
confirm = password "Confirm it"
|
88
88
|
abort "not the same secret" unless phrase == confirm
|
89
89
|
end
|
90
90
|
|
data/lib/leeloo/keystore.rb
CHANGED
data/lib/leeloo/version.rb
CHANGED