rubeepass 3.0.1 → 3.1.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/bin/rpass +19 -5
  3. metadata +6 -6
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 8f36455b8aaca3e59e836a17daae134ace687927ac8e91ab64402f5b38d7c9f6
4
- data.tar.gz: ce8ff5f8e588565e6272c128e465fab708c79061d1fcd6f450516160924fc05d
3
+ metadata.gz: 6ebdf490b8dbfa0fad27628bf3ee55cb12bf672dd81e54ca36b225499039ed77
4
+ data.tar.gz: 783c86924e17c98334a8efc781868eb3f1ff3d14aeac714ea44ac0cf3dd4b395
5
5
  SHA512:
6
- metadata.gz: e37e022c53bb118c06719f5ccaec0109cf496f907de19be08b5a6d3043427ebcf1f7f5f48f48d1efdd1af9c20008e4e7f1eaa88141f8101e8eec287c197ea35c
7
- data.tar.gz: a9211c9dcff99bbb2a6fb48d9b9df6490b3bfb176fec4dad0c4f091ea6eb2f70e3a08219644e229a91a126e628dc601a2966e9743f1cbf77cee0daec66ce36be
6
+ metadata.gz: 9af2bc5f82ba17b63c02ebef05a7da7a1b1ed0d32ec4ec607c819e84bff3a387bdeb4fd321c5c3778d82b285f827a35e75a53b2ddd1c83a35742a33abaf3f7b3
7
+ data.tar.gz: e182c2ddd5cd06e7af83e344f893bba31c6b8670b65f29469c71e4721a8f22559e23ddde0f00cb3a9c3aab920920fc32407500aa94f3365cb4b2fe55a3251ac8
data/bin/rpass CHANGED
@@ -70,11 +70,21 @@ def parse(args)
70
70
  options["timeout"] = nil
71
71
  options["verbose"] = false
72
72
 
73
+ info = "KeePass 2.x read-only client."
74
+
73
75
  parser = OptionParser.new do |opts|
74
- opts.summary_width = 24
76
+ opts.summary_width = 26
75
77
 
76
78
  opts.banner = "Usage: #{File.basename($0)} [OPTIONS] [kdbx]"
77
79
 
80
+ opts.on("")
81
+
82
+ info.scan(/\S.{0,80}\S(?=\s|$)|\S+/).each do |line|
83
+ opts.on("#{line}")
84
+ end
85
+
86
+ opts.on("", "OPTIONS")
87
+
78
88
  opts.on(
79
89
  "-c",
80
90
  "--command=COMMAND",
@@ -95,7 +105,8 @@ def parse(args)
95
105
  "-f",
96
106
  "--format=FORMAT",
97
107
  [ "gzip", "xml" ],
98
- "Specify format to use when exporting (default: xml)"
108
+ "Specify format to use when exporting (default:",
109
+ "xml)"
99
110
  ) do |format|
100
111
  options["export_format"] = format
101
112
  end
@@ -120,7 +131,7 @@ def parse(args)
120
131
  opts.on(
121
132
  "-p",
122
133
  "--password=PASSWORD",
123
- "Use specified password (will prompt if not provided)"
134
+ "Use specified password or read password from file"
124
135
  ) do |password|
125
136
  options["password"] = password
126
137
  end
@@ -216,10 +227,13 @@ options = parse(ARGV)
216
227
 
217
228
  begin
218
229
  kdbx = options["kdbx"]
219
- password = options["password"] if (options["password"])
220
- password = get_password if (options["password"].nil?)
230
+ password = options["password"] || get_password
221
231
  keyfile = options["keyfile"]
222
232
 
233
+ # Read password from file if filename was provided
234
+ pfile = Pathname.new(password).expand_path
235
+ password = pfile.read.chomp if (pfile.exist?)
236
+
223
237
  keepass = RubeePass.new(
224
238
  kdbx,
225
239
  password,
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubeepass
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.1
4
+ version: 3.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Miles Whittaker
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-06-05 00:00:00.000000000 Z
11
+ date: 2018-08-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest
@@ -59,7 +59,7 @@ dependencies:
59
59
  version: '2.2'
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 2.2.1
62
+ version: 2.2.4
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
@@ -69,7 +69,7 @@ dependencies:
69
69
  version: '2.2'
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 2.2.1
72
+ version: 2.2.4
73
73
  - !ruby/object:Gem::Dependency
74
74
  name: hilighter
75
75
  requirement: !ruby/object:Gem::Requirement
@@ -170,7 +170,7 @@ dependencies:
170
170
  - - ">="
171
171
  - !ruby/object:Gem::Version
172
172
  version: 0.1.6
173
- description: Ruby KeePass 2.x implementation. Currently it is read-only.
173
+ description: Ruby KeePass 2.x client. Currently it is read-only.
174
174
  email: mjwhitta@gmail.com
175
175
  executables:
176
176
  - rpass
@@ -225,5 +225,5 @@ rubyforge_project:
225
225
  rubygems_version: 2.7.7
226
226
  signing_key:
227
227
  specification_version: 4
228
- summary: Ruby KeePass 2.x implementation
228
+ summary: Ruby KeePass 2.x read-only client
229
229
  test_files: []