onetime-up 0.6.2 → 0.7.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/onetime +7 -0
  3. data/lib/onetime/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 829b100c0882cdb8e5f797d27d0f9e52e576cd20f20235f7836532f3872b74ea
4
- data.tar.gz: 9df7bd8e315d3fe6339619016b1b03c0450bbfb9c6a83644f1ce9bcf77e77fd6
3
+ metadata.gz: 608460e67b5939792b49aad0117baa385911125337337624113f4e1a95388063
4
+ data.tar.gz: ff189cbd5cd36d19e102dea6dcd16acc2015a7de13400b5c42bd2638152e4533
5
5
  SHA512:
6
- metadata.gz: 905c34dd750efb26e2d3af6314d22b30d8a101885a9eef965d730a2c71849b80b54e6ddf6bad8f952c1de8a4a822b1df0f26667dc7b4cc883fec0efe25221d6d
7
- data.tar.gz: 53e8f305c78a4a79a539adb359508078835ae83f96156f8c9abd503ff7adce81d758411d86efffb30833eae46588ff5e8d6937dd316892020bc5291712d60f44
6
+ metadata.gz: dfd25117746474d2ccb452aaeeaa5dcbb4b8ebe3c4a28c078ed11f33c2011bb19d60a25058be2a1fa5e9f98a9e56da75a4a5c877a7c559b6305f40753f38c031
7
+ data.tar.gz: 66b1255b1dd1d9f8c18e7e617daea8034ad518a0391f230276cb93a919a054a733fd2d2040ce3086c012ac29fc0dc76a824578e5e2f27acc2f584f2cbe3bfbf2
data/bin/onetime CHANGED
@@ -177,6 +177,13 @@ class Onetime::CLI
177
177
  option :p, :passphrase, String, "Passphrase to encrypt the secret (something only you and recipient know)"
178
178
  option :r, :recipient, Array, "Email address to deliver the secret link"
179
179
  command :generate do |obj|
180
+ extra_args = Array(obj.argv).flatten.compact
181
+ unless extra_args.empty?
182
+ raise RuntimeError, "generate takes no arguments (got: %s). Did you mean: onetime share < %s" % [extra_args.join(' '), extra_args.first]
183
+ end
184
+ if !$stdin.tty? && !$stdin.eof?
185
+ raise RuntimeError, "generate does not read stdin. Did you mean: onetime share"
186
+ end
180
187
  recipients = [obj.option.recipient, obj.global.recipient].flatten.compact.uniq
181
188
  opts = { :ttl => obj.option.ttl, :recipient => recipients }
182
189
  opts[:passphrase] = obj.option.passphrase if obj.option.passphrase
@@ -1,3 +1,3 @@
1
1
  module Onetime
2
- VERSION = "0.6.2"
2
+ VERSION = "0.7.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: onetime-up
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.2
4
+ version: 0.7.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delano Mandelbaum
@@ -102,7 +102,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
102
102
  - !ruby/object:Gem::Version
103
103
  version: 2.0.0
104
104
  requirements: []
105
- rubygems_version: 4.0.7
105
+ rubygems_version: 4.0.9
106
106
  specification_version: 4
107
107
  summary: Command-line tool and library for onetimesecret.com API (API v2)
108
108
  test_files: []