onetime 0.5.0 → 0.5.1
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.
- data.tar.gz.sig +0 -0
- data/CHANGES.txt +4 -0
- data/VERSION +1 -1
- data/bin/onetime +6 -2
- data/onetime.gemspec +1 -1
- metadata +1 -1
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGES.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1
1
|
ONETIME, CHANGES
|
2
2
|
|
3
|
+
#### 0.5.1 (2013-02-12) ###############################
|
4
|
+
|
5
|
+
* ADDED: global recipient parameter for 'generate' and 'share' commands.
|
6
|
+
|
3
7
|
#### 0.5.0 (2013-02-12) ###############################
|
4
8
|
|
5
9
|
* ADDED: Support for getting secrets based on the URI
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/bin/onetime
CHANGED
@@ -17,6 +17,8 @@ class Onetime::CLI
|
|
17
17
|
global :c, :custid, String, "Customer ID (e.g. you@yourcompany.com)"
|
18
18
|
global :k, :apikey, String, "API key (e.g. 4eb33c6340006d6607c813fc7e707a32f8bf5342)"
|
19
19
|
|
20
|
+
global :r, :recipient, Array, "Email address to deliver the secret link"
|
21
|
+
|
20
22
|
global :f, :format, String, "Output format (json or yaml)"
|
21
23
|
global :j, :json, "Shorthand for -f json"
|
22
24
|
global :y, :yaml, "Shorthand for -f yaml"
|
@@ -123,6 +125,7 @@ class Onetime::CLI
|
|
123
125
|
option :p, :passphrase, String, "Passphrase to encrypt the secret (something only you and recipient know)"
|
124
126
|
option :r, :recipient, Array, "Email address to deliver the secret link"
|
125
127
|
command :share do |obj|
|
128
|
+
recipients = [obj.option.recipient, obj.global.recipient].flatten.compact.uniq
|
126
129
|
begin
|
127
130
|
if Kernel.select [$stdin], nil, nil, 0
|
128
131
|
secret_value = STDIN.read
|
@@ -136,7 +139,7 @@ class Onetime::CLI
|
|
136
139
|
exit 0
|
137
140
|
end
|
138
141
|
raise RuntimeError, "No secret provided" if secret_value.chomp.empty?
|
139
|
-
opts = { :secret => secret_value, :ttl => obj.option.ttl, :recipient =>
|
142
|
+
opts = { :secret => secret_value, :ttl => obj.option.ttl, :recipient => recipients }
|
140
143
|
opts[:passphrase] = obj.option.passphrase if obj.option.passphrase
|
141
144
|
@res = @api.post '/share', opts
|
142
145
|
if @res.nil?
|
@@ -165,7 +168,8 @@ class Onetime::CLI
|
|
165
168
|
option :p, :passphrase, String, "Passphrase to encrypt the secret (something only you and recipient know)"
|
166
169
|
option :r, :recipient, Array, "Email address to deliver the secret link"
|
167
170
|
command :generate do |obj|
|
168
|
-
|
171
|
+
recipients = [obj.option.recipient, obj.global.recipient].flatten.compact.uniq
|
172
|
+
opts = { :ttl => obj.option.ttl, :recipient => recipients }
|
169
173
|
opts[:passphrase] = obj.option.passphrase if obj.option.passphrase
|
170
174
|
@res = @api.post '/generate', opts
|
171
175
|
if @res.nil?
|
data/onetime.gemspec
CHANGED
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|