cocoapods-keys 2.2.1 → 2.3.0
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/.gitignore +1 -0
- data/.rubocop.yml +1 -1
- data/.rubocop_cocoapods.yml +22 -17
- data/.rubocop_todo.yml +2 -2
- data/.travis.yml +1 -1
- data/CHANGELOG.md +4 -0
- data/Gemfile +3 -2
- data/Gemfile.lock +123 -85
- data/README.md +8 -1
- data/cocoapods_keys.gemspec +3 -3
- data/lib/cocoapods_keys.rb +1 -1
- data/lib/key_master.rb +1 -1
- data/lib/keyring.rb +12 -4
- data/spec/fixtures/Podfile +1 -1
- data/spec/keyring_spec.rb +1 -1
- data/spec/spec_helper.rb +12 -2
- metadata +10 -10
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b509c4f211b9ba3c153261779843b98b97cbe4d793ad266402100444bfa8d49c
|
|
4
|
+
data.tar.gz: '0893d95be485c4a2c0fdb6fb7830796f7a9f45312b75ebf5a96cd2ab750d6a44'
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3960fee1a72a4a77e7f0f4a8c9cf830e5cc3fd0132b99f9373bf94b506c98c212962570b9f443f2b57b4901c1c282c7a8244e05599e7206e5d1c6fb62039a6d9
|
|
7
|
+
data.tar.gz: 7331e3a269fcf462379b0e714d3e43f3919d6f532a10655263caa25282c86a68211f0b64c925e13cf1b984681bdb1f61ac9ba017a0ffa50c30c0b405477f8774
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/.rubocop_cocoapods.yml
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
AllCops:
|
|
2
|
+
NewCops: enable
|
|
3
|
+
SuggestExtensions: false
|
|
2
4
|
Include:
|
|
3
5
|
- ./Rakefile
|
|
4
6
|
- ./Gemfile
|
|
@@ -8,44 +10,47 @@ AllCops:
|
|
|
8
10
|
|
|
9
11
|
# At the moment not ready to be used
|
|
10
12
|
# https://github.com/bbatsov/rubocop/issues/947
|
|
11
|
-
Documentation:
|
|
13
|
+
Style/Documentation:
|
|
12
14
|
Enabled: false
|
|
13
15
|
|
|
14
16
|
#- CocoaPods -----------------------------------------------------------------#
|
|
15
17
|
|
|
16
18
|
# We adopted raise instead of fail.
|
|
17
|
-
SignalException:
|
|
19
|
+
Style/SignalException:
|
|
18
20
|
EnforcedStyle: only_raise
|
|
19
21
|
|
|
20
22
|
# They are idiomatic
|
|
21
|
-
AssignmentInCondition:
|
|
23
|
+
Lint/AssignmentInCondition:
|
|
22
24
|
Enabled: false
|
|
23
25
|
|
|
24
26
|
# Allow backticks
|
|
25
|
-
AsciiComments:
|
|
27
|
+
Style/AsciiComments:
|
|
26
28
|
Enabled: false
|
|
27
29
|
|
|
28
30
|
# Indentation clarifies logic branches in implementations
|
|
29
|
-
IfUnlessModifier:
|
|
31
|
+
Style/IfUnlessModifier:
|
|
30
32
|
Enabled: false
|
|
31
33
|
|
|
32
34
|
# No enforced convention here.
|
|
33
|
-
SingleLineBlockParams:
|
|
35
|
+
Style/SingleLineBlockParams:
|
|
34
36
|
Enabled: false
|
|
35
37
|
|
|
36
38
|
# We only add the comment when needed.
|
|
37
|
-
Encoding:
|
|
39
|
+
Style/Encoding:
|
|
40
|
+
Enabled: false
|
|
41
|
+
|
|
42
|
+
Style/FrozenStringLiteralComment:
|
|
38
43
|
Enabled: false
|
|
39
44
|
|
|
40
45
|
Layout/MultilineOperationIndentation:
|
|
41
46
|
EnforcedStyle: indented
|
|
42
47
|
|
|
43
48
|
# Clashes with CLAide Command#validate!
|
|
44
|
-
GuardClause:
|
|
49
|
+
Style/GuardClause:
|
|
45
50
|
Enabled: false
|
|
46
51
|
|
|
47
52
|
# Not always desirable: lib/claide/command/plugins_helper.rb:12:15
|
|
48
|
-
Next:
|
|
53
|
+
Style/Next:
|
|
49
54
|
Enabled: false
|
|
50
55
|
|
|
51
56
|
# Arbitrary max lengths for classes simply do not work and enabling this will
|
|
@@ -74,16 +79,16 @@ Metrics/CyclomaticComplexity:
|
|
|
74
79
|
|
|
75
80
|
#- CocoaPods support for Ruby 1.8.7 ------------------------------------------#
|
|
76
81
|
|
|
77
|
-
HashSyntax:
|
|
82
|
+
Style/HashSyntax:
|
|
78
83
|
EnforcedStyle: hash_rockets
|
|
79
84
|
|
|
80
|
-
Lambda:
|
|
85
|
+
Style/Lambda:
|
|
81
86
|
Enabled: false
|
|
82
87
|
|
|
83
|
-
DotPosition:
|
|
88
|
+
Layout/DotPosition:
|
|
84
89
|
EnforcedStyle: trailing
|
|
85
90
|
|
|
86
|
-
EachWithObject:
|
|
91
|
+
Style/EachWithObject:
|
|
87
92
|
Enabled: false
|
|
88
93
|
|
|
89
94
|
Style/SpecialGlobalVars:
|
|
@@ -92,20 +97,20 @@ Style/SpecialGlobalVars:
|
|
|
92
97
|
#- CocoaPods specs -----------------------------------------------------------#
|
|
93
98
|
|
|
94
99
|
# Allow for `should.match /regexp/`.
|
|
95
|
-
AmbiguousRegexpLiteral:
|
|
100
|
+
Lint/AmbiguousRegexpLiteral:
|
|
96
101
|
Exclude:
|
|
97
102
|
- spec/**/*
|
|
98
103
|
|
|
99
104
|
# Allow `object.should == object` syntax.
|
|
100
|
-
Void:
|
|
105
|
+
Lint/Void:
|
|
101
106
|
Exclude:
|
|
102
107
|
- spec/**/*
|
|
103
108
|
|
|
104
|
-
ClassAndModuleChildren:
|
|
109
|
+
Style/ClassAndModuleChildren:
|
|
105
110
|
Exclude:
|
|
106
111
|
- spec/**/*
|
|
107
112
|
|
|
108
|
-
|
|
113
|
+
Lint/BinaryOperatorWithIdenticalOperands:
|
|
109
114
|
Exclude:
|
|
110
115
|
- spec/**/*
|
|
111
116
|
|
data/.rubocop_todo.yml
CHANGED
|
@@ -23,7 +23,7 @@ Lint/Void:
|
|
|
23
23
|
|
|
24
24
|
# Offense count: 38
|
|
25
25
|
# Configuration parameters: AllowURI, URISchemes.
|
|
26
|
-
|
|
26
|
+
Layout/LineLength:
|
|
27
27
|
Max: 173
|
|
28
28
|
|
|
29
29
|
# Offense count: 1
|
|
@@ -31,7 +31,7 @@ Metrics/PerceivedComplexity:
|
|
|
31
31
|
Max: 9
|
|
32
32
|
|
|
33
33
|
# Offense count: 4
|
|
34
|
-
|
|
34
|
+
Naming/AccessorMethodName:
|
|
35
35
|
Enabled: false
|
|
36
36
|
|
|
37
37
|
# Offense count: 1
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
|
@@ -3,5 +3,6 @@ source 'https://rubygems.org'
|
|
|
3
3
|
# Specify your gem's dependencies in cocoapods-keys.gemspec
|
|
4
4
|
gemspec
|
|
5
5
|
|
|
6
|
-
gem 'cocoapods', '1.
|
|
7
|
-
gem 'activesupport', '
|
|
6
|
+
gem 'cocoapods', '>= 1.11'
|
|
7
|
+
gem 'activesupport', '>= 5'
|
|
8
|
+
gem 'ruby-keychain', :require => 'keychain'
|
data/Gemfile.lock
CHANGED
|
@@ -1,119 +1,157 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
cocoapods-keys (2.1
|
|
4
|
+
cocoapods-keys (2.2.1)
|
|
5
5
|
dotenv
|
|
6
|
-
|
|
6
|
+
keychain
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
CFPropertyList (
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
cocoapods-
|
|
31
|
-
cocoapods-
|
|
32
|
-
cocoapods-
|
|
33
|
-
|
|
11
|
+
CFPropertyList (3.0.5)
|
|
12
|
+
rexml
|
|
13
|
+
activesupport (6.1.7)
|
|
14
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
15
|
+
i18n (>= 1.6, < 2)
|
|
16
|
+
minitest (>= 5.1)
|
|
17
|
+
tzinfo (~> 2.0)
|
|
18
|
+
zeitwerk (~> 2.3)
|
|
19
|
+
addressable (2.8.1)
|
|
20
|
+
public_suffix (>= 2.0.2, < 6.0)
|
|
21
|
+
algoliasearch (1.27.5)
|
|
22
|
+
httpclient (~> 2.8, >= 2.8.3)
|
|
23
|
+
json (>= 1.5.1)
|
|
24
|
+
ast (2.4.2)
|
|
25
|
+
atomos (0.1.3)
|
|
26
|
+
claide (1.1.0)
|
|
27
|
+
cocoapods (1.11.3)
|
|
28
|
+
addressable (~> 2.8)
|
|
29
|
+
claide (>= 1.0.2, < 2.0)
|
|
30
|
+
cocoapods-core (= 1.11.3)
|
|
31
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
|
32
|
+
cocoapods-downloader (>= 1.4.0, < 2.0)
|
|
33
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
|
34
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
|
35
|
+
cocoapods-trunk (>= 1.4.0, < 2.0)
|
|
36
|
+
cocoapods-try (>= 1.1.0, < 2.0)
|
|
37
|
+
colored2 (~> 3.1)
|
|
34
38
|
escape (~> 0.0.4)
|
|
35
|
-
fourflusher (
|
|
36
|
-
|
|
39
|
+
fourflusher (>= 2.3.0, < 3.0)
|
|
40
|
+
gh_inspector (~> 1.0)
|
|
41
|
+
molinillo (~> 0.8.0)
|
|
37
42
|
nap (~> 1.0)
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
43
|
+
ruby-macho (>= 1.0, < 3.0)
|
|
44
|
+
xcodeproj (>= 1.21.0, < 2.0)
|
|
45
|
+
cocoapods-core (1.11.3)
|
|
46
|
+
activesupport (>= 5.0, < 7)
|
|
47
|
+
addressable (~> 2.8)
|
|
48
|
+
algoliasearch (~> 1.0)
|
|
49
|
+
concurrent-ruby (~> 1.1)
|
|
41
50
|
fuzzy_match (~> 2.0.4)
|
|
42
51
|
nap (~> 1.0)
|
|
43
|
-
|
|
44
|
-
|
|
52
|
+
netrc (~> 0.11)
|
|
53
|
+
public_suffix (~> 4.0)
|
|
54
|
+
typhoeus (~> 1.0)
|
|
55
|
+
cocoapods-deintegrate (1.0.5)
|
|
56
|
+
cocoapods-downloader (1.6.3)
|
|
45
57
|
cocoapods-plugins (1.0.0)
|
|
46
58
|
nap
|
|
47
|
-
cocoapods-search (1.0.
|
|
48
|
-
cocoapods-
|
|
49
|
-
cocoapods-trunk (1.2.0)
|
|
59
|
+
cocoapods-search (1.0.1)
|
|
60
|
+
cocoapods-trunk (1.6.0)
|
|
50
61
|
nap (>= 0.8, < 2.0)
|
|
51
|
-
netrc (
|
|
52
|
-
cocoapods-try (1.
|
|
53
|
-
colored (1.2)
|
|
62
|
+
netrc (~> 0.11)
|
|
63
|
+
cocoapods-try (1.2.0)
|
|
54
64
|
colored2 (3.1.2)
|
|
55
|
-
|
|
56
|
-
|
|
65
|
+
concurrent-ruby (1.1.10)
|
|
66
|
+
crypt (2.2.1)
|
|
67
|
+
diff-lcs (1.5.0)
|
|
68
|
+
dotenv (2.8.1)
|
|
57
69
|
escape (0.0.4)
|
|
58
|
-
|
|
70
|
+
ethon (0.16.0)
|
|
71
|
+
ffi (>= 1.15.0)
|
|
72
|
+
ffi (1.15.5)
|
|
73
|
+
fourflusher (2.3.1)
|
|
59
74
|
fuzzy_match (2.0.4)
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
75
|
+
gh_inspector (1.1.3)
|
|
76
|
+
highline (2.0.3)
|
|
77
|
+
httpclient (2.8.3)
|
|
78
|
+
i18n (1.12.0)
|
|
79
|
+
concurrent-ruby (~> 1.0)
|
|
80
|
+
json (2.6.2)
|
|
81
|
+
keychain (0.2.3)
|
|
82
|
+
crypt (>= 1.1.4)
|
|
83
|
+
highline (>= 1.4.0)
|
|
84
|
+
minitest (5.16.3)
|
|
85
|
+
molinillo (0.8.0)
|
|
86
|
+
nanaimo (0.3.0)
|
|
64
87
|
nap (1.1.0)
|
|
65
|
-
netrc (0.
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
parallel (1.
|
|
69
|
-
parser (
|
|
70
|
-
ast (~> 2.
|
|
71
|
-
|
|
72
|
-
rainbow (
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
rspec-
|
|
78
|
-
rspec-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
88
|
+
netrc (0.11.0)
|
|
89
|
+
og-corefoundation (0.2.3)
|
|
90
|
+
ffi
|
|
91
|
+
parallel (1.22.1)
|
|
92
|
+
parser (3.1.3.0)
|
|
93
|
+
ast (~> 2.4.1)
|
|
94
|
+
public_suffix (4.0.7)
|
|
95
|
+
rainbow (3.1.1)
|
|
96
|
+
rake (13.0.6)
|
|
97
|
+
regexp_parser (2.6.1)
|
|
98
|
+
rexml (3.2.5)
|
|
99
|
+
rspec (3.12.0)
|
|
100
|
+
rspec-core (~> 3.12.0)
|
|
101
|
+
rspec-expectations (~> 3.12.0)
|
|
102
|
+
rspec-mocks (~> 3.12.0)
|
|
103
|
+
rspec-core (3.12.0)
|
|
104
|
+
rspec-support (~> 3.12.0)
|
|
105
|
+
rspec-expectations (3.12.0)
|
|
82
106
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
83
|
-
rspec-support (~> 3.
|
|
84
|
-
rspec-mocks (3.
|
|
107
|
+
rspec-support (~> 3.12.0)
|
|
108
|
+
rspec-mocks (3.12.0)
|
|
85
109
|
diff-lcs (>= 1.2.0, < 2.0)
|
|
86
|
-
rspec-support (~> 3.
|
|
87
|
-
rspec-support (3.
|
|
88
|
-
rubocop (
|
|
110
|
+
rspec-support (~> 3.12.0)
|
|
111
|
+
rspec-support (3.12.0)
|
|
112
|
+
rubocop (1.39.0)
|
|
113
|
+
json (~> 2.3)
|
|
89
114
|
parallel (~> 1.10)
|
|
90
|
-
parser (>=
|
|
91
|
-
|
|
92
|
-
|
|
115
|
+
parser (>= 3.1.2.1)
|
|
116
|
+
rainbow (>= 2.2.2, < 4.0)
|
|
117
|
+
regexp_parser (>= 1.8, < 3.0)
|
|
118
|
+
rexml (>= 3.2.5, < 4.0)
|
|
119
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
|
93
120
|
ruby-progressbar (~> 1.7)
|
|
94
|
-
unicode-display_width (
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
121
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
|
122
|
+
rubocop-ast (1.24.0)
|
|
123
|
+
parser (>= 3.1.1.0)
|
|
124
|
+
ruby-keychain (0.4.0)
|
|
125
|
+
ffi
|
|
126
|
+
og-corefoundation (~> 0.2.0)
|
|
127
|
+
ruby-macho (2.5.1)
|
|
128
|
+
ruby-progressbar (1.11.0)
|
|
129
|
+
typhoeus (1.4.0)
|
|
130
|
+
ethon (>= 0.9.0)
|
|
131
|
+
tzinfo (2.0.5)
|
|
132
|
+
concurrent-ruby (~> 1.0)
|
|
133
|
+
unicode-display_width (2.3.0)
|
|
134
|
+
xcodeproj (1.22.0)
|
|
135
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
|
136
|
+
atomos (~> 0.1.3)
|
|
102
137
|
claide (>= 1.0.2, < 2.0)
|
|
103
138
|
colored2 (~> 3.1)
|
|
104
|
-
nanaimo (~> 0.
|
|
139
|
+
nanaimo (~> 0.3.0)
|
|
140
|
+
rexml (~> 3.2.4)
|
|
141
|
+
zeitwerk (2.6.6)
|
|
105
142
|
|
|
106
143
|
PLATFORMS
|
|
107
|
-
|
|
144
|
+
arm64-darwin-22
|
|
108
145
|
|
|
109
146
|
DEPENDENCIES
|
|
110
|
-
activesupport (
|
|
111
|
-
bundler (~>
|
|
112
|
-
cocoapods (
|
|
147
|
+
activesupport (>= 5)
|
|
148
|
+
bundler (~> 2.3)
|
|
149
|
+
cocoapods (>= 1.11)
|
|
113
150
|
cocoapods-keys!
|
|
114
151
|
rake
|
|
115
152
|
rspec
|
|
116
|
-
rubocop
|
|
153
|
+
rubocop (> 1.38)
|
|
154
|
+
ruby-keychain
|
|
117
155
|
|
|
118
156
|
BUNDLED WITH
|
|
119
|
-
|
|
157
|
+
2.3.26
|
data/README.md
CHANGED
|
@@ -1,9 +1,13 @@
|
|
|
1
|
-

|
|
1
|
+
[](https://travis-ci.org/orta/cocoapods-keys)
|
|
2
2
|
|
|
3
3
|
A key value store for enviroment and application keys.
|
|
4
4
|
|
|
5
5
|
Its good security practice to keep production keys out of developer hands. CocoaPods-keys makes it easy to have per-user config settings stored securely in the developer's keychain, and not in the application source. It is a plugin that once installed will run on every `pod install` or `pod update`.
|
|
6
6
|
|
|
7
|
+
## Alternatives
|
|
8
|
+
|
|
9
|
+
CocoaPods Keys has had a great run since its creation in 2014, and still works perfectly fine today. If you're interested in a fresh re-think of the concept, check out https://github.com/rogerluan/arkana
|
|
10
|
+
|
|
7
11
|
## Requirements
|
|
8
12
|
|
|
9
13
|
Requires CocoaPods 0.36+
|
|
@@ -34,6 +38,9 @@ plugin 'cocoapods-keys', {
|
|
|
34
38
|
...
|
|
35
39
|
]}
|
|
36
40
|
```
|
|
41
|
+
> Please do not use dash in key names ([Reason why here in this issue #197](https://github.com/orta/cocoapods-keys/issues/197)).
|
|
42
|
+
>
|
|
43
|
+
> For example convert any key like this `WRONGLY-DEFINED-KEY` to `CorrectlyDefinedKey`.
|
|
37
44
|
|
|
38
45
|
Then running `pod install` will prompt for the keys not yet set and you can ensure everyone has the same setup.
|
|
39
46
|
|
data/cocoapods_keys.gemspec
CHANGED
|
@@ -18,12 +18,12 @@ Gem::Specification.new do |spec|
|
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
|
19
19
|
spec.require_paths = ["lib"]
|
|
20
20
|
|
|
21
|
-
spec.add_runtime_dependency "
|
|
21
|
+
spec.add_runtime_dependency "ruby-keychain"
|
|
22
22
|
spec.add_runtime_dependency "dotenv"
|
|
23
23
|
# spec.add_runtime_dependency "cocoapods", "> 1"
|
|
24
24
|
|
|
25
|
-
spec.add_development_dependency "bundler", "~>
|
|
25
|
+
spec.add_development_dependency "bundler", "~> 2.3"
|
|
26
26
|
spec.add_development_dependency "rake"
|
|
27
27
|
spec.add_development_dependency "rspec"
|
|
28
|
-
spec.add_development_dependency "rubocop"
|
|
28
|
+
spec.add_development_dependency "rubocop", "> 1.38"
|
|
29
29
|
end
|
data/lib/cocoapods_keys.rb
CHANGED
data/lib/key_master.rb
CHANGED
data/lib/keyring.rb
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
require '
|
|
1
|
+
require 'keychain'
|
|
2
|
+
require 'base64'
|
|
3
|
+
require 'json'
|
|
2
4
|
|
|
3
5
|
module CocoaPodsKeys
|
|
4
6
|
class Keyring
|
|
@@ -27,11 +29,17 @@ module CocoaPodsKeys
|
|
|
27
29
|
end
|
|
28
30
|
|
|
29
31
|
def keychain
|
|
30
|
-
@keychain ||=
|
|
32
|
+
@keychain ||= Keychain.generic_passwords
|
|
31
33
|
end
|
|
32
34
|
|
|
33
35
|
def save(key, value)
|
|
34
|
-
keychain
|
|
36
|
+
item = keychain.where(service: self.class.keychain_prefix + name, account: key).first
|
|
37
|
+
if item
|
|
38
|
+
item.password = value
|
|
39
|
+
item.save!
|
|
40
|
+
else
|
|
41
|
+
keychain_has_keykeychain.create(service: self.class.keychain_prefix + name, password: value, account: key)
|
|
42
|
+
end
|
|
35
43
|
end
|
|
36
44
|
|
|
37
45
|
def keychain_data
|
|
@@ -53,7 +61,7 @@ module CocoaPodsKeys
|
|
|
53
61
|
end
|
|
54
62
|
|
|
55
63
|
def keychain_value(key)
|
|
56
|
-
ENV[key] || keychain
|
|
64
|
+
ENV[key] || keychain.where(service: self.class.keychain_prefix + name, account: key).first.password
|
|
57
65
|
end
|
|
58
66
|
|
|
59
67
|
def camel_cased_keys
|
data/spec/fixtures/Podfile
CHANGED
data/spec/keyring_spec.rb
CHANGED
|
@@ -17,7 +17,7 @@ describe KeyringLiberator do
|
|
|
17
17
|
expect(keyring.keychain_data).to eq('ARMyKey' => 'Hello')
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
it 'looks up keys from
|
|
20
|
+
it 'looks up keys from Keychain Access' do
|
|
21
21
|
keyring = Keyring.new('test', '/', ['ARMyKey'])
|
|
22
22
|
keyring.instance_variable_set(:@keychain, FakeKeychain.new('KeychainKey' => 'abcde'))
|
|
23
23
|
expect(keyring.keychain_has_key?('KeychainKey')).to be_truthy
|
data/spec/spec_helper.rb
CHANGED
|
@@ -16,12 +16,22 @@ RSpec.configure do |c|
|
|
|
16
16
|
c.color = true
|
|
17
17
|
end
|
|
18
18
|
|
|
19
|
+
class FakeKeychainItem
|
|
20
|
+
attr_accessor :password
|
|
21
|
+
|
|
22
|
+
def initialize(password)
|
|
23
|
+
@password = password
|
|
24
|
+
end
|
|
25
|
+
end
|
|
26
|
+
|
|
19
27
|
class FakeKeychain
|
|
20
28
|
def initialize(data)
|
|
21
29
|
@data = data
|
|
22
30
|
end
|
|
23
31
|
|
|
24
|
-
def
|
|
25
|
-
@data[
|
|
32
|
+
def where(conditions)
|
|
33
|
+
password = @data[conditions[:account]]
|
|
34
|
+
item = FakeKeychainItem.new(password)
|
|
35
|
+
[item]
|
|
26
36
|
end
|
|
27
37
|
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: 2.
|
|
4
|
+
version: 2.3.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Orta Therox
|
|
@@ -9,10 +9,10 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date:
|
|
12
|
+
date: 2022-12-06 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
|
-
name:
|
|
15
|
+
name: ruby-keychain
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
requirements:
|
|
18
18
|
- - ">="
|
|
@@ -45,14 +45,14 @@ dependencies:
|
|
|
45
45
|
requirements:
|
|
46
46
|
- - "~>"
|
|
47
47
|
- !ruby/object:Gem::Version
|
|
48
|
-
version: '
|
|
48
|
+
version: '2.3'
|
|
49
49
|
type: :development
|
|
50
50
|
prerelease: false
|
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
|
52
52
|
requirements:
|
|
53
53
|
- - "~>"
|
|
54
54
|
- !ruby/object:Gem::Version
|
|
55
|
-
version: '
|
|
55
|
+
version: '2.3'
|
|
56
56
|
- !ruby/object:Gem::Dependency
|
|
57
57
|
name: rake
|
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -85,16 +85,16 @@ dependencies:
|
|
|
85
85
|
name: rubocop
|
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
|
87
87
|
requirements:
|
|
88
|
-
- - "
|
|
88
|
+
- - ">"
|
|
89
89
|
- !ruby/object:Gem::Version
|
|
90
|
-
version: '
|
|
90
|
+
version: '1.38'
|
|
91
91
|
type: :development
|
|
92
92
|
prerelease: false
|
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
|
94
94
|
requirements:
|
|
95
|
-
- - "
|
|
95
|
+
- - ">"
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
|
-
version: '
|
|
97
|
+
version: '1.38'
|
|
98
98
|
description: A key value store for environment settings in Cocoa Apps.
|
|
99
99
|
email:
|
|
100
100
|
- orta.therox@gmail.com
|
|
@@ -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.7.6
|
|
167
|
+
rubygems_version: 2.7.6.2
|
|
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
|