cocoapods-keys 0.9.0 → 0.9.5

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: 62ababc4c34fbfab2584d69d298b0fbf733473c0
4
- data.tar.gz: 178a677590539308b229c1dbd14859a6f4144f1a
3
+ metadata.gz: 54dc28574496b098df76d5fbb5fb61c09cb66839
4
+ data.tar.gz: 6037257545de31f6c89d62b740732c8174cdf3d7
5
5
  SHA512:
6
- metadata.gz: 8da7e646aac64596f00efd24222e5778dab70f69e8c5641a3c84f7745ab7971982d3c8cedc8f8453d4b6eacd27e0680b250e0ecb29d3d01b5f97f7bb32c67d5f
7
- data.tar.gz: d1c8eed4e2406181f1a1c032aecc0eab94f2df3b160453f949216a5fcbebfce3c981174a77ae74e072b9f8eab98b403b28a866d883b55d6416faf84bc0c91156
6
+ metadata.gz: 177cba97497cb4433c09e2606d2f1a9bdfb2af384bc0bd1d54f479927fcec670c26d7601fdc0c1decc56119443231b8c74d4582a6429665b1ae0ff8c8fda51a1
7
+ data.tar.gz: 73b33ac99ab1fa60b8be9639bb922bc213e2b7190e6bcaa70b8bc470b01090eeb740eb872a9fb97321b972c6e14c438986da3a7e975701cd2660f23eff33a8ac
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-keys (0.5.2)
4
+ cocoapods-keys (0.9.0)
5
5
  osx_keychain
6
6
 
7
7
  GEM
@@ -9,7 +9,7 @@ GEM
9
9
  specs:
10
10
  RubyInline (3.12.3)
11
11
  ZenTest (~> 4.3)
12
- ZenTest (4.10.1)
12
+ ZenTest (4.11.0)
13
13
  osx_keychain (1.0.0)
14
14
  RubyInline (~> 3)
15
15
  rake (10.3.2)
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsKeys
2
- VERSION = "0.9.0"
2
+ VERSION = "0.9.5"
3
3
  end
data/lib/installer.rb CHANGED
@@ -17,8 +17,10 @@ module CocoaPodsKeys
17
17
 
18
18
  keys_folder = File.join(@sandbox_root, 'Keys')
19
19
  keys_headers_folder = File.join(@sandbox_root, 'Headers', 'Public', 'CocoaPods-Keys')
20
- interface_file = File.join(keys_headers_folder, key_master.name + '.h')
20
+ interface_name = key_master.name + '.h'
21
+ interface_file = File.join(keys_headers_folder, interface_name)
21
22
  implementation_file = File.join(keys_folder, key_master.name + '.m')
23
+
22
24
  Dir.mkdir keys_folder unless Dir.exists? keys_folder
23
25
  Dir.mkdir keys_headers_folder unless Dir.exists? keys_headers_folder
24
26
  File.open(interface_file, 'w') { |f| f.write(key_master.interface) }
@@ -27,15 +29,23 @@ module CocoaPodsKeys
27
29
  project = Xcodeproj::Project.open File.join(@sandbox_root, 'Pods.xcodeproj')
28
30
 
29
31
  group = project.new_group('Keys')
30
- group.new_file(interface_file)
32
+ interface = group.new_file(interface_file)
31
33
  implementation = group.new_file(implementation_file)
32
34
 
33
35
  pods_target = project.targets.detect { |t| t.name == 'Pods' }
34
36
  unless pods_target
35
37
  pods_target = project.targets.detect { |t| t.name == 'Pods-' + keyring.name }
36
38
  end
39
+
37
40
  pods_target.add_file_references [implementation]
38
41
 
42
+ # Swift Pod support
43
+ if pods_target.product_type == "com.apple.product-type.framework"
44
+ pods_target.add_file_references [interface]
45
+ header_ref = pods_target.headers_build_phase.files[-1]
46
+ header_ref.settings = { "ATTRIBUTES" => ["Public"] }
47
+ end
48
+
39
49
  project.save
40
50
  end
41
51
  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: 0.9.0
4
+ version: 0.9.5
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: 2014-11-07 00:00:00.000000000 Z
12
+ date: 2014-11-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: osx_keychain