mpw 4.1.1 → 4.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 576eda939675a04f2a2f922eb582b3d586bc9f18
4
- data.tar.gz: 9463082a6b2a35d1a1bc2455352596d60edb6b7e
3
+ metadata.gz: f14b80413b9754b72ffe72f8e6a325d1317b8524
4
+ data.tar.gz: 2597bfec0629e701de0cc3975556fa8756421751
5
5
  SHA512:
6
- metadata.gz: 9c749dae407ec8e9ec10a0cc907f8a9657f5c61f9b1ffc430add9a404760567b230e25ce6eff322f455b8bb47cf7c6f818fd669eff5ca4bf42714da25f50cdf6
7
- data.tar.gz: ca2920f4363abf0d37ac9af4e76764494a5c9c5380ef150be0b2034f25463c3c1fe8bc994dd0ed6d72eeda7ee5e459969918cc43af943ca5c61d774e2e7a4312
6
+ metadata.gz: 7721bc07451e54afafaf6b8a7e5a06f8c1eec663cc9ceb43252fbff2c66d9da4fa6e4d274398372d66693073b061ad81be11ff838246b8f56ffdb088b9ad9677
7
+ data.tar.gz: 7964cca50b6a4a9e34957acacd322125dd1ffaf3836f0d18b5d929764dd01ada233ae8c2d10dc4f9d4515c6699b2a6373e5d2379a6f2a3baddcb41fa41754c6f
data/.gitignore CHANGED
@@ -1,2 +1,4 @@
1
1
  Gemfile.lock
2
2
  *.gem
3
+ .yardoc
4
+ doc
data/.rubocop.yml CHANGED
@@ -3,7 +3,6 @@ AllCops:
3
3
  Exclude:
4
4
  - db/**/*
5
5
  - config/**/*
