cocoapods-keys 1.6.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rubocop_cocoapods.yml +0 -5
- data/CHANGELOG.md +4 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +60 -54
- data/README.md +4 -1
- data/cocoapods_keys.gemspec +4 -2
- data/lib/cocoapods_keys.rb +1 -1
- data/lib/key_master.rb +1 -1
- data/lib/keyring_liberator.rb +2 -2
- data/lib/name_whisperer.rb +4 -1
- data/lib/plugin.rb +10 -33
- data/lib/pod/command/keys/list.rb +1 -1
- data/lib/pod/command/keys/rm.rb +56 -20
- data/lib/preinstaller.rb +1 -1
- data/spec/functional_spec.rb +3 -1
- data/spec/plugin_spec.rb +15 -15
- metadata +5 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 39ae79101ea526c3926a8784e5d6d6295e938935
|
|
4
|
+
data.tar.gz: 8fc024b7c0579f1e20bb42f3141ae90cb5e60cf7
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 44c690a96ab0ef9f44ad4746d39d36acec11808cb23e9463eefed5d3bef4eed6787eb5acc2ab4c593a8eee805d4a82096c87a31424413d74991c8856f0639a72
|
|
7
|
+
data.tar.gz: a70cddc692258d4d9005b41817beb0230dbd32b9f80fa393756822e0807226eff04bffcc2ca953c42aeaa0d1989b408a64ecccfee44e03934a266ef103f087bb
|
data/.rubocop_cocoapods.yml
CHANGED
|
@@ -37,11 +37,6 @@ SingleLineBlockParams:
|
|
|
37
37
|
Encoding:
|
|
38
38
|
Enabled: false
|
|
39
39
|
|
|
40
|
-
# Having these make it easier to *not* forget to add one when adding a new
|
|
41
|
-
# value and you can simply copy the previous line.
|
|
42
|
-
TrailingComma:
|
|
43
|
-
EnforcedStyleForMultiline: comma
|
|
44
|
-
|
|
45
40
|
Style/MultilineOperationIndentation:
|
|
46
41
|
EnforcedStyle: indented
|
|
47
42
|
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cocoapods-keys (1.6.
|
|
4
|
+
cocoapods-keys (1.6.1)
|
|
5
5
|
dotenv
|
|
6
6
|
osx_keychain
|
|
7
7
|
|
|
@@ -11,85 +11,91 @@ GEM
|
|
|
11
11
|
RubyInline (3.12.4)
|
|
12
12
|
ZenTest (~> 4.3)
|
|
13
13
|
ZenTest (4.11.0)
|
|
14
|
-
activesupport (4.2.
|
|
14
|
+
activesupport (4.2.6)
|
|
15
15
|
i18n (~> 0.7)
|
|
16
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
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
cocoapods-
|
|
28
|
-
cocoapods-
|
|
29
|
-
cocoapods-
|
|
30
|
-
cocoapods-
|
|
31
|
-
cocoapods-
|
|
20
|
+
ast (2.2.0)
|
|
21
|
+
claide (1.0.0.beta.3)
|
|
22
|
+
cocoapods (1.0.0.beta.6)
|
|
23
|
+
activesupport (>= 4.0.2)
|
|
24
|
+
claide (>= 1.0.0.beta.3, < 2.0)
|
|
25
|
+
cocoapods-core (= 1.0.0.beta.6)
|
|
26
|
+
cocoapods-deintegrate (>= 1.0.0.beta.1, < 2.0)
|
|
27
|
+
cocoapods-downloader (>= 1.0.0.beta.2, < 2.0)
|
|
28
|
+
cocoapods-plugins (>= 1.0.0.beta.1, < 2.0)
|
|
29
|
+
cocoapods-search (>= 1.0.0.beta.1, < 2.0)
|
|
30
|
+
cocoapods-stats (>= 1.0.0.beta.3, < 2.0)
|
|
31
|
+
cocoapods-trunk (>= 1.0.0.beta.2, < 2.0)
|
|
32
|
+
cocoapods-try (>= 1.0.0.beta.3, < 2.0)
|
|
32
33
|
colored (~> 1.2)
|
|
33
34
|
escape (~> 0.0.4)
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
xcodeproj (
|
|
38
|
-
cocoapods-core (0.
|
|
39
|
-
activesupport (>=
|
|
35
|
+
fourflusher (~> 0.3.0)
|
|
36
|
+
molinillo (~> 0.4.4)
|
|
37
|
+
nap (~> 1.0)
|
|
38
|
+
xcodeproj (>= 1.0.0.beta.3, < 2.0)
|
|
39
|
+
cocoapods-core (1.0.0.beta.6)
|
|
40
|
+
activesupport (>= 4.0.2)
|
|
40
41
|
fuzzy_match (~> 2.0.4)
|
|
41
|
-
nap (~>
|
|
42
|
-
cocoapods-
|
|
43
|
-
cocoapods-
|
|
42
|
+
nap (~> 1.0)
|
|
43
|
+
cocoapods-deintegrate (1.0.0.beta.1)
|
|
44
|
+
cocoapods-downloader (1.0.0.beta.2)
|
|
45
|
+
cocoapods-plugins (1.0.0.beta.1)
|
|
44
46
|
nap
|
|
45
|
-
cocoapods-
|
|
46
|
-
|
|
47
|
+
cocoapods-search (1.0.0.beta.1)
|
|
48
|
+
cocoapods-stats (1.0.0.beta.3)
|
|
49
|
+
cocoapods-trunk (1.0.0.beta.2)
|
|
50
|
+
nap (>= 0.8, < 2.0)
|
|
47
51
|
netrc (= 0.7.8)
|
|
48
|
-
cocoapods-try (0.
|
|
52
|
+
cocoapods-try (1.0.0.beta.3)
|
|
49
53
|
colored (1.2)
|
|
50
54
|
diff-lcs (1.2.5)
|
|
51
|
-
dotenv (2.
|
|
55
|
+
dotenv (2.1.1)
|
|
52
56
|
escape (0.0.4)
|
|
57
|
+
fourflusher (0.3.0)
|
|
53
58
|
fuzzy_match (2.0.4)
|
|
54
59
|
i18n (0.7.0)
|
|
55
|
-
json (1.8.
|
|
56
|
-
minitest (5.
|
|
57
|
-
molinillo (0.
|
|
58
|
-
nap (
|
|
60
|
+
json (1.8.3)
|
|
61
|
+
minitest (5.8.4)
|
|
62
|
+
molinillo (0.4.4)
|
|
63
|
+
nap (1.1.0)
|
|
59
64
|
netrc (0.7.8)
|
|
60
|
-
open4 (1.3.4)
|
|
61
65
|
osx_keychain (1.0.1)
|
|
62
66
|
RubyInline (~> 3)
|
|
63
|
-
parser (2.
|
|
64
|
-
ast (
|
|
67
|
+
parser (2.3.0.7)
|
|
68
|
+
ast (~> 2.2)
|
|
65
69
|
powerpack (0.1.1)
|
|
66
|
-
rainbow (2.
|
|
67
|
-
rake (
|
|
68
|
-
rspec (3.
|
|
69
|
-
rspec-core (~> 3.
|
|
70
|
-
rspec-expectations (~> 3.
|
|
71
|
-
rspec-mocks (~> 3.
|
|
72
|
-
rspec-core (3.
|
|
73
|
-
rspec-support (~> 3.
|
|
74
|
-
rspec-expectations (3.
|
|
70
|
+
rainbow (2.1.0)
|
|
71
|
+
rake (11.1.2)
|
|
72
|
+
rspec (3.4.0)
|
|
73
|
+
rspec-core (~> 3.4.0)
|
|
74
|
+
rspec-expectations (~> 3.4.0)
|
|
75
|
+
rspec-mocks (~> 3.4.0)
|
|
76
|
+
rspec-core (3.4.4)
|
|
77
|
+
rspec-support (~> 3.4.0)
|
|
78
|
+
rspec-expectations (3.4.0)
|
|
75
79
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
76
|
-
rspec-support (~> 3.
|
|
77
|
-
rspec-mocks (3.
|
|
80
|
+
rspec-support (~> 3.4.0)
|
|
81
|
+
rspec-mocks (3.4.1)
|
|
78
82
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
79
|
-
rspec-support (~> 3.
|
|
80
|
-
rspec-support (3.
|
|
81
|
-
rubocop (0.
|
|
82
|
-
|
|
83
|
-
parser (>= 2.2.2.1, < 3.0)
|
|
83
|
+
rspec-support (~> 3.4.0)
|
|
84
|
+
rspec-support (3.4.1)
|
|
85
|
+
rubocop (0.39.0)
|
|
86
|
+
parser (>= 2.3.0.7, < 3.0)
|
|
84
87
|
powerpack (~> 0.1)
|
|
85
88
|
rainbow (>= 1.99.1, < 3.0)
|
|
86
|
-
ruby-progressbar (~> 1.
|
|
89
|
+
ruby-progressbar (~> 1.7)
|
|
90
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
|
87
91
|
ruby-progressbar (1.7.5)
|
|
88
92
|
thread_safe (0.3.5)
|
|
89
93
|
tzinfo (1.2.2)
|
|
90
94
|
thread_safe (~> 0.1)
|
|
91
|
-
|
|
95
|
+
unicode-display_width (1.0.3)
|
|
96
|
+
xcodeproj (1.0.0.beta.3)
|
|
92
97
|
activesupport (>= 3)
|
|
98
|
+
claide (>= 1.0.0.beta.1, < 2.0)
|
|
93
99
|
colored (~> 1.2)
|
|
94
100
|
|
|
95
101
|
PLATFORMS
|
|
@@ -97,11 +103,11 @@ PLATFORMS
|
|
|
97
103
|
|
|
98
104
|
DEPENDENCIES
|
|
99
105
|
bundler (~> 1.3)
|
|
100
|
-
cocoapods
|
|
106
|
+
cocoapods (= 1.0.0.beta.6)
|
|
101
107
|
cocoapods-keys!
|
|
102
108
|
rake
|
|
103
109
|
rspec
|
|
104
110
|
rubocop
|
|
105
111
|
|
|
106
112
|
BUNDLED WITH
|
|
107
|
-
1.
|
|
113
|
+
1.11.2
|
data/README.md
CHANGED
|
@@ -99,7 +99,10 @@ CocoaPods-keys has 3 other commands:
|
|
|
99
99
|
Which will output the value of the key to STDOUT, useful for scripting.
|
|
100
100
|
|
|
101
101
|
* `pod keys rm [key] [optional project]`
|
|
102
|
-
Will remove a key from a project.
|
|
102
|
+
Will remove a key from a project.
|
|
103
|
+
|
|
104
|
+
If Wildcards are included, it will remove the keys matching the pattern. E.g.: `pod keys rm "G*og*"` will remove *all* the keys that begin with 'G', have 'og' in the middle and end with anything.
|
|
105
|
+
To nuke all the keys, run either `pod keys rm "*"` or `pod keys rm --all`
|
|
103
106
|
|
|
104
107
|
* `pod keys generate [optional project]`
|
|
105
108
|
Will generate the obfuscated Objective-C keys class (mainly used internally).
|
data/cocoapods_keys.gemspec
CHANGED
|
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
|
|
|
9
9
|
spec.authors = ["Orta Therox", 'Samuel E. Giddins']
|
|
10
10
|
spec.email = ["orta.therox@gmail.com", 'segiddins@segiddins.me']
|
|
11
11
|
spec.description = %q{A key value store for environment settings in Cocoa Apps.}
|
|
12
|
-
spec.summary = %q{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
|
|
13
|
-
spec.homepage = "https://github.com/
|
|
12
|
+
spec.summary = %q{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 by creating a Development Pod.}
|
|
13
|
+
spec.homepage = "https://github.com/orta/cocoapods-keys"
|
|
14
14
|
spec.license = "MIT"
|
|
15
15
|
|
|
16
16
|
spec.files = `git ls-files`.split($/)
|
|
@@ -20,6 +20,8 @@ Gem::Specification.new do |spec|
|
|
|
20
20
|
|
|
21
21
|
spec.add_runtime_dependency "osx_keychain"
|
|
22
22
|
spec.add_runtime_dependency "dotenv"
|
|
23
|
+
# spec.add_runtime_dependency "cocoapods", "> 1"
|
|
24
|
+
|
|
23
25
|
spec.add_development_dependency "bundler", "~> 1.3"
|
|
24
26
|
spec.add_development_dependency "rake"
|
|
25
27
|
spec.add_development_dependency "rspec"
|
data/lib/cocoapods_keys.rb
CHANGED
data/lib/key_master.rb
CHANGED
data/lib/keyring_liberator.rb
CHANGED
data/lib/name_whisperer.rb
CHANGED
|
@@ -33,10 +33,13 @@ module CocoaPodsKeys
|
|
|
33
33
|
loop do
|
|
34
34
|
ui.print ' > '
|
|
35
35
|
answer = ui.gets.strip
|
|
36
|
-
break
|
|
36
|
+
break unless answer.empty?
|
|
37
37
|
end
|
|
38
38
|
answer
|
|
39
39
|
end
|
|
40
40
|
end
|
|
41
|
+
|
|
42
|
+
private_class_method :xcodeproj_from_podfile
|
|
43
|
+
private_class_method :search_folders_for_xcodeproj
|
|
41
44
|
end
|
|
42
45
|
end
|
data/lib/plugin.rb
CHANGED
|
@@ -6,10 +6,15 @@ module CocoaPodsKeys
|
|
|
6
6
|
class << self
|
|
7
7
|
include FileUtils
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
# Register for the pre-install hooks to setup & run Keys
|
|
10
|
+
Pod::HooksManager.register('cocoapods-keys', :pre_install) do |context, options|
|
|
11
|
+
CocoaPodsKeys.setup(context.podfile, options)
|
|
12
|
+
end
|
|
13
|
+
|
|
14
|
+
def setup(podfile, options)
|
|
10
15
|
require 'preinstaller'
|
|
11
16
|
|
|
12
|
-
unless PreInstaller.new(
|
|
17
|
+
unless PreInstaller.new(options).setup
|
|
13
18
|
raise Pod::Informative, 'Could not load key data'
|
|
14
19
|
end
|
|
15
20
|
|
|
@@ -22,7 +27,7 @@ module CocoaPodsKeys
|
|
|
22
27
|
cp podspec_path, keys_path
|
|
23
28
|
|
|
24
29
|
# Get all the keys
|
|
25
|
-
local_user_options =
|
|
30
|
+
local_user_options = options || {}
|
|
26
31
|
project = local_user_options.fetch('project') { CocoaPodsKeys::NameWhisperer.get_project_name }
|
|
27
32
|
|
|
28
33
|
keyring = KeyringLiberator.get_current_keyring(project, Dir.getwd) ||
|
|
@@ -39,7 +44,7 @@ module CocoaPodsKeys
|
|
|
39
44
|
File.write(implementation_file, key_master.implementation)
|
|
40
45
|
|
|
41
46
|
# Add our template podspec
|
|
42
|
-
add_keys_to_pods(keys_path.relative_path_from(installation_root),
|
|
47
|
+
add_keys_to_pods(podfile, keys_path.relative_path_from(installation_root), options)
|
|
43
48
|
|
|
44
49
|
# Remove the shared scheme for this pod
|
|
45
50
|
Pod::HooksManager.register('cocoapods-keys', :post_install) do
|
|
@@ -48,7 +53,7 @@ module CocoaPodsKeys
|
|
|
48
53
|
end
|
|
49
54
|
end
|
|
50
55
|
|
|
51
|
-
def add_keys_to_pods(keys_path, options)
|
|
56
|
+
def add_keys_to_pods(podfile, keys_path, options)
|
|
52
57
|
keys_targets = options['target'] || options['targets']
|
|
53
58
|
|
|
54
59
|
if keys_targets
|
|
@@ -74,33 +79,5 @@ module CocoaPodsKeys
|
|
|
74
79
|
podfile.pod 'Keys', :path => keys_path.to_path
|
|
75
80
|
end
|
|
76
81
|
end
|
|
77
|
-
|
|
78
|
-
private
|
|
79
|
-
|
|
80
|
-
def podfile
|
|
81
|
-
Pod::Config.instance.podfile
|
|
82
|
-
end
|
|
83
|
-
|
|
84
|
-
def user_options
|
|
85
|
-
options = podfile.plugins['cocoapods-keys']
|
|
86
|
-
# Until CocoaPods provides a HashWithIndifferentAccess, normalize the hash keys here.
|
|
87
|
-
# See https://github.com/CocoaPods/CocoaPods/issues/3354
|
|
88
|
-
options.with_indifferent_access
|
|
89
|
-
end
|
|
90
|
-
end
|
|
91
|
-
end
|
|
92
|
-
|
|
93
|
-
module Pod
|
|
94
|
-
class Installer
|
|
95
|
-
alias_method :install_before_cocoapods_keys!, :install!
|
|
96
|
-
|
|
97
|
-
def install!
|
|
98
|
-
CocoaPodsKeys.setup if validates_for_keys
|
|
99
|
-
install_before_cocoapods_keys!
|
|
100
|
-
end
|
|
101
|
-
|
|
102
|
-
def validates_for_keys
|
|
103
|
-
podfile && podfile.plugins && !podfile.plugins['cocoapods-keys'].nil?
|
|
104
|
-
end
|
|
105
82
|
end
|
|
106
83
|
end
|
data/lib/pod/command/keys/rm.rb
CHANGED
|
@@ -7,26 +7,39 @@ module Pod
|
|
|
7
7
|
class Command
|
|
8
8
|
class Keys
|
|
9
9
|
class Rm < Keys
|
|
10
|
-
self.summary = '
|
|
10
|
+
self.summary = 'Removes key-value pairs from a project.'
|
|
11
11
|
|
|
12
12
|
self.description = <<-DESC
|
|
13
|
-
|
|
13
|
+
Removes a key, and it's value from a project.
|
|
14
|
+
|
|
15
|
+
If Wildcards are included, it will remove the keys matching the pattern.
|
|
16
|
+
E.g.: `pod keys rm \"G*og*\"` will remove *all* the keys that begin
|
|
17
|
+
with 'G', have 'og' in the middle and end with anything.
|
|
18
|
+
|
|
19
|
+
To nuke all the keys, run either `pod keys rm "*"` or `pod keys rm --all`
|
|
14
20
|
|
|
15
21
|
A second optional operator can be done to force a project name.
|
|
16
22
|
DESC
|
|
17
23
|
|
|
18
24
|
self.arguments = [CLAide::Argument.new('key', true), CLAide::Argument.new('project_name', false)]
|
|
19
25
|
|
|
26
|
+
def self.options
|
|
27
|
+
[[
|
|
28
|
+
'--all', 'Remove all the stored keys without asking'
|
|
29
|
+
]].concat(super)
|
|
30
|
+
end
|
|
31
|
+
|
|
20
32
|
def initialize(argv)
|
|
21
33
|
@key_name = argv.shift_argument
|
|
22
34
|
@project_name = argv.shift_argument
|
|
35
|
+
@wipe_all = argv.flag?('all')
|
|
23
36
|
super
|
|
24
37
|
end
|
|
25
38
|
|
|
26
39
|
def validate!
|
|
27
40
|
super
|
|
28
41
|
verify_podfile_exists!
|
|
29
|
-
help! 'A key name is required for lookup.' unless @key_name
|
|
42
|
+
help! 'A key name is required for lookup.' unless @key_name || @wipe_all
|
|
30
43
|
end
|
|
31
44
|
|
|
32
45
|
def run
|
|
@@ -35,26 +48,49 @@ module Pod
|
|
|
35
48
|
raise Informative, 'Could not find a project to remove the key from.'
|
|
36
49
|
end
|
|
37
50
|
|
|
38
|
-
if
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
51
|
+
if @wipe_all
|
|
52
|
+
@key_name = '*'
|
|
53
|
+
end
|
|
54
|
+
|
|
55
|
+
matching_keys = matches(keyring.keys)
|
|
56
|
+
if matching_keys.count > 0
|
|
57
|
+
messages = matching_keys.map { |e| delete_key(e, keyring) }
|
|
58
|
+
raise Informative, messages.join("\n")
|
|
59
|
+
else
|
|
60
|
+
raise Informative, "Could not find key that matched \"#{@key_name}\"."
|
|
61
|
+
end
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
def delete_key(key, keyring)
|
|
65
|
+
keyring.save(key, '')
|
|
66
|
+
keyring.keys.delete key
|
|
67
|
+
CocoaPodsKeys::KeyringLiberator.save_keyring(keyring)
|
|
68
|
+
|
|
69
|
+
prefix = CocoaPodsKeys::Keyring.keychain_prefix
|
|
70
|
+
login = prefix + keyring.name
|
|
71
|
+
delete_generic = `security delete-generic-password -a #{key.shellescape} -l #{login.shellescape} 2>&1`
|
|
72
|
+
|
|
73
|
+
if delete_generic.include? 'security: SecKeychainSearchCopyNext: The specified item could not be found in the keychain.'
|
|
74
|
+
return "Removed value for #{key}, but could not delete from Keychain."
|
|
75
|
+
elsif delete_generic.include? 'password has been deleted.'
|
|
76
|
+
return "Removed value for #{key}, and deleted associated key in Keychain."
|
|
54
77
|
else
|
|
55
|
-
|
|
78
|
+
return "Removed value for #{key}."
|
|
56
79
|
end
|
|
57
80
|
end
|
|
81
|
+
|
|
82
|
+
def matches(keys)
|
|
83
|
+
if @key_name.include? '*'
|
|
84
|
+
return keys.select { |e| e =~ create_regex(@key_name) }
|
|
85
|
+
else
|
|
86
|
+
return keys.select { |e| e == @key_name }
|
|
87
|
+
end
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def create_regex(pattern)
|
|
91
|
+
regex_str = "^#{pattern.gsub('*', '.*')}$"
|
|
92
|
+
Regexp.new(regex_str)
|
|
93
|
+
end
|
|
58
94
|
end
|
|
59
95
|
end
|
|
60
96
|
end
|
data/lib/preinstaller.rb
CHANGED
data/spec/functional_spec.rb
CHANGED
|
@@ -10,6 +10,8 @@ describe 'CocoaPodsKeys functional tests' do
|
|
|
10
10
|
File.open('Podfile', 'w') do |podfile|
|
|
11
11
|
podfile.puts <<-PODFILE
|
|
12
12
|
platform :ios, '7'
|
|
13
|
+
install! 'cocoapods', :integrate_targets => false
|
|
14
|
+
|
|
13
15
|
plugin 'cocoapods-keys', {
|
|
14
16
|
:project => 'TestProject',
|
|
15
17
|
:keys => [
|
|
@@ -25,7 +27,7 @@ describe 'CocoaPodsKeys functional tests' do
|
|
|
25
27
|
system('pod keys set KeyWithData such-data --silent')
|
|
26
28
|
system('pod keys set AnotherKeyWithData other-data --silent')
|
|
27
29
|
system('pod keys set UnusedKey - --silent')
|
|
28
|
-
system('pod install --silent
|
|
30
|
+
system('pod install --silent')
|
|
29
31
|
end
|
|
30
32
|
end
|
|
31
33
|
|
data/spec/plugin_spec.rb
CHANGED
|
@@ -41,7 +41,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
41
41
|
it 'adds Keys to the global Pod' do
|
|
42
42
|
expect(@podfile).to receive(:pod).with('Keys', anything)
|
|
43
43
|
|
|
44
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), {})
|
|
44
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), {})
|
|
45
45
|
end
|
|
46
46
|
|
|
47
47
|
%w(target targets).each do |target_tag|
|
|
@@ -50,7 +50,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
50
50
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
51
51
|
expect(Pod::UI).to receive(:puts).with('Could not find a target named \'TargetA\' in your Podfile. Stopping keys'.red)
|
|
52
52
|
|
|
53
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetA')
|
|
53
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetA')
|
|
54
54
|
end
|
|
55
55
|
end
|
|
56
56
|
|
|
@@ -59,7 +59,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
59
59
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
60
60
|
expect(Pod::UI).to receive(:puts).with('Could not find a target named \'TargetA\' in your Podfile. Stopping keys'.red)
|
|
61
61
|
|
|
62
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetA'])
|
|
62
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetA'])
|
|
63
63
|
end
|
|
64
64
|
end
|
|
65
65
|
end
|
|
@@ -80,7 +80,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
80
80
|
expect(@podfile).to receive(:pod).with('Keys', anything)
|
|
81
81
|
expect(@target_a).not_to receive(:store_pod).with('Keys', anything)
|
|
82
82
|
|
|
83
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), {})
|
|
83
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), {})
|
|
84
84
|
end
|
|
85
85
|
end
|
|
86
86
|
|
|
@@ -90,7 +90,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
90
90
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
91
91
|
expect(@target_a).to receive(:store_pod).with('Keys', anything)
|
|
92
92
|
|
|
93
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetA')
|
|
93
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetA')
|
|
94
94
|
end
|
|
95
95
|
end
|
|
96
96
|
|
|
@@ -99,7 +99,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
99
99
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
100
100
|
expect(@target_a).to receive(:store_pod).with('Keys', anything)
|
|
101
101
|
|
|
102
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetA'])
|
|
102
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetA'])
|
|
103
103
|
end
|
|
104
104
|
end
|
|
105
105
|
|
|
@@ -108,7 +108,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
108
108
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
109
109
|
expect(Pod::UI).to receive(:puts).with('Could not find a target named \'TargetB\' in your Podfile. Stopping keys'.red)
|
|
110
110
|
|
|
111
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetB')
|
|
111
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetB')
|
|
112
112
|
end
|
|
113
113
|
end
|
|
114
114
|
|
|
@@ -117,7 +117,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
117
117
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
118
118
|
expect(Pod::UI).to receive(:puts).with('Could not find a target named \'TargetB\' in your Podfile. Stopping keys'.red)
|
|
119
119
|
|
|
120
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetB'])
|
|
120
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetB'])
|
|
121
121
|
end
|
|
122
122
|
end
|
|
123
123
|
end
|
|
@@ -139,7 +139,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
139
139
|
expect(@target_a).not_to receive(:store_pod).with('Keys', anything)
|
|
140
140
|
expect(@target_b).not_to receive(:store_pod).with('Keys', anything)
|
|
141
141
|
|
|
142
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), {})
|
|
142
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), {})
|
|
143
143
|
end
|
|
144
144
|
end
|
|
145
145
|
|
|
@@ -150,7 +150,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
150
150
|
expect(@target_a).to receive(:store_pod).with('Keys', anything)
|
|
151
151
|
expect(@target_b).not_to receive(:store_pod).with('Keys', anything)
|
|
152
152
|
|
|
153
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetA')
|
|
153
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetA')
|
|
154
154
|
end
|
|
155
155
|
end
|
|
156
156
|
|
|
@@ -160,7 +160,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
160
160
|
expect(@target_a).to receive(:store_pod).with('Keys', anything)
|
|
161
161
|
expect(@target_b).not_to receive(:store_pod).with('Keys', anything)
|
|
162
162
|
|
|
163
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetA'])
|
|
163
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetA'])
|
|
164
164
|
end
|
|
165
165
|
end
|
|
166
166
|
|
|
@@ -170,7 +170,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
170
170
|
expect(@target_a).not_to receive(:store_pod).with('Keys', anything)
|
|
171
171
|
expect(@target_b).to receive(:store_pod).with('Keys', anything)
|
|
172
172
|
|
|
173
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetB')
|
|
173
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetB')
|
|
174
174
|
end
|
|
175
175
|
end
|
|
176
176
|
|
|
@@ -180,7 +180,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
180
180
|
expect(@target_a).not_to receive(:store_pod).with('Keys', anything)
|
|
181
181
|
expect(@target_b).to receive(:store_pod).with('Keys', anything)
|
|
182
182
|
|
|
183
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetB'])
|
|
183
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetB'])
|
|
184
184
|
end
|
|
185
185
|
end
|
|
186
186
|
|
|
@@ -189,7 +189,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
189
189
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
190
190
|
expect(Pod::UI).to receive(:puts).with('Could not find a target named \'TargetC\' in your Podfile. Stopping keys'.red)
|
|
191
191
|
|
|
192
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetC')
|
|
192
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => 'TargetC')
|
|
193
193
|
end
|
|
194
194
|
end
|
|
195
195
|
|
|
@@ -198,7 +198,7 @@ describe CocoaPodsKeys, '#plugin' do
|
|
|
198
198
|
expect(@podfile).not_to receive(:pod).with('Keys', anything)
|
|
199
199
|
expect(Pod::UI).to receive(:puts).with('Could not find a target named \'TargetC\' in your Podfile. Stopping keys'.red)
|
|
200
200
|
|
|
201
|
-
CocoaPodsKeys.add_keys_to_pods(Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetC'])
|
|
201
|
+
CocoaPodsKeys.add_keys_to_pods(@podfile, Pathname.new('Pods/CocoaPodsKeys/'), target_tag => ['TargetC'])
|
|
202
202
|
end
|
|
203
203
|
end
|
|
204
204
|
end
|
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.
|
|
4
|
+
version: 1.6.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: 2016-04-04 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: osx_keychain
|
|
@@ -143,7 +143,7 @@ files:
|
|
|
143
143
|
- templates/Keys.h.erb
|
|
144
144
|
- templates/Keys.m.erb
|
|
145
145
|
- templates/Keys.podspec.json
|
|
146
|
-
homepage: https://github.com/
|
|
146
|
+
homepage: https://github.com/orta/cocoapods-keys
|
|
147
147
|
licenses:
|
|
148
148
|
- MIT
|
|
149
149
|
metadata: {}
|
|
@@ -167,8 +167,8 @@ rubygems_version: 2.4.8
|
|
|
167
167
|
signing_key:
|
|
168
168
|
specification_version: 4
|
|
169
169
|
summary: CocoaPods Keys will store sensitive data in your Mac's keychain. Then on
|
|
170
|
-
running pod install they will be installed into your app's source code
|
|
171
|
-
|
|
170
|
+
running `pod install` they will be installed into your app's source code by creating
|
|
171
|
+
a Development Pod.
|
|
172
172
|
test_files:
|
|
173
173
|
- spec/fixtures/Keys_empty.h
|
|
174
174
|
- spec/fixtures/Keys_empty.m
|