pws 1.0.4 → 1.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/README.md +2 -2
- data/Rakefile +1 -1
- data/features/add.feature +5 -8
- data/features/step_definitions/pws_steps.rb +1 -1
- data/features/update.feature +1 -4
- data/lib/pws.rb +3 -1
- data/lib/pws/class_support.rb +8 -0
- data/lib/pws/version.rb +1 -1
- data/pws.gemspec +8 -10
- metadata +57 -122
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2578b98bcf749f13ca577edfc08cb67e50de5775
|
4
|
+
data.tar.gz: 46f08de52048fea3f9e19dde45d7e880edbef131
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: af7abbcf348f2a89396580f9afb5c46497ad30486d03b71fef9a014cb7d48ec179a9d860724a2bce9d57aab9b13c7a618ba29a30774ea7156415d74b74c50439
|
7
|
+
data.tar.gz: f33460bb739d46952e1cab6b95b0611ef4b8e5987a3c7a1a700ac5c830186630bbeba2d10244780cb22bc5f14e288a5f726dadb5a2bb4ec7ac4179c210dd2bbb
|
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
pws [![
|
1
|
+
pws [![[travis]](https://travis-ci.org/janlelis/pws.png)](https://travis-ci.org/janlelis/pws)
|
2
2
|
===
|
3
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
|
|
@@ -47,4 +47,4 @@ Contributors
|
|
47
47
|
|
48
48
|
J-\_-L
|
49
49
|
---
|
50
|
-
© 2010-
|
50
|
+
© 2010-2013 Jan Lelis, MIT license
|
data/Rakefile
CHANGED
@@ -15,7 +15,7 @@ end
|
|
15
15
|
|
16
16
|
desc "Install the gem locally"
|
17
17
|
task :install => :gem do
|
18
|
-
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version} --no-rdoc --no-ri}
|
18
|
+
sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}.gem --no-rdoc --no-ri}
|
19
19
|
end
|
20
20
|
|
21
21
|
desc "Generate the gemspec"
|
data/features/add.feature
CHANGED
@@ -12,7 +12,7 @@ Feature: Add
|
|
12
12
|
Then the output should contain "Master password:"
|
13
13
|
And the output should contain "Please enter a password for github:"
|
14
14
|
And the output should contain "The password for github has been added"
|
15
|
-
|
15
|
+
|
16
16
|
@slow-hack
|
17
17
|
Scenario: Add a new password for "github", already passing it as command line paramenter (not recommended)
|
18
18
|
Given A safe exists with master password "my_master_password"
|
@@ -27,7 +27,7 @@ Feature: Add
|
|
27
27
|
And I type "my_master_password"
|
28
28
|
Then the output should contain "Master password:"
|
29
29
|
And the output should contain "There is already a password stored for github. You need to remove it before creating a new one!"
|
30
|
-
|
30
|
+
|
31
31
|
Scenario: Try to add a new password for "github" (but it's empty)
|
32
32
|
Given A safe exists with master password "my_master_password"
|
33
33
|
When I run `pws add github` interactively
|
@@ -36,20 +36,17 @@ Feature: Add
|
|
36
36
|
Then the output should contain "Master password:"
|
37
37
|
And the output should contain "Please enter a password for github:"
|
38
38
|
And the output should contain "Cannot set an empty password!"
|
39
|
-
|
39
|
+
|
40
40
|
Scenario: Try to add a new password for "github" (but the master password is wrong)
|
41
41
|
Given A safe exists with master password "my_master_password"
|
42
42
|
When I run `pws add github` interactively
|
43
43
|
And I type "my_master_password_wrong"
|
44
44
|
Then the output should contain "Master password:"
|
45
45
|
And the output should contain "NO ACCESS"
|
46
|
-
|
46
|
+
|
47
47
|
@very-slow-hack
|
48
48
|
Scenario: Set a new password for "github", this also sets the timestamp
|
49
|
-
Given A safe exists with master password "my_master_password"
|
50
|
-
When I run `pws ls` interactively
|
51
|
-
And I type "my_master_password"
|
52
|
-
Then the output should not contain the current date
|
49
|
+
Given A safe exists with master password "my_master_password" and a key "some" with password "entry"
|
53
50
|
When I run `pws add github github_password` interactively
|
54
51
|
And I type "my_master_password"
|
55
52
|
And I run `pws show` interactively
|
@@ -11,7 +11,7 @@ def create_safe(master, key_hash = {}, timestamp = nil)
|
|
11
11
|
# only generating global timestamp for every entry
|
12
12
|
if timestamp
|
13
13
|
pws.instance_variable_get(:@data).each{ |_, entry|
|
14
|
-
entry[:timestamp] = timestamp
|
14
|
+
entry[:timestamp] = timestamp.to_i
|
15
15
|
}
|
16
16
|
pws.resave
|
17
17
|
end
|
data/features/update.feature
CHANGED
@@ -46,10 +46,7 @@ Feature: Update
|
|
46
46
|
|
47
47
|
@very-slow-hack
|
48
48
|
Scenario: Set a new password for "github", this also sets the timestamp
|
49
|
-
Given A safe exists with master password "my_master_password" and a key "github" with password "old_password"
|
50
|
-
When I run `pws ls` interactively
|
51
|
-
And I type "my_master_password"
|
52
|
-
Then the output should not contain the current date
|
49
|
+
Given A safe exists with master password "my_master_password" and a key "github" with password "old_password"
|
53
50
|
When I run `pws update github github_password` interactively
|
54
51
|
And I type "my_master_password"
|
55
52
|
And I run `pws show` interactively
|
data/lib/pws.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# encoding: ascii
|
2
2
|
require_relative 'pws/version'
|
3
|
+
require_relative 'pws/class_support'
|
3
4
|
require_relative 'pws/encryptor'
|
4
5
|
require_relative 'pws/format'
|
5
6
|
|
@@ -8,10 +9,11 @@ require 'securerandom'
|
|
8
9
|
require 'abbrev'
|
9
10
|
|
10
11
|
require 'clipboard'
|
11
|
-
require 'zucker/alias_for'
|
12
12
|
require 'paint/pa'
|
13
13
|
|
14
14
|
class PWS
|
15
|
+
extend PWS::ClassSupport
|
16
|
+
|
15
17
|
class NoAccess < StandardError; end
|
16
18
|
class NoLegacyAccess < NoAccess; end
|
17
19
|
|
data/lib/pws/version.rb
CHANGED
data/pws.gemspec
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name = 'pws'
|
3
3
|
|
4
4
|
require File.dirname(__FILE__) + "/lib/#{name}/version"
|
5
|
-
|
5
|
+
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.required_ruby_version = '>= 1.9.2'
|
8
8
|
s.name = name
|
@@ -10,26 +10,24 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.authors = ["Jan Lelis"]
|
11
11
|
s.email = "mail@janlelis.de"
|
12
12
|
s.homepage = 'https://github.com/janlelis/pws'
|
13
|
-
s.summary = "pws is a
|
13
|
+
s.summary = "pws is a CLI password safe."
|
14
14
|
s.description = "pws is a command-line password safe. Please run `pws --help` for usage information."
|
15
15
|
s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc} ext/**/*.{rb,c} features/**/*]) + %w{Rakefile pws.gemspec}
|
16
16
|
s.extra_rdoc_files = ["README.md", "LICENSE"]
|
17
17
|
s.license = 'MIT'
|
18
18
|
s.executables = ['pws']
|
19
|
-
s.add_dependency 'clipboard', '~> 1.0.
|
20
|
-
s.add_dependency '
|
21
|
-
s.add_dependency '
|
22
|
-
s.add_dependency 'pbkdf2'
|
19
|
+
s.add_dependency 'clipboard', '~> 1.0.5'
|
20
|
+
s.add_dependency 'paint', '>= 0.8.7'
|
21
|
+
s.add_dependency 'pbkdf2-ruby'
|
23
22
|
s.add_development_dependency 'rake'
|
24
23
|
s.add_development_dependency 'aruba'
|
25
24
|
s.add_development_dependency 'cucumber'
|
26
25
|
s.add_development_dependency 'rspec'
|
27
26
|
s.add_development_dependency 'guard-cucumber'
|
28
27
|
s.add_development_dependency 'guard-rspec'
|
29
|
-
s.add_development_dependency '
|
30
|
-
s.add_development_dependency '
|
31
|
-
|
32
|
-
|
28
|
+
# s.add_development_dependency 'irbtools'
|
29
|
+
# s.add_development_dependency 'byebug'
|
30
|
+
|
33
31
|
len = s.homepage.size
|
34
32
|
s.post_install_message = \
|
35
33
|
(" ┌── " + "info ".ljust(len-2,'─') + "─┐\n" +
|
metadata
CHANGED
@@ -1,206 +1,139 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pws
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.5
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jan Lelis
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-03-24 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: clipboard
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
17
|
- - ~>
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 1.0.
|
19
|
+
version: 1.0.5
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
24
|
- - ~>
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 1.0.
|
30
|
-
- !ruby/object:Gem::Dependency
|
31
|
-
name: zucker
|
32
|
-
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
|
-
requirements:
|
35
|
-
- - ! '>='
|
36
|
-
- !ruby/object:Gem::Version
|
37
|
-
version: '12.1'
|
38
|
-
type: :runtime
|
39
|
-
prerelease: false
|
40
|
-
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
|
-
requirements:
|
43
|
-
- - ! '>='
|
44
|
-
- !ruby/object:Gem::Version
|
45
|
-
version: '12.1'
|
26
|
+
version: 1.0.5
|
46
27
|
- !ruby/object:Gem::Dependency
|
47
28
|
name: paint
|
48
29
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
30
|
requirements:
|
51
|
-
- -
|
31
|
+
- - '>='
|
52
32
|
- !ruby/object:Gem::Version
|
53
|
-
version: 0.8.
|
33
|
+
version: 0.8.7
|
54
34
|
type: :runtime
|
55
35
|
prerelease: false
|
56
36
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
37
|
requirements:
|
59
|
-
- -
|
38
|
+
- - '>='
|
60
39
|
- !ruby/object:Gem::Version
|
61
|
-
version: 0.8.
|
40
|
+
version: 0.8.7
|
62
41
|
- !ruby/object:Gem::Dependency
|
63
|
-
name: pbkdf2
|
42
|
+
name: pbkdf2-ruby
|
64
43
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
44
|
requirements:
|
67
|
-
- -
|
45
|
+
- - '>='
|
68
46
|
- !ruby/object:Gem::Version
|
69
47
|
version: '0'
|
70
48
|
type: :runtime
|
71
49
|
prerelease: false
|
72
50
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
51
|
requirements:
|
75
|
-
- -
|
52
|
+
- - '>='
|
76
53
|
- !ruby/object:Gem::Version
|
77
54
|
version: '0'
|
78
55
|
- !ruby/object:Gem::Dependency
|
79
56
|
name: rake
|
80
57
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
58
|
requirements:
|
83
|
-
- -
|
59
|
+
- - '>='
|
84
60
|
- !ruby/object:Gem::Version
|
85
61
|
version: '0'
|
86
62
|
type: :development
|
87
63
|
prerelease: false
|
88
64
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
65
|
requirements:
|
91
|
-
- -
|
66
|
+
- - '>='
|
92
67
|
- !ruby/object:Gem::Version
|
93
68
|
version: '0'
|
94
69
|
- !ruby/object:Gem::Dependency
|
95
70
|
name: aruba
|
96
71
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
72
|
requirements:
|
99
|
-
- -
|
73
|
+
- - '>='
|
100
74
|
- !ruby/object:Gem::Version
|
101
75
|
version: '0'
|
102
76
|
type: :development
|
103
77
|
prerelease: false
|
104
78
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
79
|
requirements:
|
107
|
-
- -
|
80
|
+
- - '>='
|
108
81
|
- !ruby/object:Gem::Version
|
109
82
|
version: '0'
|
110
83
|
- !ruby/object:Gem::Dependency
|
111
84
|
name: cucumber
|
112
85
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
86
|
requirements:
|
115
|
-
- -
|
87
|
+
- - '>='
|
116
88
|
- !ruby/object:Gem::Version
|
117
89
|
version: '0'
|
118
90
|
type: :development
|
119
91
|
prerelease: false
|
120
92
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
93
|
requirements:
|
123
|
-
- -
|
94
|
+
- - '>='
|
124
95
|
- !ruby/object:Gem::Version
|
125
96
|
version: '0'
|
126
97
|
- !ruby/object:Gem::Dependency
|
127
98
|
name: rspec
|
128
99
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
100
|
requirements:
|
131
|
-
- -
|
101
|
+
- - '>='
|
132
102
|
- !ruby/object:Gem::Version
|
133
103
|
version: '0'
|
134
104
|
type: :development
|
135
105
|
prerelease: false
|
136
106
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
107
|
requirements:
|
139
|
-
- -
|
108
|
+
- - '>='
|
140
109
|
- !ruby/object:Gem::Version
|
141
110
|
version: '0'
|
142
111
|
- !ruby/object:Gem::Dependency
|
143
112
|
name: guard-cucumber
|
144
113
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
114
|
requirements:
|
147
|
-
- -
|
115
|
+
- - '>='
|
148
116
|
- !ruby/object:Gem::Version
|
149
117
|
version: '0'
|
150
118
|
type: :development
|
151
119
|
prerelease: false
|
152
120
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
121
|
requirements:
|
155
|
-
- -
|
122
|
+
- - '>='
|
156
123
|
- !ruby/object:Gem::Version
|
157
124
|
version: '0'
|
158
125
|
- !ruby/object:Gem::Dependency
|
159
126
|
name: guard-rspec
|
160
127
|
requirement: !ruby/object:Gem::Requirement
|
161
|
-
none: false
|
162
128
|
requirements:
|
163
|
-
- -
|
129
|
+
- - '>='
|
164
130
|
- !ruby/object:Gem::Version
|
165
131
|
version: '0'
|
166
132
|
type: :development
|
167
133
|
prerelease: false
|
168
134
|
version_requirements: !ruby/object:Gem::Requirement
|
169
|
-
none: false
|
170
135
|
requirements:
|
171
|
-
- -
|
172
|
-
- !ruby/object:Gem::Version
|
173
|
-
version: '0'
|
174
|
-
- !ruby/object:Gem::Dependency
|
175
|
-
name: ripltools
|
176
|
-
requirement: !ruby/object:Gem::Requirement
|
177
|
-
none: false
|
178
|
-
requirements:
|
179
|
-
- - ! '>='
|
180
|
-
- !ruby/object:Gem::Version
|
181
|
-
version: '0'
|
182
|
-
type: :development
|
183
|
-
prerelease: false
|
184
|
-
version_requirements: !ruby/object:Gem::Requirement
|
185
|
-
none: false
|
186
|
-
requirements:
|
187
|
-
- - ! '>='
|
188
|
-
- !ruby/object:Gem::Version
|
189
|
-
version: '0'
|
190
|
-
- !ruby/object:Gem::Dependency
|
191
|
-
name: irbtools
|
192
|
-
requirement: !ruby/object:Gem::Requirement
|
193
|
-
none: false
|
194
|
-
requirements:
|
195
|
-
- - ! '>='
|
196
|
-
- !ruby/object:Gem::Version
|
197
|
-
version: '0'
|
198
|
-
type: :development
|
199
|
-
prerelease: false
|
200
|
-
version_requirements: !ruby/object:Gem::Requirement
|
201
|
-
none: false
|
202
|
-
requirements:
|
203
|
-
- - ! '>='
|
136
|
+
- - '>='
|
204
137
|
- !ruby/object:Gem::Version
|
205
138
|
version: '0'
|
206
139
|
description: pws is a command-line password safe. Please run `pws --help` for usage
|
@@ -213,60 +146,62 @@ extra_rdoc_files:
|
|
213
146
|
- README.md
|
214
147
|
- LICENSE
|
215
148
|
files:
|
216
|
-
-
|
217
|
-
-
|
218
|
-
-
|
219
|
-
- lib/pws/version.rb
|
220
|
-
- lib/pws/encryptor.rb
|
221
|
-
- lib/pws/runner.rb
|
222
|
-
- lib/pws.rb
|
149
|
+
- LICENSE
|
150
|
+
- README.md
|
151
|
+
- Rakefile
|
223
152
|
- bin/pws
|
224
|
-
- features/
|
225
|
-
- features/
|
226
|
-
- features/
|
227
|
-
- features/show.feature
|
228
|
-
- features/misc.feature
|
153
|
+
- features/add.feature
|
154
|
+
- features/create.feature
|
155
|
+
- features/generate.feature
|
229
156
|
- features/get.feature
|
157
|
+
- features/in-out.feature
|
230
158
|
- features/master.feature
|
231
|
-
- features/
|
159
|
+
- features/misc.feature
|
232
160
|
- features/namespaces.feature
|
233
|
-
- features/
|
234
|
-
- features/add.feature
|
235
|
-
- features/support/env.rb
|
236
|
-
- features/create.feature
|
161
|
+
- features/remove.feature
|
237
162
|
- features/rename.feature
|
238
|
-
- features/
|
163
|
+
- features/resave.feature
|
164
|
+
- features/show.feature
|
239
165
|
- features/step_definitions/pws_steps.rb
|
240
|
-
-
|
166
|
+
- features/support/env.rb
|
167
|
+
- features/update-generate.feature
|
168
|
+
- features/update.feature
|
169
|
+
- lib/pws.rb
|
170
|
+
- lib/pws/class_support.rb
|
171
|
+
- lib/pws/encryptor.rb
|
172
|
+
- lib/pws/format.rb
|
173
|
+
- lib/pws/format/0.9.rb
|
174
|
+
- lib/pws/format/1.0.rb
|
175
|
+
- lib/pws/runner.rb
|
176
|
+
- lib/pws/version.rb
|
241
177
|
- pws.gemspec
|
242
|
-
- README.md
|
243
|
-
- LICENSE
|
244
178
|
homepage: https://github.com/janlelis/pws
|
245
179
|
licenses:
|
246
180
|
- MIT
|
247
|
-
|
248
|
-
|
249
|
-
|
181
|
+
metadata: {}
|
182
|
+
post_install_message: |2-
|
183
|
+
┌── info ─────────────────────────┐
|
184
|
+
J-_-L │ https://github.com/janlelis/pws │
|
185
|
+
├── usage ────────────────────────┤
|
186
|
+
│ pws --help │
|
187
|
+
└─────────────────────────────────┘
|
250
188
|
rdoc_options: []
|
251
189
|
require_paths:
|
252
190
|
- lib
|
253
191
|
required_ruby_version: !ruby/object:Gem::Requirement
|
254
|
-
none: false
|
255
192
|
requirements:
|
256
|
-
- -
|
193
|
+
- - '>='
|
257
194
|
- !ruby/object:Gem::Version
|
258
195
|
version: 1.9.2
|
259
196
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
260
|
-
none: false
|
261
197
|
requirements:
|
262
|
-
- -
|
198
|
+
- - '>='
|
263
199
|
- !ruby/object:Gem::Version
|
264
200
|
version: '0'
|
265
201
|
requirements: []
|
266
202
|
rubyforge_project:
|
267
|
-
rubygems_version:
|
203
|
+
rubygems_version: 2.2.2
|
268
204
|
signing_key:
|
269
|
-
specification_version:
|
270
|
-
summary: pws is a
|
205
|
+
specification_version: 4
|
206
|
+
summary: pws is a CLI password safe.
|
271
207
|
test_files: []
|
272
|
-
has_rdoc:
|