cocoapods-keys 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +9 -0
- data/.rubocop_cocoapods.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +2 -1
- data/Gemfile.lock +51 -45
- data/lib/cocoapods_keys.rb +1 -1
- data/lib/name_whisperer.rb +1 -1
- data/lib/pod/command/keys/generate.rb +9 -0
- data/lib/pod/command/keys/list.rb +4 -2
- data/lib/pod/command/keys/rm.rb +2 -2
- data/lib/preinstaller.rb +10 -3
- data/spec/functional_spec.rb +4 -4
- data/spec/plugin_spec.rb +3 -3
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8ac337ab98b12595508bac423ffda68ece2123fd
|
4
|
+
data.tar.gz: de8a32d1e0cd7e17ce9e17d94c71c47d023908ec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 40b176b7705d9099c50e341e4501c8b40705e3b147bfc6c49c34df4796c17e07178f9a6bde10f6d69753dd7a1bb99023af1d33573009531f06aaf382e5dc9de2
|
7
|
+
data.tar.gz: 80ad890268300ad76f1d5cf4e4e516ed707b50939a5770b2084ada4e7b99b5700e0f65cc65ca5bf3f35c3f06e260a4829fec8f606e89d135a52393ce2b803af0
|
data/.rubocop.yml
CHANGED
data/.rubocop_cocoapods.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,24 +1,24 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-keys (
|
4
|
+
cocoapods-keys (2.0.1)
|
5
5
|
dotenv
|
6
6
|
osx_keychain
|
7
7
|
|
8
8
|
GEM
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
|
+
CFPropertyList (2.3.5)
|
11
12
|
RubyInline (3.12.4)
|
12
13
|
ZenTest (~> 4.3)
|
13
|
-
ZenTest (4.11.
|
14
|
-
activesupport (4.2.
|
14
|
+
ZenTest (4.11.1)
|
15
|
+
activesupport (4.2.9)
|
15
16
|
i18n (~> 0.7)
|
16
|
-
json (~> 1.7, >= 1.7.7)
|
17
17
|
minitest (~> 5.1)
|
18
18
|
thread_safe (~> 0.3, >= 0.3.4)
|
19
19
|
tzinfo (~> 1.1)
|
20
|
-
ast (2.
|
21
|
-
claide (1.0.
|
20
|
+
ast (2.3.0)
|
21
|
+
claide (1.0.2)
|
22
22
|
cocoapods (1.0.0.beta.6)
|
23
23
|
activesupport (>= 4.0.2)
|
24
24
|
claide (>= 1.0.0.beta.3, < 2.0)
|
@@ -40,68 +40,74 @@ GEM
|
|
40
40
|
activesupport (>= 4.0.2)
|
41
41
|
fuzzy_match (~> 2.0.4)
|
42
42
|
nap (~> 1.0)
|
43
|
-
cocoapods-deintegrate (1.0.
|
44
|
-
cocoapods-downloader (1.
|
45
|
-
cocoapods-plugins (1.0.0
|
43
|
+
cocoapods-deintegrate (1.0.1)
|
44
|
+
cocoapods-downloader (1.1.3)
|
45
|
+
cocoapods-plugins (1.0.0)
|
46
46
|
nap
|
47
|
-
cocoapods-search (1.0.0
|
48
|
-
cocoapods-stats (1.0.0
|
49
|
-
cocoapods-trunk (1.
|
47
|
+
cocoapods-search (1.0.0)
|
48
|
+
cocoapods-stats (1.0.0)
|
49
|
+
cocoapods-trunk (1.2.0)
|
50
50
|
nap (>= 0.8, < 2.0)
|
51
51
|
netrc (= 0.7.8)
|
52
|
-
cocoapods-try (1.
|
52
|
+
cocoapods-try (1.1.0)
|
53
53
|
colored (1.2)
|
54
|
-
|
55
|
-
|
54
|
+
colored2 (3.1.2)
|
55
|
+
diff-lcs (1.3)
|
56
|
+
dotenv (2.2.1)
|
56
57
|
escape (0.0.4)
|
57
|
-
fourflusher (0.3.
|
58
|
+
fourflusher (0.3.2)
|
58
59
|
fuzzy_match (2.0.4)
|
59
|
-
i18n (0.
|
60
|
-
|
61
|
-
|
62
|
-
|
60
|
+
i18n (0.8.4)
|
61
|
+
minitest (5.10.2)
|
62
|
+
molinillo (0.4.5)
|
63
|
+
nanaimo (0.2.3)
|
63
64
|
nap (1.1.0)
|
64
65
|
netrc (0.7.8)
|
65
66
|
osx_keychain (1.0.1)
|
66
67
|
RubyInline (~> 3)
|
67
|
-
|
68
|
+
parallel (1.11.2)
|
69
|
+
parser (2.4.0.0)
|
68
70
|
ast (~> 2.2)
|
69
71
|
powerpack (0.1.1)
|
70
|
-
rainbow (2.
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
rspec-
|
75
|
-
rspec-
|
76
|
-
|
77
|
-
|
78
|
-
|
72
|
+
rainbow (2.2.2)
|
73
|
+
rake
|
74
|
+
rake (12.0.0)
|
75
|
+
rspec (3.6.0)
|
76
|
+
rspec-core (~> 3.6.0)
|
77
|
+
rspec-expectations (~> 3.6.0)
|
78
|
+
rspec-mocks (~> 3.6.0)
|
79
|
+
rspec-core (3.6.0)
|
80
|
+
rspec-support (~> 3.6.0)
|
81
|
+
rspec-expectations (3.6.0)
|
79
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
|
-
rspec-support (~> 3.
|
81
|
-
rspec-mocks (3.
|
83
|
+
rspec-support (~> 3.6.0)
|
84
|
+
rspec-mocks (3.6.0)
|
82
85
|
diff-lcs (>= 1.2.0, < 2.0)
|
83
|
-
rspec-support (~> 3.
|
84
|
-
rspec-support (3.
|
85
|
-
rubocop (0.
|
86
|
-
|
86
|
+
rspec-support (~> 3.6.0)
|
87
|
+
rspec-support (3.6.0)
|
88
|
+
rubocop (0.49.1)
|
89
|
+
parallel (~> 1.10)
|
90
|
+
parser (>= 2.3.3.1, < 3.0)
|
87
91
|
powerpack (~> 0.1)
|
88
92
|
rainbow (>= 1.99.1, < 3.0)
|
89
93
|
ruby-progressbar (~> 1.7)
|
90
94
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
91
|
-
ruby-progressbar (1.
|
92
|
-
thread_safe (0.3.
|
93
|
-
tzinfo (1.2.
|
95
|
+
ruby-progressbar (1.8.1)
|
96
|
+
thread_safe (0.3.6)
|
97
|
+
tzinfo (1.2.3)
|
94
98
|
thread_safe (~> 0.1)
|
95
|
-
unicode-display_width (1.0
|
96
|
-
xcodeproj (1.
|
97
|
-
|
98
|
-
claide (>= 1.0.
|
99
|
-
|
99
|
+
unicode-display_width (1.3.0)
|
100
|
+
xcodeproj (1.5.0)
|
101
|
+
CFPropertyList (~> 2.3.3)
|
102
|
+
claide (>= 1.0.2, < 2.0)
|
103
|
+
colored2 (~> 3.1)
|
104
|
+
nanaimo (~> 0.2.3)
|
100
105
|
|
101
106
|
PLATFORMS
|
102
107
|
ruby
|
103
108
|
|
104
109
|
DEPENDENCIES
|
110
|
+
activesupport (< 5)
|
105
111
|
bundler (~> 1.3)
|
106
112
|
cocoapods (= 1.0.0.beta.6)
|
107
113
|
cocoapods-keys!
|
@@ -110,4 +116,4 @@ DEPENDENCIES
|
|
110
116
|
rubocop
|
111
117
|
|
112
118
|
BUNDLED WITH
|
113
|
-
1.
|
119
|
+
1.15.4
|
data/lib/cocoapods_keys.rb
CHANGED
data/lib/name_whisperer.rb
CHANGED
@@ -25,7 +25,7 @@ module CocoaPodsKeys
|
|
25
25
|
if xcodeprojects.length == 1
|
26
26
|
Pathname(xcodeprojects.first).basename('.xcodeproj')
|
27
27
|
else
|
28
|
-
error_message =
|
28
|
+
error_message = xcodeprojects.length > 1 ? 'found too many' : "couldn't find any"
|
29
29
|
projects = xcodeprojects.map(&:basename).join(' ')
|
30
30
|
ui.puts 'CocoaPods-Keys ' + error_message + ' Xcode projects (' + projects + '). Please give a name for this project.'
|
31
31
|
|
@@ -10,8 +10,17 @@ module Pod
|
|
10
10
|
|
11
11
|
self.description = <<-DESC
|
12
12
|
Generates the obfuscated Objective-C h/m files using the current key values.
|
13
|
+
|
14
|
+
An optional operator can be done to force a project name.
|
13
15
|
DESC
|
14
16
|
|
17
|
+
self.arguments = [CLAide::Argument.new('project_name', false)]
|
18
|
+
|
19
|
+
def initialize(argv)
|
20
|
+
@project_name = argv.shift_argument
|
21
|
+
super
|
22
|
+
end
|
23
|
+
|
15
24
|
def run
|
16
25
|
Dotenv.load
|
17
26
|
keyring = get_current_keyring
|
@@ -30,7 +30,7 @@ module Pod
|
|
30
30
|
UI.puts "Keys for #{keyring.name}"
|
31
31
|
data = keyring.keychain_data
|
32
32
|
data.each_with_index do |(key, value), index|
|
33
|
-
prefix =
|
33
|
+
prefix = index == data.length - 1 ? ' └ ' : ' ├ '
|
34
34
|
UI.puts prefix + " #{key} - #{value}"
|
35
35
|
end
|
36
36
|
UI.puts
|
@@ -38,7 +38,9 @@ module Pod
|
|
38
38
|
|
39
39
|
def display_keyring(keyring)
|
40
40
|
UI.puts "#{keyring.name} - #{keyring.path}"
|
41
|
-
if keyring.keys.
|
41
|
+
if keyring.keys.empty?
|
42
|
+
# Skip
|
43
|
+
elsif keyring.keys.length == 1
|
42
44
|
UI.puts ' └ ' + keyring.keys[0]
|
43
45
|
else
|
44
46
|
UI.puts ' └ ' + keyring.keys[0...-1].join(' ') + ' & ' + keyring.keys[-1]
|
data/lib/pod/command/keys/rm.rb
CHANGED
@@ -81,9 +81,9 @@ module Pod
|
|
81
81
|
|
82
82
|
def matches(keys)
|
83
83
|
if @key_name.include? '*'
|
84
|
-
|
84
|
+
keys.select { |e| e =~ create_regex(@key_name) }
|
85
85
|
else
|
86
|
-
|
86
|
+
keys.select { |e| e == @key_name }
|
87
87
|
end
|
88
88
|
end
|
89
89
|
|
data/lib/preinstaller.rb
CHANGED
@@ -42,8 +42,8 @@ module CocoaPodsKeys
|
|
42
42
|
# and prompt for their value if needed.
|
43
43
|
keys.each do |key|
|
44
44
|
unless keyring.keychain_has_key?(key)
|
45
|
-
if
|
46
|
-
raise Informative, "CocoaPods-Keys could not find a key named: #{key}"
|
45
|
+
if ci?
|
46
|
+
raise Pod::Informative, "CocoaPods-Keys could not find a key named: #{key}"
|
47
47
|
end
|
48
48
|
|
49
49
|
unless has_shown_intro
|
@@ -71,7 +71,7 @@ module CocoaPodsKeys
|
|
71
71
|
end
|
72
72
|
|
73
73
|
def check_for_multiple_keyrings(project, current_dir)
|
74
|
-
|
74
|
+
unless ci?
|
75
75
|
ui = Pod::UserInterface
|
76
76
|
keyrings = KeyringLiberator.get_all_keyrings_named(project)
|
77
77
|
if keyrings.count > 1
|
@@ -85,5 +85,12 @@ module CocoaPodsKeys
|
|
85
85
|
end
|
86
86
|
end
|
87
87
|
end
|
88
|
+
|
89
|
+
def ci?
|
90
|
+
%w([JENKINS_HOME TRAVIS CIRCLECI CI TEAMCITY_VERSION GO_PIPELINE_NAME bamboo_buildKey GITLAB_CI XCS]).each do |current|
|
91
|
+
return true if ENV.key?(current)
|
92
|
+
end
|
93
|
+
false
|
94
|
+
end
|
88
95
|
end
|
89
96
|
end
|
data/spec/functional_spec.rb
CHANGED
@@ -53,10 +53,10 @@ describe 'CocoaPodsKeys functional tests' do
|
|
53
53
|
|
54
54
|
it 'is able to export the correct keys from the command-line' do
|
55
55
|
Dir.chdir(@tmpdir) do
|
56
|
-
exported_keys = <<-EOS
|
57
|
-
pod keys set KeyWithData "such-data" TestProject
|
58
|
-
pod keys set AnotherKeyWithData "other-data" TestProject
|
59
|
-
pod keys set UnusedKey "-" TestProject
|
56
|
+
exported_keys = <<-EOS.strip_heredoc
|
57
|
+
pod keys set KeyWithData "such-data" TestProject
|
58
|
+
pod keys set AnotherKeyWithData "other-data" TestProject
|
59
|
+
pod keys set UnusedKey "-" TestProject
|
60
60
|
EOS
|
61
61
|
expect(`pod keys export`.strip).to eq(exported_keys.strip)
|
62
62
|
end
|
data/spec/plugin_spec.rb
CHANGED
@@ -44,7 +44,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
44
44
|
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), {})
|
45
45
|
end
|
46
46
|
|
47
|
-
%w
|
47
|
+
%w[target targets].each do |target_tag|
|
48
48
|
context "with a non-existant target specified as a string in '#{target_tag}'" do
|
49
49
|
it 'fails to assign the key to the tag' do
|
50
50
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
@@ -84,7 +84,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
84
84
|
end
|
85
85
|
end
|
86
86
|
|
87
|
-
%w
|
87
|
+
%w[target targets].each do |target_tag|
|
88
88
|
context "with a string specified in '#{target_tag}'" do
|
89
89
|
it 'adds Keys to the target' do
|
90
90
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
@@ -143,7 +143,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
146
|
-
%w
|
146
|
+
%w[target targets].each do |target_tag|
|
147
147
|
context "with 'TargetA' specified as a string in '#{target_tag}'" do
|
148
148
|
it 'adds Keys to Target A' do
|
149
149
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
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.0.
|
4
|
+
version: 2.0.1
|
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: 2018-01-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: osx_keychain
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
166
|
rubyforge_project:
|
167
|
-
rubygems_version: 2.
|
167
|
+
rubygems_version: 2.6.14
|
168
168
|
signing_key:
|
169
169
|
specification_version: 4
|
170
170
|
summary: CocoaPods Keys will store sensitive data in your Mac's keychain. Then on
|