tug 0.0.6 → 0.0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tug/command/provision_command.rb +2 -0
- data/lib/tug/keychain/keychain.rb +8 -0
- data/lib/tug/version.rb +1 -1
- data/spec/keychain_spec.rb +10 -0
- data/spec/output.txt +0 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e1f066ca1ec2ee9e8bd50c118e4c886e6f40936
|
4
|
+
data.tar.gz: 3e3c7568b877698ef35f68f3d9611917af5b2d4a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5a64c83652aebcb0292843ec17e68c6f52682e55e6a81d5d9953ffd2fd4dddef9201b1442c61c632a061a7f637ff820e97177176e1ec38aea688976f1ce51a18
|
7
|
+
data.tar.gz: 730887b46c17cdd92250cbd769862879dc64ec5e3c6d2596e38cef986156522baeb38e64da963876771fc76e82fd9efa37d903c398667bbaaf877b51ebcb8131
|
@@ -37,6 +37,14 @@ module Tug
|
|
37
37
|
system("security delete-keychain #{name}.keychain")
|
38
38
|
end
|
39
39
|
|
40
|
+
def unlock_keychain
|
41
|
+
system("security unlock-keychain -p tug #{name}.keychain")
|
42
|
+
end
|
43
|
+
|
44
|
+
def set_timeout
|
45
|
+
system("security set-keychain-settings -t 3600 -u #{name}.keychain")
|
46
|
+
end
|
47
|
+
|
40
48
|
def import_apple_certificate
|
41
49
|
system(import_command(apple_certificate))
|
42
50
|
end
|
data/lib/tug/version.rb
CHANGED
data/spec/keychain_spec.rb
CHANGED
@@ -58,6 +58,16 @@ describe Tug::Keychain do
|
|
58
58
|
@keychain.delete_keychain
|
59
59
|
end
|
60
60
|
|
61
|
+
it "should unlock the keychain" do
|
62
|
+
expect(@keychain).to receive(:system).with("security unlock-keychain -p tug tug.keychain")
|
63
|
+
@keychain.unlock_keychain
|
64
|
+
end
|
65
|
+
|
66
|
+
it "should set a timeout" do
|
67
|
+
expect(@keychain).to receive(:system).with("security set-keychain-settings -t 3600 -u tug.keychain")
|
68
|
+
@keychain.set_timeout
|
69
|
+
end
|
70
|
+
|
61
71
|
it "should import the apple certificate" do
|
62
72
|
expect(@keychain).to receive(:system).with("security import apple -k #{File.expand_path('~')}/Library/Keychains/tug.keychain -T /usr/bin/codesign")
|
63
73
|
@keychain.import_apple_certificate
|
data/spec/output.txt
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tug
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Fish
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-08-
|
11
|
+
date: 2014-08-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|