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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 39ae79101ea526c3926a8784e5d6d6295e938935
4
- data.tar.gz: 8fc024b7c0579f1e20bb42f3141ae90cb5e60cf7
3
+ metadata.gz: b330e00d3cefb813db3d9f85d6cd525e5f91640b
4
+ data.tar.gz: 6dc6e660a1ba8dafc1dbb72c82f9a65e253ba3e8
5
5
  SHA512:
6
- metadata.gz: 44c690a96ab0ef9f44ad4746d39d36acec11808cb23e9463eefed5d3bef4eed6787eb5acc2ab4c593a8eee805d4a82096c87a31424413d74991c8856f0639a72
7
- data.tar.gz: a70cddc692258d4d9005b41817beb0230dbd32b9f80fa393756822e0807226eff04bffcc2ca953c42aeaa0d1989b408a64ecccfee44e03934a266ef103f087bb
6
+ metadata.gz: fdb14a117059a366d5721c5015136f0765b85924c925b975679d062398f9c2c8cfd7d95c72d420258c8672bdc84cd6e9853ca35788a7087b0ae17230631b0550
7
+ data.tar.gz: e55bb7961a64c205e968bb7715add640629ca7ca29bd43669c87e6652df5df2ac4d14b42946d713ec95b9dc1bb5be392013ca2e81040357cffdd676ff8ba1108
@@ -1,5 +1,9 @@
1
1
  ## Master
2
2
 
3
+ ## 1.7.0
4
+
5
+ * Fixes undefined method '*' for nil:NilClass issue on first run [rpassis]
6
+
3
7
  ## 1.6.1
4
8
 
5
9
  * Uses CocoaPods 0.37's pre-install plugins hooks, this fixes issues with migrations to 1.0 [orta]
data/Gemfile CHANGED
@@ -3,4 +3,4 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in cocoapods-keys.gemspec
4
4
  gemspec
5
5
 
6
- gem 'cocoapods', '1.0.0.beta.6'
6
+ gem 'cocoapods', '1.0.0.beta.6'
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-keys (1.6.1)
4
+ cocoapods-keys (1.7.0)
5
5
  dotenv
6
6
  osx_keychain
7
7
 
@@ -110,4 +110,4 @@ DEPENDENCIES
110
110
  rubocop
111
111
 
112
112
  BUNDLED WITH
113
- 1.11.2
113
+ 1.12.5
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsKeys
2
- VERSION = '1.6.1'.freeze
2
+ VERSION = '1.7.0'.freeze
3
3
  end
@@ -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
@@ -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
@@ -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.6.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-04-04 00:00:00.000000000 Z
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.4.8
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: