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 +5 -5
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +3 -3
- data/lib/cocoapods_keys.rb +1 -1
- data/lib/key_master.rb +1 -1
- data/templates/Keys.m.erb +22 -34
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: b6c9529f911bc1da54b3bf5acecaab6c1e10922f0a662bf3e0301e336667c685
|
4
|
+
data.tar.gz: 83217559e14d12d768810cc1e294c3eafebbdac70a349091b80d914a031f22b7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: befbe6c59cfe87a18bef30ef6b175efdb282e018728e521a36c305047901cc6cb1ceb0e203acdbabfa6d10cbf8a789faeb0b6d55556fdcbf2f06efaf5070ee7d
|
7
|
+
data.tar.gz: f2b9a7a591e40a8b689e6989a9e00cd23e2ed8d8ea65b8bfcadb7b8768b3ce84c2e38f42fb47c176ffe9fc619868ead02fa15d456f3747f1daf80f46d3118c06
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-keys (2.
|
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.
|
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.
|
119
|
+
1.17.3
|
data/lib/cocoapods_keys.rb
CHANGED
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
|
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
|
-
|
12
|
-
#pragma clang diagnostic ignored "-Wincomplete-implementation"
|
10
|
+
@interface <%= @name %> ()
|
13
11
|
|
14
|
-
@
|
15
|
-
<%
|
16
|
-
@dynamic <%= key %>;<% end %>
|
12
|
+
<% @keys.each do |key, value| %>@property (nonatomic, copy) NSString *<%= key %>;
|
13
|
+
<% end %>
|
17
14
|
|
18
|
-
|
15
|
+
@end
|
19
16
|
|
20
|
-
|
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
|
-
|
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
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
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
|
-
|
45
|
-
|
46
|
-
return @"";
|
47
|
-
<% end %>
|
35
|
+
|
36
|
+
return self;
|
48
37
|
}
|
49
|
-
<% end %>
|
50
38
|
|
51
|
-
static
|
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.
|
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:
|
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
|
-
|
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
|