cocoapods-tdfire-binary 0.1.0 → 0.1.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 +38 -1
- data/cocoapods-tdfire-binary.gemspec +1 -1
- data/lib/cocoapods-tdfire-binary/gem_version.rb +1 -1
- data/lib/cocoapods-tdfire-binary/podfile_dsl.rb +47 -3
- 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: fc2eea59094cada53569777975bb4eee561a17c3
         | 
| 4 | 
            +
              data.tar.gz: a73aec5469a5bf31588a7cc6f05fd4709da29e1d
         | 
| 5 5 | 
             
            SHA512:
         | 
| 6 | 
            -
              metadata.gz:  | 
| 7 | 
            -
              data.tar.gz:  | 
| 6 | 
            +
              metadata.gz: 1b43040556944cfacc21448f3c5f5421781b43b45542769bb8461923b5189c0f218fe376e3ba8dd44cee7b1f68fe0132a469822b2fc206cab2ef4f5677a46c44
         | 
| 7 | 
            +
              data.tar.gz: 28be0dc5cb5d4b0e6c675004efb854f57dca89b9b22d61b9d8886317ed412611465c89a95969c73767406d933c33246f8f0ecfe652f066972a697892b9533388
         | 
    
        data/Gemfile.lock
    CHANGED
    
    
    
        data/README.md
    CHANGED
    
    | @@ -8,4 +8,41 @@ A description of cocoapods-tdfire-binary. | |
| 8 8 |  | 
| 9 9 | 
             
            ## Usage
         | 
| 10 10 |  | 
| 11 | 
            -
             | 
| 11 | 
            +
            > For Podfile
         | 
| 12 | 
            +
             | 
| 13 | 
            +
            ```
         | 
| 14 | 
            +
            ...
         | 
| 15 | 
            +
            plugin 'cocoapods-tdfire-binary'
         | 
| 16 | 
            +
             | 
| 17 | 
            +
            tdfire_use_binary!
         | 
| 18 | 
            +
            tdfire_use_source_pods 'AFNetworking'
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            use_frameworks!
         | 
| 21 | 
            +
             | 
| 22 | 
            +
            ...
         | 
| 23 | 
            +
             | 
| 24 | 
            +
            tdfire_external_pods 'SDWebImage'
         | 
| 25 | 
            +
             | 
| 26 | 
            +
            ```
         | 
| 27 | 
            +
             | 
| 28 | 
            +
            > For podspec
         | 
| 29 | 
            +
             | 
| 30 | 
            +
            ```
         | 
| 31 | 
            +
            s.tdfire_source |s|
         | 
| 32 | 
            +
            # source configuration
         | 
| 33 | 
            +
            	...
         | 
| 34 | 
            +
             | 
| 35 | 
            +
            end
         | 
| 36 | 
            +
             | 
| 37 | 
            +
            s.tdfire_binary |s|
         | 
| 38 | 
            +
            # binary configuration
         | 
| 39 | 
            +
             | 
| 40 | 
            +
            	s.vendored_framework = "#{s.name}.framework"
         | 
| 41 | 
            +
              s.source_files = "#{s.name}.framework/Headers/*"
         | 
| 42 | 
            +
              s.public_header_files = "#{s.name}.framework/Headers/*"
         | 
| 43 | 
            +
             | 
| 44 | 
            +
              ...
         | 
| 45 | 
            +
            end
         | 
| 46 | 
            +
             | 
| 47 | 
            +
            s.tdfire_set_binary_download_configurations_at_last
         | 
| 48 | 
            +
            ```
         | 
| @@ -10,7 +10,7 @@ Gem::Specification.new do |spec| | |
| 10 10 | 
             
              spec.email         = ['triplec.linux@gmail.com']
         | 
| 11 11 | 
             
              spec.description   = %q{cocoapods-tdfire-binary is a plugin which helps developer switching there project dependency between source and binary.}
         | 
| 12 12 | 
             
              spec.summary       = %q{cocoapods-tdfire-binary is a plugin which helps developer switching there project dependency between source and binary.}
         | 
| 13 | 
            -
              spec.homepage      = 'https://github.com/ | 
| 13 | 
            +
              spec.homepage      = 'https://github.com/tripleCC/cocoapods-tdfire-binary'
         | 
| 14 14 | 
             
              spec.license       = 'MIT'
         | 
| 15 15 |  | 
| 16 16 | 
             
              spec.files         = `git ls-files`.split($/)
         | 
| @@ -7,7 +7,7 @@ module Pod | |
| 7 7 | 
             
                  # 使用源码依赖的pod
         | 
| 8 8 | 
             
                  def tdfire_use_source_pods(pods)
         | 
| 9 9 | 
             
                  	old_pods = Tdfire::BinaryStateStore.use_source_pods
         | 
| 10 | 
            -
                  	UI.puts "Tdfire: the use source pods: #{old_pods.join(',')} will be overrided by new pods: #{pods.join(',')}".cyan  | 
