cocoapods-keys 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f4065e1921e7109cb41050598e08f7154f4f7b9d
4
- data.tar.gz: 2219c5f79674be0c1863b6ff882a6d37146db743
3
+ metadata.gz: 46fd2317903ff6b9b6d9117c6ba834e9ae6efe98
4
+ data.tar.gz: d8e127fdf8ab65eb8b446a011de5135db2057682
5
5
  SHA512:
6
- metadata.gz: 18a796c11000f0c17b3815ccba9073e396e2d38805df055007acc393761748ca968da2ffb71e946c7bcd7d64b93076c07a3ddfa5944ee51e7dfebae3d286829e
7
- data.tar.gz: 4b2812c4e8b24c605d3867e046493d3f9b45f0c24e93a939995375c2adebb54554951247bbb2684941b8dfbfe4117db202a197627f2a731454f7a6556e4e1dec
6
+ metadata.gz: fb52c1999ca9a2237615dd19fcd637535f8ccc26c0dc717625decb5cc5003adc39dbf46d19cdc65c4fc64f27f3272b6ea667615139b366d2e66fbd2c1205de46
7
+ data.tar.gz: e9b6925e32bf7ea4a19ad1c63ab51d29da2b89e94ff8860d47aaa253037658a6e83d64002dc8cfc4e25ea981c9d61c60debdb403334af404048bcae793003e4b
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-keys (1.0.1)
4
+ cocoapods-keys (1.0.2)
5
5
  osx_keychain
6
6
 
7
7
  GEM
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` framework to your Pods project. This provides an API to your keys from Cocoa code. For example the application code above would look like:
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
 
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsKeys
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
data/lib/key_master.rb CHANGED
@@ -17,6 +17,7 @@ module CocoaPodsKeys
17
17
 
18
18
  def generate_data
19
19
 
20
+ return nil if @keys.empty?
20
21
  # Generate a base64 hash string that is ~25 times the length of all keys
21
22
 
22
23
  @data_length = @keys.values.map(&:length).reduce(:+) * (20 + rand(10))
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
- keyring = KeyringLiberator.get_keyring_named(user_options["project"]) || KeyringLiberator.get_keyring(Dir.getwd)
7
- raise Informative, "Could not load keyring" unless keyring
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%%/, user_options["project"])
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
- @options = user_options
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', nil)
14
+ project = options.fetch('project', CocoaPodsKeys::NameWhisperer.get_project_name)
15
15
  keyring = KeyringLiberator.get_keyring_named(project) || KeyringLiberator.get_keyring(current_dir)
16
- unless keyring
17
- name = project || CocoaPodsKeys::NameWhisperer.get_project_name
18
- keyring = CocoaPodsKeys::Keyring.new(name, current_dir, [])
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.1
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-11 00:00:00.000000000 Z
12
+ date: 2015-03-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: osx_keychain