cocoapods-keys 1.6.1 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +2 -2
- data/lib/cocoapods_keys.rb +1 -1
- data/lib/key_master.rb +1 -2
- data/lib/pod/command/keys.rb +2 -1
- data/lib/pod/command/keys/generate.rb +41 -0
- data/lib/preinstaller.rb +9 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b330e00d3cefb813db3d9f85d6cd525e5f91640b
|
4
|
+
data.tar.gz: 6dc6e660a1ba8dafc1dbb72c82f9a65e253ba3e8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fdb14a117059a366d5721c5015136f0765b85924c925b975679d062398f9c2c8cfd7d95c72d420258c8672bdc84cd6e9853ca35788a7087b0ae17230631b0550
|
7
|
+
data.tar.gz: e55bb7961a64c205e968bb7715add640629ca7ca29bd43669c87e6652df5df2ac4d14b42946d713ec95b9dc1bb5be392013ca2e81040357cffdd676ff8ba1108
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
data/lib/cocoapods_keys.rb
CHANGED
data/lib/key_master.rb
CHANGED
@@ -28,8 +28,7 @@ module CocoaPodsKeys
|
|
28
28
|
verify_keychain_integrity
|
29
29
|
|
30
30
|
# Generate a base64 hash string that is ~25 times the length of all keys
|
31
|
-
|
32
|
-
@data_length = @keys.values.map(&:length).reduce(:+) * (20 + rand(10))
|
31
|
+
@data_length = @keys.values.map(&:length).reduce(0, :+) * (20 + rand(10))
|
33
32
|
data = SecureRandom.base64(@data_length)
|
34
33
|
data += '\\"'
|
35
34
|
@data_length = data.length
|
data/lib/pod/command/keys.rb
CHANGED
@@ -8,8 +8,9 @@ module Pod
|
|
8
8
|
require 'pod/command/keys/get'
|
9
9
|
require 'pod/command/keys/rm'
|
10
10
|
require 'pod/command/keys/export'
|
11
|
+
require 'pod/command/keys/generate'
|
11
12
|
|
12
|
-
self.summary = 'A key value store for environment settings in Cocoa Apps
|
13
|
+
self.summary = 'A key value store for environment settings in Cocoa Apps'
|
13
14
|
|
14
15
|
self.description = <<-DESC
|
15
16
|
CocoaPods Keys will store sensitive data in your Mac's keychain. Then on running pod install they will be installed into your app's source code via the Pods library.
|
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'keyring_liberator'
|
2
|
+
require 'key_master'
|
3
|
+
require 'dotenv'
|
4
|
+
|
5
|
+
module Pod
|
6
|
+
class Command
|
7
|
+
class Keys
|
8
|
+
class Generate < Keys
|
9
|
+
self.summary = 'Generates the obfuscated class.'
|
10
|
+
|
11
|
+
self.description = <<-DESC
|
12
|
+
Generates the obfuscated Objective-C h/m files using the current key values.
|
13
|
+
DESC
|
14
|
+
|
15
|
+
def run
|
16
|
+
Dotenv.load
|
17
|
+
keyring = get_current_keyring
|
18
|
+
|
19
|
+
if keyring
|
20
|
+
|
21
|
+
# Create the h & m files in the same folder as the podspec
|
22
|
+
|
23
|
+
installation_root = Pod::Config.instance.installation_root
|
24
|
+
keys_path = installation_root.+('Pods/CocoaPodsKeys/')
|
25
|
+
|
26
|
+
key_master = CocoaPodsKeys::KeyMaster.new(keyring)
|
27
|
+
interface_file = keys_path + (key_master.name + '.h')
|
28
|
+
implementation_file = keys_path + (key_master.name + '.m')
|
29
|
+
|
30
|
+
File.write(interface_file, key_master.interface)
|
31
|
+
UI.puts "Generated #{interface_file}"
|
32
|
+
|
33
|
+
File.write(implementation_file, key_master.implementation)
|
34
|
+
UI.puts "Generated #{implementation_file}"
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
data/lib/preinstaller.rb
CHANGED
@@ -31,6 +31,15 @@ module CocoaPodsKeys
|
|
31
31
|
|
32
32
|
has_shown_intro = false
|
33
33
|
keys = options.fetch('keys', [])
|
34
|
+
|
35
|
+
# Remove keys from the keyring that no longer exist
|
36
|
+
original_keyring_keys = keyring.keys.clone
|
37
|
+
original_keyring_keys.each do |key|
|
38
|
+
keyring.keychain_has_key?(key)
|
39
|
+
end
|
40
|
+
|
41
|
+
# Add keys to the keyring that have been added,
|
42
|
+
# and prompt for their value if needed.
|
34
43
|
keys.each do |key|
|
35
44
|
unless keyring.keychain_has_key?(key)
|
36
45
|
unless has_shown_intro
|
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.
|
4
|
+
version: 1.7.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: 2016-
|
12
|
+
date: 2016-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: osx_keychain
|
@@ -125,6 +125,7 @@ files:
|
|
125
125
|
- lib/plugin.rb
|
126
126
|
- lib/pod/command/keys.rb
|
127
127
|
- lib/pod/command/keys/export.rb
|
128
|
+
- lib/pod/command/keys/generate.rb
|
128
129
|
- lib/pod/command/keys/get.rb
|
129
130
|
- lib/pod/command/keys/list.rb
|
130
131
|
- lib/pod/command/keys/rm.rb
|
@@ -163,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
164
|
version: '0'
|
164
165
|
requirements: []
|
165
166
|
rubyforge_project:
|
166
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.2.2
|
167
168
|
signing_key:
|
168
169
|
specification_version: 4
|
169
170
|
summary: CocoaPods Keys will store sensitive data in your Mac's keychain. Then on
|
@@ -180,3 +181,4 @@ test_files:
|
|
180
181
|
- spec/keyring_spec.rb
|
181
182
|
- spec/plugin_spec.rb
|
182
183
|
- spec/spec_helper.rb
|
184
|
+
has_rdoc:
|