6
- - test/*
7
6
  - Vagrantfile
8
7
  TargetRubyVersion: 2.3
9
8
 
data/.travis.yml CHANGED
@@ -1,16 +1,20 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.4.0
4
- - 2.3.3
5
- - 2.2.6
3
+ - 2.4.1
4
+ - 2.3.4
5
+ - 2.2.7
6
6
  - 2.1.10
7
7
  install:
8
8
  - bundle install
9
- - gem install 'test-unit'
10
- - gem install rubocop
11
9
  - echo 9999 > VERSION
12
10
  - gem build mpw.gemspec
13
11
  - gem install mpw-9999.gem
14
12
  script:
15
13
  - rubocop
16
- - ruby ./test/tests.rb
14
+ - ruby ./test/init.rb
15
+ - ruby ./test/test_config.rb
16
+ - ruby ./test/test_item.rb
17
+ - ruby ./test/test_mpw.rb
18
+ - ruby ./test/test_translate.rb
19
+ - ruby ./test/init.rb
20
+ - ruby ./test/test_cli.rb
data/CHANGELOG.md CHANGED
@@ -1,9 +1,18 @@
1
1
  # CHANGELOG
2
- ## v4.1.1
2
+ ## v4.2.0 (2017-06-06)
3
+
4
+ * feat: improve the interface
5
+ * feat: add copy url
6
+ * feat: add unit tests for cli
7
+ * feat: comment the code with yarn syntax
8
+ * fix several bugs
9
+ * fix translations
10
+
11
+ ## v4.1.1 (2017-05-03)
3
12
 
4
13
  * fix bug in init
5
14
 
6
- ## v4.1.0
15
+ ## v4.1.0 (2017-04-22)
7
16
 
8
17
  * feat: add options to update or add an item in command line
9
18
  * feat: print config
@@ -12,18 +21,18 @@
12
21
  * fix: pinentry mode with gpg >= 2.1
13
22
  * remove SSH and FTP synchronization
14
23
 
15
- ## v4.0.0
24
+ ## v4.0.0 (2017-03-09)
16
25
 
17
26
  * feature: set default wallet
18
27
  * add option for generate a random password when you update an item
19
28
  * fix encryption when you share an existing wallet
20
29
  * several bugs fix
21
30
 
22
- ## v4.0.0-beta1
31
+ ## v4.0.0-beta1 (2017-02-16)
23
32
 
24
33
  * add manage share key with new interface
25
34
 
26
- ## v4.0.0-beta
35
+ ## v4.0.0-beta (2016-11-11)
27
36
 
28
37
  * new interface with a table
29
38
  * new command line interface
@@ -32,38 +41,50 @@
32
41
  * several bugs fix
33
42
  * add unit tests
34
43
 
35
- ## v3.2.1
44
+ ## v3.2.1 (2016-08-06)
36
45
 
37
46
  * fix bug when add a new item
38
47
 
39
- ## v3.2.0
48
+ ## v3.2.0 (2016-08-03)
40
49
 
41
50
  * add support OTP
42
51
  * fix bug in synchronize
43
52
  * improve interface
44
53
 
45
- ## v3.1.0
54
+ ## v3.1.0 (2016-07-09)
46
55
 
47
56
  * add clipboard
48
57
  * can change gpg version
49
58
  * minor change in interface
50
59
  * several bugs fix
51
60
 
52
- ## v3.0.0
61
+ ## v3.0.0 (2016-07-05)
53
62
 
54
63
  * new storage format
55
64
  * new share system
56
65
  * remove MPW server
57
66
 
58
- ## v2.0.0
67
+ ## v2.0.3 (2015-09-27)
68
+
69
+ * add no-sync option
70
+
71
+ ## v2.0.1 (2015-06-23)
72
+
73
+ * fix mpw-ssh
74
+
75
+ ## v2.0.0 (2015-06-22)
59
76
 
60
77
  * change format csv to yaml
61
78
  * easy install with gem
62
79
  * add sync with ftp and ssh
63
80
  * many improvement
64
81
 
65
- ## v1.1.0
82
+ ## v1.1.0 (2014-01-28)
66
83
 
67
84
  * Add sync with MPW Server
68
85
  * Add MPW Server
69
86
  * Fix minors bugs
87
+
88
+ ## v1.0.0 (2014-01-15)
89
+
90
+ * first release
data/Gemfile CHANGED
@@ -6,3 +6,9 @@ gem 'highline', '~> 1.7', '>= 1.7.8'
6
6
  gem 'i18n', '~> 0.7', '>= 0.7.0'
7
7
  gem 'locale', '~> 2.1', '>= 2.1.2'
8
8
  gem 'rotp', '~> 3.1', '>= 3.1.0'
9
+
10
+ group :development do
11
+ gem 'rubocop'
12
+ gem 'test-unit'
13
+ gem 'yard'
14
+ end
data/README.md CHANGED
@@ -1,5 +1,5 @@
1
1
  # MPW: Manage your passwords!
2
- [![Version](https://img.shields.io/badge/latest_version-4.1.1-green.svg)](https://github.com/nishiki/manage-password/releases)
2
+ [![Version](https://img.shields.io/badge/latest_version-4.2.0-green.svg)](https://github.com/nishiki/manage-password/releases)
3
3
  [![Build Status](https://travis-ci.org/nishiki/manage-password.svg?branch=master)](https://travis-ci.org/nishiki/manage-password)
4
4
  [![License](https://img.shields.io/badge/license-GPL--2.0-blue.svg)](https://github.com/nishiki/manage-password/blob/master/LICENSE)
5
5
 
@@ -31,7 +31,9 @@ mpw config --init user@host.com
31
31
 
32
32
  Add your first item:
33
33
  ```
34
- mpw add
34
+ mpw add --host assurance.com --port 443 --user user_2132 --protocol https --random
35
+ mpw add --host fric.com --user 230403 --otp-code 23434113 --protocol https --comment 'I love my bank' --random
36
+
35
37
  ```
36
38
 
37
39
  And list your items:
@@ -40,46 +42,45 @@ mpw list
40
42
  ```
41
43
  or search an item with
42
44
  ```
43
- mpw list --pattern Da
45
+ mpw list --pattern love
44
46
  mpw list --group bank
45
47
  ```
46
48
 
47
49
  Output:
48
50
  ```
49
- Bank
50
- ==============================================================================
51
- ID | Host | User | Protocol | Port | OTP | Comment
52
- ==============================================================================
53
- 1 | bank.com | 1234456 | https | | X |
54
-
55
- Linux
56
- ==============================================================================
57
- ID | Host | User | Protocol | Port | OTP | Comment
58
- ==============================================================================
59
- 2 | linuxfr.org | example | https | | | Da Linux French Site
51
+ Assurance
52
+ ==========================================================================
53
+ ID | Host | User | OTP | Comment
54
+ ==========================================================================
55
+ 1 | https://assurance.com:443 | user_2132 | |
60
56
 
57
+ Bank
58
+ ==========================================================================
59
+ ID | Host | User | OTP | Comment
60
+ ==========================================================================
61
+ 3 | https://fric.com | 230403 | X | I love my bank
61
62
  ```
62
63
 
63
64
  Copy a password, login or OTP code:
64
65
  ```
65
- mpw copy -p linuxfr
66
+ mpw copy -p assurance.com
66
67
  ```
67
68
 
68
69
  Update an item:
69
70
  ```
70
- mpw update -p linuxfr
71
+ mpw update -p assurance.com
71
72
  ```
72
73
 
73
74
  Delete an item:
74
75
  ```
75
- mpw delete -p linuxfr
76
+ mpw delete -p assurance.com
76
77
  ```
77
78
 
78
79
  ### Manage wallets
79
80
 
80
81
  List all available wallets:
81
82
  ```
82
- mpw wallet --list
83
+ mpw wallet
83
84
  ```
84
85
 
85
86
  List all GPG keys in wallet:
@@ -116,23 +117,23 @@ Example yaml file for mpw:
116
117
  ```
117
118
  ---
118
119
  1:
119
- host: bank.com
120
- user: 123456
120
+ host: fric.com
121
+ user: 230403
121
122
  group: Bank
122
- password: secret
123
+ password: 5XdiTQOubRDw9B0aJoMlcEyL
123
124
  protocol: https
124
- port:
125
- otp_key: 1afg34
126
- comment:
125
+ port:
126
+ otp_key: 330223432
127
+ comment: I love my bank
127
128
  2:
128
- host: linuxfr.org
129
- user: example
130
- group:
131
- password: 'complex %- password'
129
+ host: assurance.com
130
+ user: user_2132
131
+ group: Assurance
132
+ password: DMyK6B3v4bWO52VzU7aTHIem
132
133
  protocol: https
133
- port:
134
- otp_key:
135
- comment: Da Linux French Site
134
+ port: 443
135
+ otp_key:
136
+ comment:
136
137
  ```
137
138
 
138
139
  ### Config
data/VERSION CHANGED
@@ -1 +1 @@
1
- 4.1.1
1
+ 4.2.0
data/bin/mpw-config CHANGED
@@ -88,7 +88,7 @@ OptionParser.new do |opts|
88
88
  values[:pwd_special] = true
89
89
  end
90
90
 
91
- opts.on('-S', '--disable_special-chars', I18n.t('option.special_chars')) do
91
+ opts.on('-S', '--disable-special-chars', I18n.t('option.special_chars')) do
92
92
  values[:pwd_special] = false
93
93
  end
94
94
 
data/bin/mpw-update CHANGED
@@ -93,6 +93,8 @@ end.parse!
93
93
  config = MPW::Config.new(options[:config])
94
94
  cli = MPW::Cli.new(config)
95
95
 
96
+ options[:text_editor] = true if values.empty?
97
+
96
98
  cli.load_config
97
99
  cli.get_wallet(options[:wallet])
98
100
  cli.decrypt
data/bin/mpw-wallet CHANGED
@@ -74,12 +74,10 @@ cli = MPW::Cli.new(config)
74
74
 
75
75
  cli.load_config
76
76
 
77
- if options.key?(:list)
78
- cli.list_wallet
79
- elsif options.key?(:path)
77
+ if options.key?(:path)
80
78
  cli.get_wallet(options[:wallet])
81
79
  cli.set_wallet_path(options[:path])
82
- else
80
+ elsif options.key?(:list_keys) || options.key?(:gpg_key)
83
81
  cli.get_wallet(options[:wallet])
84
82
  cli.decrypt
85
83
 
@@ -88,4 +86,6 @@ else
88
86
  elsif options.key?(:gpg_key)
89
87
  options[:delete] ? cli.delete_key(options[:gpg_key]) : cli.add_key(options[:gpg_key])
90
88
  end
89
+ else
90
+ cli.list_wallet
91
91
  end
data/i18n/en.yml CHANGED
@@ -5,27 +5,27 @@ en:
5
5
  config:
6
6
  write: "Can't write the config file!"
7
7
  load: "Checkconfig failed!"
8
- key_bad_format: "The key string isn't in good format!"
9
- no_key_public: "You haven't the public key of %{key}!"
8
+ key_bad_format: "The key string isn't in the right format!"
9
+ no_key_public: "You haven't entered the public key of %{key}!"
10
10
  genkey_gpg:
11
11
  exception: "Can't create the GPG key!"
12
12
  name: "You must define a name for your GPG key!"
13
13
  password: "You must define a password for your GPG key!"
14
- empty: "The class is void"
14
+ empty: "The class is empty"
15
15
  export: "Can't export, unable to write in %{file}!"
16
16
  export_key: "Can't export the GPG key"
17
17
  gpg_file:
18
18
  decrypt: "Can't decrypt file!"
19
19
  encrypt: "Can't encrypt the GPG file!"
20
20
  mpw_file:
21
- read_data: "Can't to read the MPW file!"
22
- write_data: "Can't to write the MPW file!"
21
+ read_data: "Can't read the MPW file!"
22
+ write_data: "Can't write the MPW file!"
23
23
  import: "Can't import, unable to read %{file}!"
24
24
  update:
25
25
  host_empty: "You must define a host!"
26
26
 
27
27
  warning:
28
- select: 'Your choice is not a valid element!'
28
+ select: 'Your choice is not a valid item!'
29
29
 
30
30
  command:
31
31
  add: "Add a new item"
@@ -41,37 +41,37 @@ en:
41
41
 
42
42
  option:
43
43
  add: "Add an item or key"
44
- add_gpg_key: "Share the wallet with an other GPG key"
45
- alpha: "Use letter to generate a password"
44
+ add_gpg_key: "Share the wallet with another GPG key"
45
+ alpha: "Use letter to create a password"
46
46
  comment: "Specify a comment"
47
47
  config: "Specify the configuration file to use"
48
48
  clipboard: "Disable the clipboard feature"
49
- default_path: "Move the wallet in default directory"
49
+ default_path: "Move the wallet to the default directory"
50
50
  default_wallet: "Specify the default wallet to use"
51
- delete_gpg_key: "Delete the wallet's share with an other GPG key"
52
- disable_alpha: "Don't use letter to generate a password"
53
- disable_numeric: "Don't use number to generate a password"
51
+ delete_gpg_key: "Delete wallet sharing with an other GPG key"
52
+ disable_alpha: "Don't use letters to create a password"
53
+ disable_numeric: "Don't use numbers to generate a password"
54
54
  disable_pinmode: "Disable the pinentry mode"
55
- disable_special_chars: "Don't use special char to generate a password"
55
+ disable_special_chars: "Don't use special char to create a password"
56
56
  export: "Export a wallet in an yaml file"
57
- file_export: "Specify the file where export data"
57
+ file_export: "Specify the file to export data"
58
58
  file_import: "Specify the file to import"
59
- force: "No ask to confirm when you delete an item"
60
- generate_password: "Generate a random password (default 8 characters)"
59
+ force: "Do not ask confirmation when deleting an item"
60
+ generate_password: "Create a random password (default 8 characters)"
61
61
  gpg_exe: "Set the gpg binary path to use"
62
62
  gpg_key: "Specify a GPG key (ex: user@example.com)"
63
63
  group: "Search the items with specified group"
64
64
  help: "Show this help message"
65
65
  host: "Specify a host or ip"
66
66
  init: "Initialize mpw"
67
- import: "Import item since a yaml file"
68
- key: "Specify the key name"
67
+ import: "Import item from an yaml file"
68
+ key: "Define the key name"
69
69
  lang: "Set the software language"
70
70
  length: "Size of the password"
71
71
  list: "List the wallets"
72
72
  list_keys: "List the GPG keys in wallet"
73
- new_group: "Specify the group for the item"
74
- numeric: "Use number to generate a password"
73
+ new_group: "Define a group for the item"
74
+ numeric: "Use number to create a password"
75
75
  otp_code: "Set an otp key"
76
76
  path: "Move the wallet in new specify directory"
77
77
  pattern: "Given search pattern"
@@ -81,11 +81,11 @@ en:
81
81
  random_password: "Generate a random password"
82
82
  setup: "Create a new configuration file"
83
83
  setup_wallet: "Create a new configuration file for a wallet"
84
- special_chars: "Use special char to generate a password"
85
- show: "Search and show the items"
86
- show_all: "List all items"
84
+ special_chars: "Use special char to create a password"
85
+ show: "Search and display the items"
86
+ show_all: "Listing all items"
87
87
  text_editor: "Use text editor to edit the item"
88
- usage: "Usage"
88
+ usage: "Use"
89
89
  user: "Set an user"
90
90
  wallet: "Specify a wallet to use"
91
91
  wallet_dir: "Set the wallets folder"
@@ -95,13 +95,13 @@ en:
95
95
  add_key:
96
96
  valid: "Key has been added!"
97
97
  add_item:
98
- name: "The item's name (mandatory"
99
- group: "The group's name"
100
- host: "The hostname or ip"
101
- protocol: "The protocol of the connection (ssh, http, ...)"
102
- login: "The login of connection"
103
- password: "The password"
104
- port: "The connection port"
98
+ name: "Item name (mandatory)"
99
+ group: "Group name"
100
+ host: "Hostname or ip"
101
+ protocol: "Connection protocol (ssh, http, ...)"
102
+ login: "Connection ID"
103
+ password: "Password"
104
+ port: "Connection port"
105
105
  comment: "A comment"
106
106
  otp_key: "The OTP secret"
107
107
  valid: "Item has been added!"
@@ -110,9 +110,11 @@ en:
110
110
  clean: "The clipboard has been cleaned."
111
111
  login: "The login has been copied in clipboard."
112
112
  password: "The password has been copied in clipboard for 30s!"
113
- otp: "The OTP code has been copied for %{time}s!"
113
+ otp: "The OTP code has been copied %{time}s!"
114
+ url: "The URL has been copied in clipboard."
114
115
  help:
115
116
  name: "Help"
117
+ url: "Press <u> to copy URL"
116
118
  login: "Press <l> to copy the login"
117
119
  password: "Press <p> to copy the password"
118
120
  otp_code: "Press <o> to copy the otp code"
@@ -120,18 +122,18 @@ en:
120
122
  delete_key:
121
123
  valid: "Key has been deleted!"
122
124
  delete_item:
123
- ask: "Are you sure you want to remove the item ?"
125
+ ask: "Are you sure you want to remove this item ?"
124
126
  valid: "The item has been removed!"
125
127
  import:
126
128
  ask: "Are you sure you want to import this file %{file} ?"
127
129
  file_empty: "The import file is empty!"
128
130
  file_not_exist: "The import file doesn't exist!"
129
- valid: "The import is succesfull!"
131
+ valid: "The import is successful!"
130
132
  not_valid: "No data to import!"
131
133
  set_config:
132
134
  valid: "The config file has been edited!"
133
135
  set_wallet_path:
134
- valid: "The wallet has well moved!"
136
+ valid: "The wallet has been moved!"
135
137
  setup_config:
136
138
  title: "Setup a new config file"
137
139
  lang: "Choose your language (en, fr, ...) [default=%{lang}]: "
@@ -141,36 +143,36 @@ en:
141
143
  valid: "The config file has been created!"
142
144
  setup_gpg_key:
143
145
  title: "Setup a GPG key"
144
- ask: "Do you want create your GPG key ? (Y/n)"
145
- no_create: "You must create manually your GPG key or relaunch the software."
146
+ ask: "Do you want to create your GPG key ? (Y/n)"
147
+ no_create: "You must to create manually your GPG key or relaunch the software."
146
148
  name: "Your name and lastname: "
147
149
  password: "A password for the GPG key: "
148
150
  confirm_password: "Confirm your password: "
149
151
  error_password: "Your passwords aren't identical!"
150
152
  length: "Size of the GPG key [default=2048]: "
151
153
  expire: "Expire time of the GPG key [default=0 (unlimited)]: "
152
- wait: "Please waiting during the GPG key generate, this process can take few minutes."
154
+ wait: "Please wait until GPG key is created, this process can take a few minutes."
153
155
  valid: "Your GPG key has been created ;-)"
154
156
  update_item:
155
- name: "The item's name (mandatory"
156
- group: "The group's name"
157
- host: "The hostname or ip"
158
- protocol: "The protocol of the connection (ssh, http, ...)"
159
- login: "The login of connection"
160
- password: "The password (leave empty if you don't want change)"
161
- port: "The connection port"
157
+ name: "Item name (mandatory)"
158
+ group: "Group name"
159
+ host: "Hostname or ip"
160
+ protocol: "Connection protocol (ssh, http, ...)"
161
+ login: "Login id"
162
+ password: "Password (leave empty if you don't want to update it)"
163
+ port: "Connection port"
162
164
  comment: "A comment"
163
- otp_key: "The OTP secret (leave empty if you don't want change"
165
+ otp_key: "Secret OTP (leave empty if you don't want to update it"
164
166
  valid: "Item has been updated!"
165
167
  export:
166
- valid: "The export in %{file} is succesfull!"
168
+ valid: "The export in %{file} is successful!"
167
169
 
168
170
  display:
169
171
  comment: "Comment"
170
172
  config: "Configuration"
171
173
  error: "ERROR"
172
174
  keys: "GPG keys"
173
- gpg_password: "GPG passphrase: "
175
+ gpg_password: "GPG password: "
174
176
  group: "Group"
175
177
  login: "Login"
176
178
  name: "Name"