cocoapods-keys 2.1.0 → 2.2.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
- SHA1:
3
- metadata.gz: b910f42524934e5ca46ff37fb36c23bce9846bed
4
- data.tar.gz: 1458df4292c8c09cff10d8092aa7b0e9965fc1dd
2
+ SHA256:
3
+ metadata.gz: b6c9529f911bc1da54b3bf5acecaab6c1e10922f0a662bf3e0301e336667c685
4
+ data.tar.gz: 83217559e14d12d768810cc1e294c3eafebbdac70a349091b80d914a031f22b7
5
5
  SHA512:
6
- metadata.gz: a427fd01d8dfd2903c50d7a2721f1475601400e068a3a1dcb6bf172dd19d6542fcbdca5f7979e81c03a0c9aac2df7bb7c01968d14404982d19a4dd313df3cbd5
7
- data.tar.gz: 53442f6c071284a8f1690cb3968a4c53197d5d02006350d2be68b6546115731148d74be7a9decebf49fcf1b1857cb6d8861b2b00e6db10ba78b43f5e3cb2813c
6
+ metadata.gz: befbe6c59cfe87a18bef30ef6b175efdb282e018728e521a36c305047901cc6cb1ceb0e203acdbabfa6d10cbf8a789faeb0b6d55556fdcbf2f06efaf5070ee7d
7
+ data.tar.gz: f2b9a7a591e40a8b689e6989a9e00cd23e2ed8d8ea65b8bfcadb7b8768b3ce84c2e38f42fb47c176ffe9fc619868ead02fa15d456f3747f1daf80f46d3118c06
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  ## Master
2
2
 
3
+ ## 2.2.0
4
+
5
+ * Revised template which doesn't allow for secrets to appear in the binaries in modern Xcode builds. [ashfurrow]
6
+
3
7
  ## 2.1.0
4
8
 
5
9
  * Add the ability to manually specify keys when running `pod keys generate`. [fwal]
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-keys (2.1.0)
4
+ cocoapods-keys (2.2.0)
5
5
  dotenv
6
6
  osx_keychain
7
7
 
@@ -53,7 +53,7 @@ GEM
53
53
  colored (1.2)
54
54
  colored2 (3.1.2)
55
55
  diff-lcs (1.3)
56
- dotenv (2.6.0)
56
+ dotenv (2.7.4)
57
57
  escape (0.0.4)
58
58
  fourflusher (0.3.2)
59
59
  fuzzy_match (2.0.4)
@@ -116,4 +116,4 @@ DEPENDENCIES
116
116
  rubocop
117
117
 
118
118
  BUNDLED WITH
119
- 1.16.4
119
+ 1.17.3
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsKeys
2
- VERSION = '2.1.0'.freeze
2
+ VERSION = '2.2.0'.freeze
3
3
  end
data/lib/key_master.rb CHANGED
@@ -84,7 +84,7 @@ module CocoaPodsKeys
84
84
  end
85
85
 
86
86
  def key_data_arrays
87
- Hash[@indexed_keys.map { |key, value| [key, value.map { |i| name + "Data[#{i}]" }.join(', ')] }]
87
+ Hash[@indexed_keys.map { |key, value| [key, value.map { |i| '[' + name + "Data characterAtIndex:#{i}]" }.join(', ')] }]
88
88
  end
89
89
  end
90
90
  end
data/templates/Keys.m.erb CHANGED
@@ -4,51 +4,39 @@
4
4
  // For more information see https://github.com/orta/cocoapods-keys
5
5
  //
6
6
 
7
- #import <objc/runtime.h>
8
7
  #import <Foundation/NSDictionary.h>
9
8
  #import "<%= @name %>.h"
10
9
 
11
- #pragma clang diagnostic push
12
- #pragma clang diagnostic ignored "-Wincomplete-implementation"
10
+ @interface <%= @name %> ()
13
11
 
14
- @implementation <%= @name %>
15
- <% @keys.each do |key, value| %>
16
- @dynamic <%= key %>;<% end %>
12
+ <% @keys.each do |key, value| %>@property (nonatomic, copy) NSString *<%= key %>;
13
+ <% end %>
17
14
 
18
- #pragma clang diagnostic pop
15
+ @end
19
16
 
20
- + (BOOL)resolveInstanceMethod:(SEL)name
21
- {
22
- NSString *key = NSStringFromSelector(name);
23
- NSString * (*implementation)(<%= name %> *, SEL) = NULL;
24
- <% @keys.each do |key, value| %>
25
- if ([key isEqualToString:@"<%= key %>"]) {
26
- implementation = _podKeys<%= Digest::MD5.hexdigest(key) %>;
27
- }
28
- <% end %>
29
- if (!implementation) {
30
- return [super resolveInstanceMethod:name];
31
- }
17
+ @implementation <%= @name %>
32
18
 
33
- return class_addMethod([self class], name, (IMP)implementation, "@@:");
34
- }
35
- <% @keys.each do |key, value| %>
36
- static NSString *_podKeys<%= Digest::MD5.hexdigest(key) %>(<%= name %> *self, SEL _cmd)
19
+ - (instancetype)init
37
20
  {
38
- <% if @indexed_keys.length > 0 %>
39
- <% if @indexed_keys[key].length > 0 %>
40
- char cString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\0' };
41
- <% else %>
42
- char cString[1] = { '\0' };
21
+ if (!(self = [super init])) { return nil; }
22
+
23
+ <% @keys.each do |key, value| %>
24
+ char <%= key %>CString[<%= @indexed_keys[key].length + 1 %>] = { <%= key_data_arrays[key] %>, '\0' };
25
+ _<%= key %> = <% if @indexed_keys.length > 0 %>
26
+ <% if @indexed_keys[key].length > 0 %>
27
+ [NSString stringWithCString:<%= key %>CString encoding:NSUTF8StringEncoding];
28
+ <% else %>
29
+ @"";
30
+ <% end %>
31
+ <% else %>
32
+ @"";
33
+ <% end %>
43
34
  <% end %>
44
- return [NSString stringWithCString:cString encoding:NSUTF8StringEncoding];
45
- <% else %>
46
- return @"";
47
- <% end %>
35
+
36
+ return self;
48
37
  }
49
- <% end %>
50
38
 
51
- static char <%= name %>Data[<%= @data_length %>] = "<%= @data.gsub('\\', '\\\\\\').gsub('"', '\\"') if @data %>";
39
+ static NSString *<%= name %>Data = @"<%= @data.gsub('\\', '\\\\\\').gsub('"', '\\"') if @data %>";
52
40
 
53
41
  - (NSString *)description
54
42
  {
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: 2.1.0
4
+ version: 2.2.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: 2019-02-12 00:00:00.000000000 Z
12
+ date: 2020-03-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: osx_keychain
@@ -163,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
163
163
  - !ruby/object:Gem::Version
164
164
  version: '0'
165
165
  requirements: []
166
- rubyforge_project:
167
- rubygems_version: 2.5.2.3
166
+ rubygems_version: 3.1.2
168
167
  signing_key:
169
168
  specification_version: 4
170
169
  summary: CocoaPods Keys will store sensitive data in your Mac's keychain. Then on