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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4cbbce158fb85e6fdfd5bef8222318e185c1fd6a
4
- data.tar.gz: a480e0d51a26bca15128b412e19d7884495f49b6
3
+ metadata.gz: 3e1f066ca1ec2ee9e8bd50c118e4c886e6f40936
4
+ data.tar.gz: 3e3c7568b877698ef35f68f3d9611917af5b2d4a
5
5
  SHA512:
6
- metadata.gz: 40580a44ec5e85d50ceabb7881da0c1eb454bd61679f0432c290113ed5bb3944fca118573e0c8006ed424d78eebd88dc389f4e8b6f431e7396f0c5fc2e1b9406
7
- data.tar.gz: 0c5dae991023d318c4562cd57eb52f4194736760b8945c556d8612b35bdb410f7f0d145eb1c928a89d1258ff09227714b6b0c8690fcdab8f32712448c9386ce1
6
+ metadata.gz: 5a64c83652aebcb0292843ec17e68c6f52682e55e6a81d5d9953ffd2fd4dddef9201b1442c61c632a061a7f637ff820e97177176e1ec38aea688976f1ce51a18
7
+ data.tar.gz: 730887b46c17cdd92250cbd769862879dc64ec5e3c6d2596e38cef986156522baeb38e64da963876771fc76e82fd9efa37d903c398667bbaaf877b51ebcb8131
@@ -6,6 +6,8 @@ module Tug
6
6
 
7
7
  keychain.create_keychain
8
8
  keychain.select_keychain(keychain.name)
9
+ keychain.unlock_keychain
10
+ keychain.set_timeout
9
11
  keychain.import_apple_certificate
10
12
  keychain.import_distribution_certificate
11
13
  keychain.import_private_key
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Tug
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -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
@@ -1,2 +0,0 @@
1
- Config file missing:
2
- Try specifying a path to your config file with the --config option
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.6
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-01 00:00:00.000000000 Z
11
+ date: 2014-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor