cocoapods-keys 1.0.1 → 1.0.2
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/Gemfile.lock +1 -1
- data/README.md +1 -1
- data/lib/cocoapods_keys.rb +1 -1
- data/lib/key_master.rb +1 -0
- data/lib/plugin.rb +5 -3
- data/lib/preinstaller.rb +5 -7
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 46fd2317903ff6b9b6d9117c6ba834e9ae6efe98
|
4
|
+
data.tar.gz: d8e127fdf8ab65eb8b446a011de5135db2057682
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb52c1999ca9a2237615dd19fcd637535f8ccc26c0dc717625decb5cc5003adc39dbf46d19cdc65c4fc64f27f3272b6ea667615139b366d2e66fbd2c1205de46
|
7
|
+
data.tar.gz: e9b6925e32bf7ea4a19ad1c63ab51d29da2b89e94ff8860d47aaa253037658a6e83d64002dc8cfc4e25ea981c9d61c60debdb403334af404048bcae793003e4b
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -45,7 +45,7 @@ For example:
|
|
45
45
|
└ redditAPIToken & mixpanelAPIToken
|
46
46
|
```
|
47
47
|
|
48
|
-
After the next `pod install` or `pod update` keys will add a new `Keys`
|
48
|
+
After the next `pod install` or `pod update` keys will add a new `Keys` pod to your Pods project, supporting both static libraries and frameworks. This provides an API to your keys from Cocoa code. For example the application code above would look like:
|
49
49
|
|
50
50
|
``` objc
|
51
51
|
|
data/lib/cocoapods_keys.rb
CHANGED
data/lib/key_master.rb
CHANGED
data/lib/plugin.rb
CHANGED
@@ -3,12 +3,14 @@ require 'cocoapods-core'
|
|
3
3
|
module CocoaPodsKeys
|
4
4
|
class << self
|
5
5
|
def podspec_for_current_project(spec_contents)
|
6
|
-
|
7
|
-
|
6
|
+
local_user_options = user_options || {}
|
7
|
+
project = local_user_options.fetch("project", CocoaPodsKeys::NameWhisperer.get_project_name)
|
8
|
+
keyring = KeyringLiberator.get_keyring_named(project) || KeyringLiberator.get_keyring(Dir.getwd)
|
9
|
+
raise Pod::Informative, "Could not load keyring" unless keyring
|
8
10
|
key_master = KeyMaster.new(keyring)
|
9
11
|
|
10
12
|
spec_contents.gsub!(/%%SOURCE_FILES%%/, "#{key_master.name}.{h,m}")
|
11
|
-
spec_contents.gsub!(/%%PROJECT_NAME%%/,
|
13
|
+
spec_contents.gsub!(/%%PROJECT_NAME%%/, project)
|
12
14
|
end
|
13
15
|
|
14
16
|
def setup
|
data/lib/preinstaller.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module CocoaPodsKeys
|
2
2
|
class PreInstaller
|
3
3
|
def initialize(user_options)
|
4
|
-
@
|
4
|
+
@user_options = user_options
|
5
5
|
end
|
6
6
|
|
7
7
|
def setup
|
@@ -11,13 +11,11 @@ module CocoaPodsKeys
|
|
11
11
|
|
12
12
|
options = @user_options || {}
|
13
13
|
current_dir = Dir.getwd
|
14
|
-
project = options.fetch('project',
|
14
|
+
project = options.fetch('project', CocoaPodsKeys::NameWhisperer.get_project_name)
|
15
15
|
keyring = KeyringLiberator.get_keyring_named(project) || KeyringLiberator.get_keyring(current_dir)
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
20
|
-
|
16
|
+
|
17
|
+
keyring = CocoaPodsKeys::Keyring.new(project, current_dir, []) unless keyring
|
18
|
+
|
21
19
|
data = keyring.keychain_data
|
22
20
|
has_shown_intro = false
|
23
21
|
keys = options.fetch("keys", [])
|
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.0.
|
4
|
+
version: 1.0.2
|
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: 2015-03-
|
12
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: osx_keychain
|