leeloo 0.0.11 → 0.0.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ce89a8b48445f8a5afe2487a5ed49a8d0c3ec44c
4
- data.tar.gz: 268ef25fd70970d0d19e0426b062ed104d0ae362
3
+ metadata.gz: c044cef076062d633873f9c1a812dc0084259940
4
+ data.tar.gz: 3d3aa9a54d56da390205084043d79935ff81d386
5
5
  SHA512:
6
- metadata.gz: 6038afa0d03ed117af88448ed7d234e60f3a16804c02ca5261f431671da6f134cfad761bcb31e98b6d8c782775b74ba2cbcc40ab5cc7eaf4a217bcc282d96b4f
7
- data.tar.gz: 3cb154d289f0f9a97641c2a4a480de6963ed784642372501dbafe56181655d3c88f5c4c088c9494f7f4702a29a11578e743e471fa1f8912df2e07af5be3cb5c9
6
+ metadata.gz: 78ea8bb68bf2cac5db3873d1a066f9c34c3201dc191612bbc0d4e16fe86883310c5386af3317998e805af32974122e17b3d43a4926f8ccb170b7e7d33474b8ee
7
+ data.tar.gz: 7b3f61659972cbe48a25a285afb107d274d85ea516587b57426964e36d2c7bd3d0e8601a9bbd4bd61239a1894cd72e735a1a3456a192b517fa8aef3dd777b126
@@ -30,7 +30,7 @@ module Leeloo
30
30
  end
31
31
 
32
32
  command :"list-keystore" do |c|
33
- c.syntax = 'leeloo list'
33
+ c.syntax = 'leeloo keystore'
34
34
  c.description = "Display keystores list"
35
35
  c.option '--ascii', nil, 'display secrets without unicode tree'
36
36
 
@@ -42,7 +42,7 @@ module Leeloo
42
42
  alias_command :keystore, :"list-keystore"
43
43
 
44
44
  command :"list-secret" do |c|
45
- c.syntax = 'leeloo list secret [options]'
45
+ c.syntax = 'leeloo list [options]'
46
46
  c.description = "Display secrets list of keystore"
47
47
  c.option '--keystore STRING', String, 'a selected keystore'
48
48
  c.option '--ascii', nil, 'display secrets without unicode tree'
@@ -57,7 +57,7 @@ module Leeloo
57
57
  alias_command :secrets, :"list-secret"
58
58
 
59
59
  command :"add-keystore" do |c|
60
- c.syntax = 'leeloo add keystore <name> <path>'
60
+ c.syntax = 'leeloo add-keystore <name> <path>'
61
61
  c.description = "Add a new keystore"
62
62
 
63
63
  c.action do |args, options|
@@ -72,21 +72,34 @@ module Leeloo
72
72
  end
73
73
  end
74
74
 
75
+ command :"push-keystore" do |c|
76
+ c.syntax = "leeloo push"
77
+ c.description = "push secrets to git repository (if configured)"
78
+ c.option '--keystore STRING', String, 'a selected keystore'
79
+
80
+ c.action do |args, options|
81
+ options.default :keystore => Config.default['keystore']
82
+ Keystore.sync_keystore Config.get_keystore(options.keystore)
83
+ say "secrets pushed successfully"
84
+ end
85
+ end
86
+ alias_command :push, :"push-keystore"
87
+
75
88
  command :"sync-secret" do |c|
76
- c.syntax = 'leeloo recrypt secrets'
89
+ c.syntax = 'leeloo sync secrets'
77
90
  c.description = "(re)sync all secrets from a given keystore"
78
91
  c.option '--keystore STRING', String, 'a selected keystore'
79
92
 
80
93
  c.action do |args, options|
81
94
  options.default :keystore => Config.default['keystore']
82
95
  Secret.sync_secrets Config.get_keystore(options.keystore)
83
- say "keystore synced successfully"
96
+ say "secrets synced successfully"
84
97
  end
85
98
  end
86
99
  alias_command :sync, :"sync-secret"
87
100
 
88
101
  command :"add-secret" do |c|
89
- c.syntax = 'leeloo add secret <name>'
102
+ c.syntax = 'leeloo add <name>'
90
103
  c.description = "Add a new secret in a keystore"
91
104
  c.option '--keystore STRING', String, 'a selected keystore'
92
105
  c.option '--generate INTEGER', Integer, 'a number of randomized characters'
@@ -121,7 +134,7 @@ module Leeloo
121
134
  alias_command :set, :"add-secret"
122
135
 
123
136
  command :"read-secret" do |c|
124
- c.syntax = 'leeloo read secret <name>'
137
+ c.syntax = 'leeloo read <name>'
125
138
  c.description = "Display a secret from a keystore"
126
139
  c.option '--keystore STRING', String, 'a selected keystore'
127
140
  c.option '--clipboard', nil, 'copy to clipboard'
@@ -146,7 +159,7 @@ module Leeloo
146
159
  end
147
160
 
148
161
  command :"remove-secret" do |c|
149
- c.syntax = 'leeloo remove secret <name>'
162
+ c.syntax = 'leeloo remove <name>'
150
163
  c.description = "Remove a secret from a keystore"
151
164
  c.option '--keystore STRING', String, 'a selected keystore'
152
165
 
@@ -23,5 +23,10 @@ module Leeloo
23
23
  g.commit "keystore #{path} added"
24
24
  end
25
25
 
26
+ def self.sync_keystore path
27
+ g = Git.init path
28
+ g.push
29
+ end
30
+
26
31
  end
27
32
  end
@@ -1,4 +1,4 @@
1
1
  module Leeloo
2
- VERSION = '0.0.11'.freeze
2
+ VERSION = '0.0.12'.freeze
3
3
  DESCRIPTION = "The easiest way to share securely your secrets".freeze
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: leeloo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvek
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-18 00:00:00.000000000 Z
11
+ date: 2017-11-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: commander