dotgpg 0.4.2 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/dotgpg.gemspec +3 -2
- data/lib/dotgpg/cli.rb +4 -2
- data/spec/cli_spec.rb +5 -0
- metadata +3 -24
- checksums.yaml.gz.sig +0 -2
- data.tar.gz.sig +0 -1
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d560d7f1e324191ef890a9879c3c24cd6cd50f3f
|
4
|
+
data.tar.gz: ea818ed74ff9ad9b507f56b810e497463060e4bd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 50f81f56e94fcce325947841f8610a0aa55f9a71cb3e68e66bd3a125ce8193396404e9e1c8d6d40836e9913a3b6130191cf4490cf841efe7c76384d889fb19c9
|
7
|
+
data.tar.gz: 6552c1afb406c4c7ddd0cdf95bd0060f96a52a50b511fada94524c2fb19dc5ba1bd4cbe4c03b1d2756e1d3edab6d9bf4c9ca76d9cd74ed080fb6252b916d03cf
|
data/dotgpg.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |gem|
|
2
2
|
gem.name = 'dotgpg'
|
3
|
-
gem.version = '0.
|
3
|
+
gem.version = '0.5.0'
|
4
4
|
|
5
5
|
gem.summary = 'gpg-encrypted backup for your dotenv files'
|
6
6
|
gem.description = "Easy management of gpg-encrypted backup files"
|
@@ -18,7 +18,8 @@ Gem::Specification.new do |gem|
|
|
18
18
|
gem.add_development_dependency 'pry-stack_explorer'
|
19
19
|
|
20
20
|
gem.cert_chain = `git ls-files certs`.split("\n")
|
21
|
-
|
21
|
+
private_key = "~/.ssh/dotgpg-private_key.pem"
|
22
|
+
gem.signing_key = File.expand_path(private_key) if File.exists?(private_key)
|
22
23
|
|
23
24
|
gem.executables = 'dotgpg'
|
24
25
|
gem.files = `git ls-files`.split("\n")
|
data/lib/dotgpg/cli.rb
CHANGED
@@ -19,12 +19,14 @@ class Dotgpg
|
|
19
19
|
key = Dotgpg::Key.secret_key(options[:email], options[:"new-key"])
|
20
20
|
|
21
21
|
info "Initializing new dotgpg directory"
|
22
|
-
info " #{directory}/README.md"
|
22
|
+
info " #{directory}/README.md" unless File.exist? 'README.md'
|
23
23
|
info " #{directory}/.gpg/#{key.email}"
|
24
24
|
|
25
25
|
FileUtils.mkdir_p(dir.dotgpg)
|
26
|
-
|
26
|
+
unless File.exist? 'README.md'
|
27
|
+
FileUtils.cp Pathname.new(__FILE__).dirname.join("template/README.md"), dir.path.join("README.md")
|
27
28
|
dir.add_key(key)
|
29
|
+
end
|
28
30
|
end
|
29
31
|
|
30
32
|
desc "key", "export your GPG public key in a format that `dotgpg add` will understand"
|
data/spec/cli_spec.rb
CHANGED
@@ -30,6 +30,11 @@ describe Dotgpg::Cli do
|
|
30
30
|
assert_equal $fixture.join("create-3", ".gpg", "test@example.com").read, GPGME::Key.find(:secret).first.export(armor: true).to_s
|
31
31
|
end
|
32
32
|
|
33
|
+
it "should not add a README if there is already one" do |variable|
|
34
|
+
FileUtils.touch 'README.md'
|
35
|
+
assert_not_equal File.read('README.md'), File.read($basic + 'README.md')
|
36
|
+
end
|
37
|
+
|
33
38
|
it "should fail if the .gpg directory already exists" do
|
34
39
|
FileUtils.mkdir_p $fixture + "create-4" + ".gpg"
|
35
40
|
assert_fails(/\.gpg already exists/) do
|
metadata
CHANGED
@@ -1,36 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dotgpg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Conrad Irwin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain:
|
11
|
-
-
|
12
|
-
|
13
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tc30+TK
|
28
|
-
b09/9meErmiPDAaSn6fI9ByMH3MxejmzaOYNOd46en7ZozE7+TV1Raki7z02mVLf
|
29
|
-
GOPiw6pc9L3aCuOiBZpuQ7tvOnz7uC5UJoqQCGw1raH8iRKYA/i/vmm8PGoljEPp
|
30
|
-
gLyWHKGlzF8V2keVvIruAi8wnK4W1JPnwyhkpXEt9/opM8rSAwAkXkt9AW2hBQsj
|
31
|
-
ADrXAGfMsGRlN0pKG0siBZBhm8c=
|
32
|
-
-----END CERTIFICATE-----
|
33
|
-
date: 2014-07-31 00:00:00.000000000 Z
|
11
|
+
- certs/gem-public_cert.pem
|
12
|
+
date: 2014-12-03 00:00:00.000000000 Z
|
34
13
|
dependencies:
|
35
14
|
- !ruby/object:Gem::Dependency
|
36
15
|
name: thor
|
checksums.yaml.gz.sig
DELETED
data.tar.gz.sig
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
6Dz�������cᅱ�%~�o��Z]qWC����$W^A�`VK�],'�'�@{u�u�_�P�u����I���"�L'���MPZl���4�:������o�������~���i@8Gn���:�sk��( �z�f� ��(�|���S/X��2 �v�a�^��9x-��D�N���������d8 �$X���u߬i�Eujx1*O�j�IX�ܐ��]��Cſ\ߎ�@��U��v�zd���4䌰���h��X�
|
metadata.gz.sig
DELETED
Binary file
|