cocoapods-rome 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +7 -7
- data/README.md +1 -2
- data/cocoapods-rome.gemspec +1 -1
- data/lib/cocoapods-rome/gem_version.rb +1 -1
- data/lib/cocoapods-rome/post_install.rb +37 -12
- data/lib/cocoapods-rome/pre_install.rb +4 -0
- data/lib/cocoapods_plugin.rb +1 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3e700deed4bcc9ea660ae782275780ac0d20c3bb
|
4
|
+
data.tar.gz: 829d962a97796a8b962527312b972f0344d150ae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc1e27375402a40eb164c6c30066b5be370ea67e50ebf5f06ba47779fb7e8559a3b7825ea73b26b1bdbc97e26023cf8848222ebdb4e2c85a1b8115685c8dba96
|
7
|
+
data.tar.gz: 45607cf9440968a5835a64fe4fb49b8abbaac6ba3eab2d6f1088124e936eca21f0ab027c3e3e4d2abc8356dadac15ece87050c15e243ddb5c100317d2545952e
|
data/Gemfile.lock
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
cocoapods-rome (0.
|
5
|
-
cocoapods (>= 0.38.0
|
4
|
+
cocoapods-rome (0.2.0)
|
5
|
+
cocoapods (>= 0.38.0)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
@@ -15,10 +15,10 @@ GEM
|
|
15
15
|
tzinfo (~> 1.1)
|
16
16
|
bacon (1.2.0)
|
17
17
|
claide (0.9.1)
|
18
|
-
cocoapods (0.38.0
|
18
|
+
cocoapods (0.38.0)
|
19
19
|
activesupport (>= 3.2.15)
|
20
20
|
claide (~> 0.9.1)
|
21
|
-
cocoapods-core (= 0.38.0
|
21
|
+
cocoapods-core (= 0.38.0)
|
22
22
|
cocoapods-downloader (~> 0.9.1)
|
23
23
|
cocoapods-plugins (~> 0.4.2)
|
24
24
|
cocoapods-stats (~> 0.5.3)
|
@@ -28,8 +28,8 @@ GEM
|
|
28
28
|
escape (~> 0.0.4)
|
29
29
|
molinillo (~> 0.3.0)
|
30
30
|
nap (~> 0.8)
|
31
|
-
xcodeproj (~> 0.26.
|
32
|
-
cocoapods-core (0.38.0
|
31
|
+
xcodeproj (~> 0.26.2)
|
32
|
+
cocoapods-core (0.38.0)
|
33
33
|
activesupport (>= 3.2.15)
|
34
34
|
fuzzy_match (~> 2.0.4)
|
35
35
|
nap (~> 0.8.0)
|
@@ -55,7 +55,7 @@ GEM
|
|
55
55
|
thread_safe (0.3.5)
|
56
56
|
tzinfo (1.2.2)
|
57
57
|
thread_safe (~> 0.1)
|
58
|
-
xcodeproj (0.26.
|
58
|
+
xcodeproj (0.26.2)
|
59
59
|
activesupport (>= 3)
|
60
60
|
claide (~> 0.9.1)
|
61
61
|
colored (~> 1.2)
|
data/README.md
CHANGED
@@ -17,7 +17,6 @@ Write a simple Podfile like this:
|
|
17
17
|
|
18
18
|
```ruby
|
19
19
|
platform :osx, '10.10'
|
20
|
-
use_frameworks!
|
21
20
|
|
22
21
|
plugin 'cocoapods-rome'
|
23
22
|
|
@@ -27,7 +26,7 @@ pod 'Alamofire'
|
|
27
26
|
then run this:
|
28
27
|
|
29
28
|
```bash
|
30
|
-
pod install
|
29
|
+
pod install
|
31
30
|
```
|
32
31
|
|
33
32
|
and you will end up with dynamic frameworks:
|
data/cocoapods-rome.gemspec
CHANGED
@@ -18,7 +18,7 @@ Xcode}
|
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
20
|
|
21
|
-
spec.add_dependency "cocoapods", ">= 0.38.0
|
21
|
+
spec.add_dependency "cocoapods", ">= 0.38.0"
|
22
22
|
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
@@ -1,5 +1,9 @@
|
|
1
|
+
CONFIGURATION = "Release"
|
2
|
+
DEVICE = "iphoneos"
|
3
|
+
SIMULATOR = "iphonesimulator"
|
4
|
+
|
1
5
|
def xcodebuild(sandbox, target, sdk='macosx')
|
2
|
-
Pod::Executable.execute_command 'xcodebuild', %W(-project #{sandbox.project_path.basename} -scheme #{target} -configuration
|
6
|
+
Pod::Executable.execute_command 'xcodebuild', %W(-project #{sandbox.project_path.basename} -scheme #{target} -configuration #{CONFIGURATION} -sdk #{sdk}), true
|
3
7
|
end
|
4
8
|
|
5
9
|
Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_context|
|
@@ -15,32 +19,53 @@ Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_contex
|
|
15
19
|
Dir.chdir(sandbox.project_path.dirname) do
|
16
20
|
targets = installer_context.umbrella_targets.select { |t| t.specs.any? }
|
17
21
|
targets.each do |target|
|
22
|
+
target_label = target.cocoapods_target_label
|
18
23
|
if target.platform_name == :ios
|
19
|
-
xcodebuild(sandbox,
|
20
|
-
xcodebuild(sandbox,
|
24
|
+
xcodebuild(sandbox, target_label, DEVICE)
|
25
|
+
xcodebuild(sandbox, target_label, SIMULATOR)
|
26
|
+
|
27
|
+
spec_names = target.specs.map { |spec| spec.root.name }.uniq
|
28
|
+
spec_names.each do |root_name|
|
29
|
+
executable_path = "#{build_dir}/#{root_name}"
|
30
|
+
device_lib = "#{build_dir}/#{CONFIGURATION}-#{DEVICE}/#{target_label}/#{root_name}.framework/#{root_name}"
|
31
|
+
device_framework_lib = File.dirname(device_lib)
|
32
|
+
simulator_lib = "#{build_dir}/#{CONFIGURATION}-#{SIMULATOR}/#{target_label}/#{root_name}.framework/#{root_name}"
|
21
33
|
|
22
|
-
|
23
|
-
device_lib = "#{build_dir}/Release-iphoneos/#{spec.name}.framework/#{spec.name}"
|
24
|
-
simulator_lib = "#{build_dir}/Release-iphonesimulator/#{spec.name}.framework/#{spec.name}"
|
25
|
-
`lipo -create -output "#{build_dir}/#{spec.name}" #{device_lib} #{simulator_lib}`
|
34
|
+
next unless File.file?(device_lib) && File.file?(simulator_lib)
|
26
35
|
|
27
|
-
|
28
|
-
|
36
|
+
lipo_log = `lipo -create -output #{executable_path} #{device_lib} #{simulator_lib}`
|
37
|
+
puts lipo_log unless File.exist?(executable_path)
|
38
|
+
|
39
|
+
FileUtils.mv executable_path, device_lib
|
40
|
+
FileUtils.mv device_framework_lib, build_dir
|
29
41
|
end
|
30
42
|
else
|
31
|
-
xcodebuild(sandbox,
|
43
|
+
xcodebuild(sandbox, target_label)
|
32
44
|
end
|
33
45
|
end
|
34
46
|
end
|
35
47
|
|
36
48
|
raise Pod::Informative, 'The build directory was not found in the expected location.' unless build_dir.directory?
|
37
49
|
|
38
|
-
frameworks = Pathname.glob(build_dir
|
50
|
+
frameworks = Pathname.glob("#{build_dir}/**/*.framework").reject { |f| f.to_s =~ /Pods*\.framework/ }
|
39
51
|
|
40
52
|
Pod::UI.puts "Built #{frameworks.count} #{'frameworks'.pluralize(frameworks.count)}"
|
41
|
-
Pod::UI.puts "Copying frameworks to `#{destination.relative_path_from Pathname.pwd}`"
|
42
53
|
|
43
54
|
destination.rmtree if destination.directory?
|
55
|
+
|
56
|
+
installer_context.umbrella_targets.each do |umbrella|
|
57
|
+
umbrella.specs.each do |spec|
|
58
|
+
consumer = spec.consumer(umbrella.platform_name)
|
59
|
+
file_accessor = Pod::Sandbox::FileAccessor.new(sandbox.pod_dir(spec.root.name), consumer)
|
60
|
+
frameworks += file_accessor.vendored_libraries
|
61
|
+
frameworks += file_accessor.vendored_frameworks
|
62
|
+
end
|
63
|
+
end
|
64
|
+
frameworks.uniq!
|
65
|
+
|
66
|
+
Pod::UI.puts "Copying #{frameworks.count} #{'frameworks'.pluralize(frameworks.count)} " \
|
67
|
+
"to `#{destination.relative_path_from Pathname.pwd}`"
|
68
|
+
|
44
69
|
frameworks.each do |framework|
|
45
70
|
FileUtils.mkdir_p destination
|
46
71
|
FileUtils.cp_r framework, destination, :remove_destination => true
|
data/lib/cocoapods_plugin.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-rome
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Boris Bügling
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: cocoapods
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.38.0
|
19
|
+
version: 0.38.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 0.38.0
|
26
|
+
version: 0.38.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/cocoapods-rome.rb
|
70
70
|
- lib/cocoapods-rome/gem_version.rb
|
71
71
|
- lib/cocoapods-rome/post_install.rb
|
72
|
+
- lib/cocoapods-rome/pre_install.rb
|
72
73
|
- lib/cocoapods_plugin.rb
|
73
74
|
- spec/spec_helper.rb
|
74
75
|
- yolo.jpg
|