pws 1.0.2 → 1.0.3
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/README.md +16 -19
- data/lib/pws/runner.rb +7 -3
- data/lib/pws/version.rb +1 -1
- metadata +2 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
pws [](http://travis-ci.org/janlelis/pws)
|
2
2
|
===
|
3
|
-
pws is a command-line password safe/manager written in Ruby.
|
3
|
+
pws is a command-line password safe/manager written in Ruby using [aes-256-cbc](http://en.wikipedia.org/wiki/Advanced_Encryption_Standard) and [pbkdf2](http://en.wikipedia.org/wiki/PBKDF2).
|
4
4
|
|
5
5
|
|
6
6
|
Usage
|
@@ -8,46 +8,43 @@ Usage
|
|
8
8
|
[](http://rbjl.net/60-pws-the-ruby-powered-command-line-password-manager)
|
9
9
|
|
10
10
|
|
11
|
-
|
11
|
+
Setup
|
12
12
|
---
|
13
|
-
You can install pws with
|
14
|
-
`$ gem install pws`
|
13
|
+
You can install *pws* with: `$ gem install pws`
|
15
14
|
|
16
15
|
Run `$ pws --help` for usage information.
|
17
16
|
|
18
|
-
On Linux, please make sure you've got `xclip` or `xsel` installed (clipboard).
|
17
|
+
On Linux, please make sure you've got `xclip` or `xsel` installed (for the clipboard).
|
19
18
|
|
20
|
-
|
21
|
-
OpenSSL 1.0
|
19
|
+
Hints
|
22
20
|
---
|
23
|
-
You should use a Ruby built with bindings to an openssl version >= 1.0. If not, pws will fall back to a Ruby-only version of the PBKDF2 function. If using openssl 1.0 is not possible for you, you can work around the issue by using the `--iterations` option with a value < 75\_000 (see help). If you have problems using openssl 1.0 with your Ruby, please look for a solution in [this github issue](https://github.com/janlelis/pws/issues/7).
|
24
21
|
|
22
|
+
### OpenSSL 1.0
|
23
|
+
You should use a Ruby that was built with bindings to an openssl version >= 1.0 or pws will fall back to a Ruby-only version of the PBKDF2 function, which is much slower. If using openssl 1.0 is not possible for you, you can work around that issue by using the `--iterations` option with a value below 75\_000 (see help). If you have problems using openssl 1.0 with your Ruby, please look for a solution in [this issue](https://github.com/janlelis/pws/issues/7).
|
25
24
|
|
26
|
-
Using a .pws file in the current working directory
|
27
|
-
---
|
28
|
-
Besides using the `--filename path/to/safe` option, you can shortly call `pws --cwd` for using a `.pws` file in the current directory.
|
29
25
|
|
30
|
-
|
31
|
-
|
32
|
-
---
|
33
|
-
The 0.9 password files are not compatible with that version, however, you can convert your safe with:
|
26
|
+
### Updating from pws 0.9
|
27
|
+
The 0.9 password files are not compatible with the 1.0 version of pws, however, you can convert your safe with:
|
34
28
|
`$ pws resave --in 0.9 --out 1.0`
|
35
29
|
|
36
30
|
|
37
|
-
|
38
|
-
|
31
|
+
### How to use a .pws file in the current working directory
|
32
|
+
Besides using the `--filename path/to/safe` option, you can shortly call `pws --cwd` for using a `.pws` file in the current directory.
|
33
|
+
|
34
|
+
|
35
|
+
### Reading the source
|
39
36
|
Trust the code by reading the source! It's originally based on [this tutorial](http://rbjl.net/41-tutorial-build-your-own-password-safe-with-ruby). You might want to start reading in the [0.9.2 tag](https://github.com/janlelis/pws/tree/0.9.2), because it's got less features and therefore is less code.
|
40
37
|
|
41
38
|
|
42
39
|
Contributors
|
43
40
|
---
|
44
|
-
* [namelessjon](https://github.com/namelessjon)
|
41
|
+
* [namelessjon](https://github.com/namelessjon/)
|
45
42
|
* [brianewing](https://github.com/brianewing/)
|
46
43
|
* [dquimper](https://github.com/dquimper/)
|
47
44
|
* [grapz](https://github.com/grapz/)
|
48
45
|
* [thecatwasnot](https://github.com/thecatwasnot/) (cucumber specs loosely based on [these](https://github.com/thecatwasnot/passwordsafe/blob/master/features/))
|
49
46
|
|
50
47
|
|
51
|
-
|
48
|
+
J-\_-L
|
52
49
|
---
|
53
50
|
© 2010-2012 Jan Lelis, MIT license
|
data/lib/pws/runner.rb
CHANGED
@@ -1,6 +1,10 @@
|
|
1
1
|
require_relative '../pws'
|
2
2
|
|
3
3
|
module PWS::Runner
|
4
|
+
SINGLE_OPTIONS = Regexp.union *%w[
|
5
|
+
cwd
|
6
|
+
].freeze
|
7
|
+
|
4
8
|
class << self
|
5
9
|
# some simple option parsing
|
6
10
|
# returns action, arguments, options
|
@@ -17,15 +21,15 @@ module PWS::Runner
|
|
17
21
|
# ignore
|
18
22
|
when /^--(help|version)$/
|
19
23
|
return [$1.to_sym, [], {}]
|
20
|
-
when /^--(
|
24
|
+
when /^--(#{SINGLE_OPTIONS})/ # special single options
|
21
25
|
options[$1.to_sym] = true
|
22
26
|
when /^--/
|
23
27
|
# parse option in next iteration
|
24
28
|
when /^-([^-].*)$/
|
25
29
|
options[:namespace] = $1
|
26
30
|
else
|
27
|
-
if prev_arg =~ /^--(.+)$/
|
28
|
-
options[
|
31
|
+
if prev_arg =~ /^--(.+)$/ && SINGLE_OPTIONS !~ opt = $1
|
32
|
+
options[opt.to_sym] = arg
|
29
33
|
elsif !action
|
30
34
|
action = arg.to_sym
|
31
35
|
else
|
data/lib/pws/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-07-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: clipboard
|