cocoapods-rome 0.3.1 → 0.4.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/Gemfile.lock +1 -1
 - data/lib/cocoapods-rome/gem_version.rb +1 -1
 - data/lib/cocoapods-rome/post_install.rb +36 -28
 - 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: 00ed0541f08ae74263685fb455e7ea0decc3a05c
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: b3f2b72e72285336132b36f7032a477861328d75
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 39724679681bf30753538cccad4c578ab04ef94a7f9fcd496836e7ce44c63da4349a5d14a4df20306ff096ed90c4057417c2dbb54145d8d0ccfbbd86932f3236
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 5bfc1359d902d24f6da7108b215518214b2afafe55a321b3db697b740957a461e084f99b08c7d745546e67f1c024d7c8e99c5e1f992c873867d2b2c698d2ca82
         
     | 
    
        data/Gemfile.lock
    CHANGED
    
    
| 
         @@ -1,12 +1,39 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            require 'fourflusher'
         
     | 
| 
       2 
2 
     | 
    
         | 
| 
       3 
3 
     | 
    
         
             
            CONFIGURATION = "Release"
         
     | 
| 
       4 
     | 
    
         
            -
             
     | 
| 
       5 
     | 
    
         
            -
             
     | 
| 
      
 4 
     | 
    
         
            +
            SIMULATORS = { 'iphonesimulator' => 'iPhone 5s',
         
     | 
| 
      
 5 
     | 
    
         
            +
                           'appletvsimulator' => 'Apple TV 1080p',
         
     | 
| 
      
 6 
     | 
    
         
            +
                           'watchsimulator' => 'Apple Watch - 38mm' }
         
     | 
| 
      
 7 
     | 
    
         
            +
             
     | 
| 
      
 8 
     | 
    
         
            +
            def build_for_iosish_platform(sandbox, build_dir, target, device, simulator)
         
     | 
| 
      
 9 
     | 
    
         
            +
              target_label = target.cocoapods_target_label
         
     | 
| 
      
 10 
     | 
    
         
            +
             
     | 
| 
      
 11 
     | 
    
         
            +
              xcodebuild(sandbox, target_label, device)
         
     | 
| 
      
 12 
     | 
    
         
            +
              xcodebuild(sandbox, target_label, simulator)
         
     | 
| 
      
 13 
     | 
    
         
            +
             
     | 
| 
      
 14 
     | 
    
         
            +
              spec_names = target.specs.map { |spec| spec.root.module_name }.uniq
         
     | 
| 
      
 15 
     | 
    
         
            +
              spec_names.each do |root_name|
         
     | 
| 
      
 16 
     | 
    
         
            +
                executable_path = "#{build_dir}/#{root_name}"
         
     | 
| 
      
 17 
     | 
    
         
            +
                device_lib = "#{build_dir}/#{CONFIGURATION}-#{device}/#{target_label}/#{root_name}.framework/#{root_name}"
         
     | 
| 
      
 18 
     | 
    
         
            +
                device_framework_lib = File.dirname(device_lib)
         
     | 
| 
      
 19 
     | 
    
         
            +
                simulator_lib = "#{build_dir}/#{CONFIGURATION}-#{simulator}/#{target_label}/#{root_name}.framework/#{root_name}"
         
     | 
| 
      
 20 
     | 
    
         
            +
             
     | 
| 
      
 21 
     | 
    
         
            +
                next unless File.file?(device_lib) && File.file?(simulator_lib)
         
     | 
| 
      
 22 
     | 
    
         
            +
             
     | 
| 
      
 23 
     | 
    
         
            +
                lipo_log = `lipo -create -output #{executable_path} #{device_lib} #{simulator_lib}`
         
     | 
| 
      
 24 
     | 
    
         
            +
                puts lipo_log unless File.exist?(executable_path)
         
     | 
| 
      
 25 
     | 
    
         
            +
             
     | 
| 
      
 26 
     | 
    
         
            +
                FileUtils.mv executable_path, device_lib
         
     | 
| 
      
 27 
     | 
    
         
            +
                FileUtils.mv device_framework_lib, build_dir
         
     | 
| 
      
 28 
     | 
    
         
            +
                FileUtils.rm simulator_lib if File.file?(simulator_lib)
         
     | 
| 
      
 29 
     | 
    
         
            +
                FileUtils.rm device_lib if File.file?(device_lib)
         
     | 
| 
      
 30 
     | 
    
         
            +
              end
         
     | 
| 
      
 31 
     | 
    
         
            +
            end
         
     | 
| 
       6 
32 
     | 
    
         | 
| 
       7 
33 
     | 
    
         
             
            def xcodebuild(sandbox, target, sdk='macosx')
         
     | 
| 
       8 
