cocoapods-keys 1.5.2 → 1.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8a07fb862648b34a728c83007508151bedac25da
4
- data.tar.gz: f4f3e62cc1b22b67b8cfdcff47612b573795c741
3
+ metadata.gz: 4efe92530d8cf8df66b335ffced3d0f30e53ca2a
4
+ data.tar.gz: 273b80759d865b986ea7b640c59e0d77edc01654
5
5
  SHA512:
6
- metadata.gz: d11679c4d55a1e06fb76ab79c56b19ffcfd062d06c1ac049be5984031e5829dc0856739aa2918ecc7e3faf53011cb0a57c0fd0bfe26116687f179a2bf219186f
7
- data.tar.gz: 05828c1725dbd7dc244d0ff967fe9a682541e6972a42734b41189a56ec58ceab152ca39d5787747b45bb9d1119b17d19df662954df384148ddf603d6cfa78b1d
6
+ metadata.gz: 864fa1dc9e1a845857ea1eafc3b7a053025bfd4515780c2ab7ff2dfb81769e952530f487ab7d5275ce1f08cbc111d4ece0131625f6755f4ee7f96d1941288b52
7
+ data.tar.gz: f140fff40e931630cb2db004fec188201ecba954e570e4f863410febd9f7772db1a5c121b9c3361b2ee8c0e28ee5d8150d844d0635c1495088751dc72ddaa5ad
@@ -1,5 +1,9 @@
1
1
  ## Master
2
2
 
3
+ ## 1.6.0
4
+
5
+ * Adds `export` command to export keys in consumable way [ashfurrow]
6
+
3
7
  ## 1.5.2
4
8
 
5
9
  * Don't ask for input in CI [x2on]
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-keys (1.5.2)
4
+ cocoapods-keys (1.6.0)
5
5
  dotenv
6
6
  osx_keychain
7
7
 
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsKeys
2
- VERSION = '1.5.2'
2
+ VERSION = '1.6.0'
3
3
  end
@@ -7,6 +7,7 @@ module Pod
7
7
  require 'pod/command/keys/set'
8
8
  require 'pod/command/keys/get'
9
9
  require 'pod/command/keys/rm'
10
+ require 'pod/command/keys/export'
10
11
 
11
12
  self.summary = 'A key value store for environment settings in Cocoa Apps.'
12
13
 
@@ -0,0 +1,30 @@
1
+ require 'keyring_liberator'
2
+
3
+ module Pod
4
+ class Command
5
+ class Keys
6
+ class Export < Keys
7
+ self.summary = 'Exports commands to recreate the key setup.'
8
+
9
+ self.description = <<-DESC
10
+ Gives a list of all the pod keys commands necessary to recreate the key setup on another machine.
11
+ DESC
12
+
13
+ def run
14
+ # List all settings for current app
15
+ this_keyring = get_current_keyring
16
+ raise 'Could not load keyring' unless this_keyring
17
+ export_current_keyring this_keyring
18
+ end
19
+
20
+ def export_current_keyring(keyring)
21
+ data = keyring.keychain_data
22
+ data.each do |key, value|
23
+ UI.puts "pod keys set #{key} \"#{value}\" #{keyring.name}"
24
+ end
25
+ UI.puts
26
+ end
27
+ end
28
+ end
29
+ end
30
+ end
@@ -49,6 +49,17 @@ describe 'CocoaPodsKeys functional tests' do
49
49
  end
50
50
  end
51
51
 
52
+ it 'is able to export the correct keys from the command-line' do
53
+ Dir.chdir(@tmpdir) do
54
+ exported_keys = <<-EOS
55
+ pod keys set KeyWithData "such-data" TestProject
56
+ pod keys set AnotherKeyWithData "other-data" TestProject
57
+ pod keys set UnusedKey "-" TestProject
58
+ EOS
59
+ expect(`pod keys export`.strip).to eq(exported_keys.strip)
60
+ end
61
+ end
62
+
52
63
  describe 'with a built keys implementation' do
53
64
  before :all do
54
65
  name = 'TestProjectKeys'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-keys
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-09-30 00:00:00.000000000 Z
12
+ date: 2015-11-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: osx_keychain
@@ -124,6 +124,7 @@ files:
124
124
  - lib/name_whisperer.rb
125
125
  - lib/plugin.rb
126
126
  - lib/pod/command/keys.rb
127
+ - lib/pod/command/keys/export.rb
127
128
  - lib/pod/command/keys/get.rb
128
129
  - lib/pod/command/keys/list.rb
129
130
  - lib/pod/command/keys/rm.rb