akabei 0.3.1 → 0.3.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -1
- data/CHANGELOG.md +6 -0
- data/README.md +1 -1
- data/lib/akabei/signer.rb +13 -0
- data/lib/akabei/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4f24e73ac4a8f8c23310d5efca6ec404bd917304
|
4
|
+
data.tar.gz: 899db05e8f86421ec1424df696f047880f8381f0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35242fb745b91cb11fc7f4be3522b42fc4f87cfe2e88d9607e312ee8980f5c8dbd1921f411da7e407fb7ec162424ee447ce22f7147adfaecf150a9005b099077
|
7
|
+
data.tar.gz: 779a9bd2c6c594c41f94f2f4f0bcf229a043a7e7e8dca40a6dfbd4063cda34d86d2418b6e7a16ee3446a8ecc2016048e7d80f9ef79e2ecaa24599313f92c0406
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Akabei
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/akabei.png)](http://badge.fury.io/rb/akabei)
|
3
|
-
[![Build Status](https://
|
3
|
+
[![Build Status](https://api.travis-ci.org/eagletmt/akabei.png)](https://travis-ci.org/eagletmt/akabei)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/eagletmt/akabei.png)](https://codeclimate.com/github/eagletmt/akabei)
|
5
5
|
[![Coverage Status](https://coveralls.io/repos/eagletmt/akabei/badge.png)](https://coveralls.io/r/eagletmt/akabei)
|
6
6
|
|
data/lib/akabei/signer.rb
CHANGED
@@ -36,15 +36,28 @@ module Akabei
|
|
36
36
|
end
|
37
37
|
end
|
38
38
|
|
39
|
+
class AgentNotFound < Error
|
40
|
+
def initialize
|
41
|
+
super('gpg-agent is not running')
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
39
45
|
def self.get(gpg_key, crypto = nil)
|
40
46
|
gpg_key && new(gpg_key, crypto)
|
41
47
|
end
|
42
48
|
|
43
49
|
def initialize(gpg_key, crypto = nil)
|
50
|
+
check_gpg_agent!
|
44
51
|
@gpg_key = find_secret_key(gpg_key)
|
45
52
|
@crypto = crypto || GPGME::Crypto.new
|
46
53
|
end
|
47
54
|
|
55
|
+
def check_gpg_agent!
|
56
|
+
unless ENV['GPG_AGENT_INFO']
|
57
|
+
raise AgentNotFound.new
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
48
61
|
def detach_sign(path)
|
49
62
|
File.open(path) do |inp|
|
50
63
|
File.open("#{path}.sig", 'w') do |out|
|
data/lib/akabei/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: akabei
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kohei Suzuki
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gpgme
|
@@ -237,7 +237,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
237
237
|
version: '0'
|
238
238
|
requirements: []
|
239
239
|
rubyforge_project:
|
240
|
-
rubygems_version: 2.2.
|
240
|
+
rubygems_version: 2.2.2
|
241
241
|
signing_key:
|
242
242
|
specification_version: 4
|
243
243
|
summary: Custom repository manager for ArchLinux pacman
|