acm 0.5.0 → 0.5.1

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
- SHA1:
3
- metadata.gz: 1d99dfd2a6a632f0588476078623d8295e9babb3
4
- data.tar.gz: 04361702b36905dfeb9541d61d6dfbd584fefc77
2
+ SHA256:
3
+ metadata.gz: f119232262df850989d12ed8514c9daa00d61ec123f7607dccfc4f1e2115aebb
4
+ data.tar.gz: 0a20ad7af80517042de6035d4a32904f2063e1e0a334cd3bfaa4011b7da427f4
5
5
  SHA512:
6
- metadata.gz: ada777666330f67910064a3966ddfe284cf2000be58b16f7e226900c9c69452af86e4d189bea9b565a23b8e13e4f8afb2eb687d3febb6a7dd8a7f85874fd86d9
7
- data.tar.gz: 1f5068c7d6d1caaeb20bc35d12d78213ec344f9c09014263688d338077a3f54cf841e8247574ea1fcb8e6d2d9917999ed371b0abccfa0255f0496dae373fbc05
6
+ metadata.gz: d36c7b56997e4241e44eac8e04cca5d7ee274e03d199465c31744e3ec5d976bac394fa02884bc9da07db8e7a6b79c4a3b472f955b5740be17ebe747af59f4c97
7
+ data.tar.gz: c65e86e1acbb23325f378aa04a8ed7bfbcc21050c77d59db4a477aa9a4db736d7653aaf55b27a97fdfb6fb1d5b82b38854a5419fedf1560764efaee9b0f62807
data/.gitignore CHANGED
@@ -7,3 +7,4 @@
7
7
  /pkg/
8
8
  /spec/reports/
9
9
  /tmp/
10
+ .ruby-version
data/Gemfile CHANGED
@@ -2,3 +2,5 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in acm.gemspec
4
4
  gemspec
5
+
6
+ gem "ffi", :platforms => [:mswin, :mingw, :x64_mingw]
data/README.md CHANGED
@@ -41,7 +41,8 @@ Show details:
41
41
  email: takatoh.m@gmail.com
42
42
  password: xxxxxxxx
43
43
 
44
- In default, value of password is masked. If you see password, give --pass option.
44
+ In default, value of password is masked. If you see the password, give --pass option.
45
+ Or --clip option copies the password to clipboard.
45
46
 
46
47
  Update value of key:
47
48
 
@@ -70,14 +71,14 @@ Rename account:
70
71
 
71
72
  And remove account:
72
73
 
73
- > acm remove-account takatoh.m@gmail.com
74
- Account: takatoh.m@gmail.com
74
+ > acm remove-account Gmail
75
+ Account: Gmail
75
76
  email: takatoh.m@gmail.com
76
77
 
77
78
  Are you sure?(y/n) y # Enter 'y' to remove.
78
79
 
79
- > acm show takatoh.m@gmail.com
80
- No such account: takatoh.m@gmail.com
80
+ > acm show Gmail
81
+ No such account: Gmail
81
82
 
82
83
 
83
84
  ## License
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "bundler", "~> 2.0"
31
31
  spec.add_development_dependency "rake", ">= 12.3.3"
32
32
  spec.add_runtime_dependency "thor"
33
+ spec.add_runtime_dependency "clipboard"
33
34
  end
data/exe/acm CHANGED
@@ -4,6 +4,7 @@
4
4
  require 'acm'
5
5
  require 'thor'
6
6
  require 'yaml'
7
+ require 'clipboard'
7
8
 
8
9
 
9
10
  class MyCLI < Thor
@@ -50,8 +51,9 @@ class MyCLI < Thor
50
51
  db.map{|a| a['account'] }.sort.each{|a| puts a }
51
52
  end
52
53
 
53
- desc "show ACCOUNT", "Show details of ACCOUNT"
54
- option :pass, :type => :boolean
54
+ desc "show [options] ACCOUNT", "Show details of ACCOUNT"
55
+ option :pass, :type => :boolean, :aliases => "-p", :desc => "Show password"
56
+ option :clip, :type => :boolean, :aliases => "-c", :desc => "Copy password to clipboard"
55
57
  def show(target)
56
58
  db = load_db
57
59
  account = lookup(target.encode("utf-8"), db)
@@ -64,6 +66,10 @@ class MyCLI < Thor
64
66
  puts " #{key}: #{val}"
65
67
  end
66
68
  end
69
+ if options[:clip]
70
+ password_key = account['details'].keys.select{|k| /pass/ =~ k}.first
71
+ Clipboard.copy(account['details'][password_key])
72
+ end
67
73
  else
68
74
  puts "No such account: #{target}"
69
75
  end
@@ -1,3 +1,3 @@
1
1
  module Acm
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
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.0
4
+ version: 0.5.1
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-01 00:00:00.000000000 Z
11
+ date: 2020-03-03 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -52,6 +52,20 @@ dependencies:
52
52
  - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: clipboard
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
55
69
  description: ''
56
70
  email:
57
71
  - takatoh.m@gmail.com
@@ -91,8 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
91
105
  - !ruby/object:Gem::Version
92
106
  version: '0'
93
107
  requirements: []
94
- rubyforge_project:
95
- rubygems_version: 2.5.2.1
108
+ rubygems_version: 3.0.1
96
109
  signing_key:
97
110
  specification_version: 4
98
111
  summary: A simple account manager (NOT SECURE ;p).