34 
     | 
    
         
             
              args = %W(-project #{sandbox.project_path.basename} -scheme #{target} -configuration #{CONFIGURATION} -sdk #{sdk})
         
     | 
| 
       9 
     | 
    
         
            -
               
     | 
| 
      
 35 
     | 
    
         
            +
              simulator = SIMULATORS[sdk]
         
     | 
| 
      
 36 
     | 
    
         
            +
              args += Fourflusher::SimControl.new.destination(simulator) unless simulator.nil?
         
     | 
| 
       10 
37 
     | 
    
         
             
              Pod::Executable.execute_command 'xcodebuild', args, true
         
     | 
| 
       11 
38 
     | 
    
         
             
            end
         
     | 
| 
       12 
39 
     | 
    
         | 
| 
         @@ -23,31 +50,12 @@ Pod::HooksManager.register('cocoapods-rome', :post_install) do |installer_contex 
     | 
|
| 
       23 
50 
     | 
    
         
             
              Dir.chdir(sandbox.project_path.dirname) do
         
     | 
| 
       24 
51 
     | 
    
         
             
                targets = installer_context.umbrella_targets.select { |t| t.specs.any? }
         
     | 
| 
       25 
52 
     | 
    
         
             
                targets.each do |target|
         
     | 
| 
       26 
     | 
    
         
            -
                   
     | 
| 
       27 
     | 
    
         
            -
                   
     | 
| 
       28 
     | 
    
         
            -
             
     | 
| 
       29 
     | 
    
         
            -
             
     | 
| 
       30 
     | 
    
         
            -
             
     | 
| 
       31 
     | 
    
         
            -
             
     | 
| 
       32 
     | 
    
         
            -
                    spec_names.each do |root_name|
         
     | 
| 
       33 
     | 
    
         
            -
                      executable_path = "#{build_dir}/#{root_name}"
         
     | 
| 
       34 
     | 
    
         
            -
                      device_lib = "#{build_dir}/#{CONFIGURATION}-#{DEVICE}/#{target_label}/#{root_name}.framework/#{root_name}"
         
     | 
| 
       35 
     | 
    
         
            -
                      device_framework_lib = File.dirname(device_lib)
         
     | 
| 
       36 
     | 
    
         
            -
                      simulator_lib = "#{build_dir}/#{CONFIGURATION}-#{SIMULATOR}/#{target_label}/#{root_name}.framework/#{root_name}"
         
     | 
| 
       37 
     | 
    
         
            -
             
     | 
| 
       38 
     | 
    
         
            -
                      next unless File.file?(device_lib) && File.file?(simulator_lib)
         
     | 
| 
       39 
     | 
    
         
            -
             
     | 
| 
       40 
     | 
    
         
            -
                      lipo_log = `lipo -create -output #{executable_path} #{device_lib} #{simulator_lib}`
         
     | 
| 
       41 
     | 
    
         
            -
                      puts lipo_log unless File.exist?(executable_path)
         
     | 
| 
       42 
     | 
    
         
            -
             
     | 
| 
       43 
     | 
    
         
            -
                      FileUtils.mv executable_path, device_lib
         
     | 
| 
       44 
     | 
    
         
            -
                      FileUtils.mv device_framework_lib, build_dir
         
     | 
| 
       45 
     | 
    
         
            -
                      FileUtils.rm simulator_lib if File.file?(simulator_lib)
         
     | 
| 
       46 
     | 
    
         
            -
                      FileUtils.rm device_lib if File.file?(device_lib)
         
     | 
| 
       47 
     | 
    
         
            -
                    end
         
     | 
| 
       48 
     | 
    
         
            -
                  else
         
     | 
| 
       49 
     | 
    
         
            -
                    xcodebuild(sandbox, target_label)
         
     | 
| 
       50 
     | 
    
         
            -
                  end
         
     | 
| 
      
 53 
     | 
    
         
            +
                  case target.platform_name
         
     | 
| 
      
 54 
     | 
    
         
            +
                  when :ios then build_for_iosish_platform(sandbox, build_dir, target, 'iphoneos', 'iphonesimulator')
         
     | 
| 
      
 55 
     | 
    
         
            +
                  when :osx then xcodebuild(sandbox, target.cocoapods_target_label)
         
     | 
| 
      
 56 
     | 
    
         
            +
                  when :tvos then build_for_iosish_platform(sandbox, build_dir, target, 'appletvos', 'appletvsimulator')
         
     | 
| 
      
 57 
     | 
    
         
            +
                  when :watchos then build_for_iosish_platform(sandbox, build_dir, target, 'watchos', 'watchsimulator')
         
     | 
| 
      
 58 
     | 
    
         
            +
                  else raise "Unknown platform '#{target.platform_name}'" end
         
     | 
| 
       51 
59 
     | 
    
         
             
                end
         
     | 
| 
       52 
60 
     | 
    
         
             
              end
         
     | 
| 
       53 
61 
     | 
    
         | 
    
        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.4.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-12- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2015-12-27 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: cocoapods
         
     |