| 10 | 
            +
                  	UI.puts "Tdfire: the use source pods: #{old_pods.join(',')} will be overrided by new pods: #{pods.join(',')}".cyan if (!old_pods.empty? && old_pods != pods )
         | 
| 11 11 |  | 
| 12 12 | 
             
                  	Tdfire::BinaryStateStore.use_source_pods = pods
         | 
| 13 13 | 
             
                  end
         | 
| @@ -19,11 +19,55 @@ module Pod | |
| 19 19 |  | 
| 20 20 | 
             
                  # 外源组件依赖
         | 
| 21 21 | 
             
                  def tdfire_external_pods(pods, *rest)
         | 
| 22 | 
            -
                  	
         | 
| 22 | 
            +
                  	argvs = rest.last || {}
         | 
| 23 | 
            +
                    if !argvs.kind_of?(Hash)
         | 
| 24 | 
            +
                      info =  <<-EOF
         | 
| 25 | 
            +
            输入参数错误.
         | 
| 23 26 |  | 
| 27 | 
            +
            Example:
         | 
| 28 | 
            +
              tdfire_external_pods ['TDFCore'] source:'git' group:'ios' branch:'develop'
         | 
| 29 | 
            +
              tdfire_external_pods 'TDFCore' source:'git' group:'ios' branch:'develop'
         | 
| 30 | 
            +
              tdfire_external_pods ['TDFCore'] group:'cocoapods' 
         | 
| 31 | 
            +
              ...
         | 
| 32 | 
            +
             | 
| 33 | 
            +
            默认值:
         | 
| 34 | 
            +
              source:path
         | 
| 35 | 
            +
              group:ios
         | 
| 36 | 
            +
              branch:develop
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            所有值:
         | 
| 39 | 
            +
              source -> git path
         | 
| 40 | 
            +
              group -> 任意
         | 
| 41 | 
            +
              branch -> 任意
         | 
| 42 | 
            +
             | 
| 43 | 
            +
            格式可以和pod语法一致
         | 
| 44 | 
            +
            EOF
         | 
| 45 | 
            +
                      raise Pod::Informative, info
         | 
| 46 | 
            +
                    end
         | 
| 47 | 
            +
             | 
| 48 | 
            +
                    UI.puts argvs
         | 
| 49 | 
            +
                    source = argvs[:source] || 'git'
         | 
| 50 | 
            +
                    group = argvs[:group] || 'ios'
         | 
| 51 | 
            +
                    branch = argvs[:branch] || 'develop'
         | 
| 52 | 
            +
             | 
| 53 | 
            +
                    case source
         | 
| 54 | 
            +
                      when 'path'
         | 
| 55 | 
            +
                      Array(pods).each do |name|
         | 
| 56 | 
            +
                          if File.exist?("../../#{name}/#{name}.podspec")
         | 
| 57 | 
            +
                            pod name, :path => "../../#{name}"
         | 
| 58 | 
            +
                          else
         | 
| 59 | 
            +
                            pod name, :path => "../#{name}"
         | 
| 60 | 
            +
                          end
         | 
| 61 | 
            +
                      end
         | 
| 62 | 
            +
                      when 'git'
         | 
| 63 | 
            +
                      Array(pods).each do |name|
         | 
| 64 | 
            +
                          pod name, :git => "git@git.2dfire-inc.com:#{group}/#{name}.git", :branch => "#{branch}"
         | 
| 65 | 
            +
                      end
         | 
| 66 | 
            +
                      else
         | 
| 67 | 
            +
                    end
         | 
| 24 68 |  | 
| 25 69 | 
             
                  	# 除了依赖私有源正式版本的组件,其余组件一律进行源码依赖
         | 
| 26 | 
            -
             | 
| 70 | 
            +
                    Tdfire::BinaryStateStore.use_source_pods = Array(pods) + Tdfire::BinaryStateStore.use_source_pods
         | 
| 27 71 | 
             
                  end
         | 
| 28 72 | 
             
                end
         | 
| 29 73 | 
             
            	end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: cocoapods-tdfire-binary
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 0.1. | 
| 4 | 
            +
              version: 0.1.2
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors:
         | 
| 7 7 | 
             
            - tripleCC
         | 
| @@ -90,7 +90,7 @@ files: | |
| 90 90 | 
             
            - lib/cocoapods_plugin.rb
         | 
| 91 91 | 
             
            - spec/command/binary_spec.rb
         | 
| 92 92 | 
             
            - spec/spec_helper.rb
         | 
| 93 | 
            -
            homepage: https://github.com/ | 
| 93 | 
            +
            homepage: https://github.com/tripleCC/cocoapods-tdfire-binary
         | 
| 94 94 | 
             
            licenses:
         | 
| 95 95 | 
             
            - MIT
         | 
| 96 96 | 
             
            metadata: {}
         |