acm 0.5.1 → 0.6.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 (5) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +11 -2
  3. data/exe/acm +8 -0
  4. data/lib/acm/version.rb +1 -1
  5. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f119232262df850989d12ed8514c9daa00d61ec123f7607dccfc4f1e2115aebb
4
- data.tar.gz: 0a20ad7af80517042de6035d4a32904f2063e1e0a334cd3bfaa4011b7da427f4
3
+ metadata.gz: 25cfa0755c326883a85c8b3d64e7034ce6b809160d8f1c14386d7c9abe269bf6
4
+ data.tar.gz: 516d61261bffbca64ab569886af88df5ff4653c2eee53af1983867924b7771ee
5
5
  SHA512:
6
- metadata.gz: d36c7b56997e4241e44eac8e04cca5d7ee274e03d199465c31744e3ec5d976bac394fa02884bc9da07db8e7a6b79c4a3b472f955b5740be17ebe747af59f4c97
7
- data.tar.gz: c65e86e1acbb23325f378aa04a8ed7bfbcc21050c77d59db4a477aa9a4db736d7653aaf55b27a97fdfb6fb1d5b82b38854a5419fedf1560764efaee9b0f62807
6
+ metadata.gz: 3896bc1f473bdda5fc5864e1e42b6dd24b9cdcff28e9968c8e6320f4f80a75afddc422dd63da66bf1cd8477d47e7d69193374573a413323de6d155e9f81fe369
7
+ data.tar.gz: 244e65db2f672dd48a77eded3d99bd954764fa69b406acd9fb3f0ed184fd24ce92035675a188323afaebcbae5a81fe29dac1b6cfa43d7bafa853ba43272868c9
data/README.md CHANGED
@@ -9,6 +9,10 @@ Install it yourself as:
9
9
 
10
10
  > gem install acm
11
11
 
12
+ If you using Windows, pleas install ffi gem:
13
+
14
+ > gem install ffi
15
+
12
16
  ## Usage
13
17
 
14
18
  At first, init database:
@@ -34,12 +38,17 @@ List account(s):
34
38
  > acm list
35
39
  takatoh.m@gmail.com
36
40
 
41
+ Search account(s):
42
+
43
+ > acm search gmail
44
+ takatoh.m@gmail.com
45
+
37
46
  Show details:
38
47
 
39
48
  > acm show takatoh.m@gmail.com
40
49
  Account: takatoh.m@gmail.com
41
50
  email: takatoh.m@gmail.com
42
- password: xxxxxxxx
51
+ password: ******
43
52
 
44
53
  In default, value of password is masked. If you see the password, give --pass option.
45
54
  Or --clip option copies the password to clipboard.
@@ -48,7 +57,7 @@ Update value of key:
48
57
 
49
58
  > acm update takatoh.m@gmail.com password yyyyyyyy
50
59
 
51
- > acm show takatoh.m@gmail.com
60
+ > acm show --pass takatoh.m@gmail.com
52
61
  Account: takatoh.m@gmail.com
53
62
  email: takatoh.m@gmail.com
54
63
  password: yyyyyyyy
data/exe/acm CHANGED
@@ -51,6 +51,14 @@ class MyCLI < Thor
51
51
  db.map{|a| a['account'] }.sort.each{|a| puts a }
52
52
  end
53
53
 
54
+ desc "search PATTERN", "Search accounts by PATTERN"
55
+ def search(target)
56
+ db = load_db
57
+ pattern = /#{target.encode("utf-8")}/i
58
+ accounts = db.select{|a| pattern =~ a['account'].tr(" ", "") }
59
+ accounts.each{|a| puts a['account'] }
60
+ end
61
+
54
62
  desc "show [options] ACCOUNT", "Show details of ACCOUNT"
55
63
  option :pass, :type => :boolean, :aliases => "-p", :desc => "Show password"
56
64
  option :clip, :type => :boolean, :aliases => "-c", :desc => "Copy password to clipboard"
data/lib/acm/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Acm
2
- VERSION = "0.5.1"
2
+ VERSION = "0.6.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - takatoh
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-03-03 00:00:00.000000000 Z
11
+ date: 2020-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler