cocoapods-dongjia 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cocoapods-dongjia/gem_version.rb +2 -1
- data/lib/helper/dongjia_version_checker.rb +12 -6
- data/lib/helper/pod.rb +23 -1
- data/lib/helper/podfile_options.rb +7 -24
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f18bc9b7c748f76da031b3c7399e77fa0cc7d0de5f9ce4ee35081e82cdf4fa0a
|
4
|
+
data.tar.gz: 0535a37844a08856aa30e77820d5ab8ee15364997521aee38b6d71ec1ef86052
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4ad0844ad88e3c0f1e911c54f924e4f0117d63ada80009a769ed77688ec14435932b5653f05157274a826d14c6c3866fd3ead7e493b825e4f3cd186727c4d54
|
7
|
+
data.tar.gz: a89af33980896a67d37f4517a9f12e3d6d93386e11cb25b4ad1f0d081e6f8eee428285eefe92d5dcb6ee627cad68f584ae9bcc0b50f3905ffdd5fa18b0d182e0
|
@@ -9,12 +9,18 @@ module Dongjia
|
|
9
9
|
|
10
10
|
Pod::UI.puts 'Done.'
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
12
|
+
begin
|
13
|
+
info = Gems.info 'cocoapods-dongjia'
|
14
|
+
latest_version = info['version']
|
15
|
+
v = CocoapodsDongjia::VERSION
|
16
|
+
|
17
|
+
if v < latest_version
|
18
|
+
update_desc = info['metadata']['update_desc']
|
19
|
+
Pod::UI.warn "cocoapods-dongjia #{latest_version} is available."
|
20
|
+
Pod::UI.warn "#{update_desc}"
|
21
|
+
Pod::UI.warn "to upgrade: [sudo] gem install cocoapods-dongjia"
|
22
|
+
end
|
23
|
+
rescue
|
18
24
|
end
|
19
25
|
end
|
20
26
|
|
data/lib/helper/pod.rb
CHANGED
@@ -9,4 +9,26 @@ module Pod
|
|
9
9
|
ret
|
10
10
|
end
|
11
11
|
|
12
|
-
|
12
|
+
# 注入本地路径
|
13
|
+
def self.inject_local_path(name, requirements)
|
14
|
+
local_path = nil
|
15
|
+
local_root = ENV['POD_LOCAL_ROOT']
|
16
|
+
if !local_root
|
17
|
+
UI.warn '环境变量中未发现 POD_LOCAL_ROOT 定义'
|
18
|
+
elsif local_root.length
|
19
|
+
local_path = File.join(local_root, repo_name(name))
|
20
|
+
end
|
21
|
+
if local_path
|
22
|
+
requirements.pop
|
23
|
+
requirements.push({:path => local_path})
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
# 注入远程仓库地址
|
28
|
+
def self.inject_remote_git(name, requirements)
|
29
|
+
options = requirements.pop
|
30
|
+
options[:git] = "git@code.kaipao.cc:ios-team/components/#{name}.git"
|
31
|
+
requirements.push(options)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
require_relative 'pod'
|
2
|
+
require 'pry'
|
2
3
|
|
3
4
|
module Pod
|
4
5
|
|
@@ -6,17 +7,7 @@ module Pod
|
|
6
7
|
|
7
8
|
module DSL
|
8
9
|
def localpod(name = nil, *requirements)
|
9
|
-
|
10
|
-
local_root = ENV['POD_LOCAL_ROOT']
|
11
|
-
if !local_root
|
12
|
-
UI.warn '环境变量中未发现 POD_LOCAL_ROOT 定义'
|
13
|
-
elsif local_root.length
|
14
|
-
local_path = File.join(local_root, Pod::repo_name(name))
|
15
|
-
end
|
16
|
-
if local_path
|
17
|
-
requirements.pop
|
18
|
-
requirements.push({:path => local_path})
|
19
|
-
end
|
10
|
+
Pod::inject_local_path(name, requirements)
|
20
11
|
pod(name, *requirements)
|
21
12
|
end
|
22
13
|
|
@@ -27,22 +18,14 @@ module Pod
|
|
27
18
|
|
28
19
|
def parse_requirements(name, requirements)
|
29
20
|
|
30
|
-
local_path = nil
|
31
|
-
|
32
21
|
options = requirements.last
|
33
|
-
if options.is_a?(Hash)
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
local_path = File.join(local_root, Pod::repo_name(name))
|
22
|
+
if options.is_a?(Hash)
|
23
|
+
if options[:local] == true
|
24
|
+
Pod::inject_local_path(name, requirements)
|
25
|
+
elsif not ([:branch, :commit, :tag] & options.keys).empty? and options[:git] == nil
|
26
|
+
Pod::inject_remote_git(name, requirements)
|
39
27
|
end
|
40
28
|
end
|
41
|
-
|
42
|
-
if local_path
|
43
|
-
requirements.pop
|
44
|
-
requirements.push({:path => local_path})
|
45
|
-
end
|
46
29
|
end
|
47
30
|
|
48
31
|
old_method = instance_method(:parse_inhibit_warnings)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-dongjia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- jiangzhuoyi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -75,7 +75,8 @@ files:
|
|
75
75
|
homepage: https://github.com/EXAMPLE/cocoapods-dongjia
|
76
76
|
licenses:
|
77
77
|
- MIT
|
78
|
-
metadata:
|
78
|
+
metadata:
|
79
|
+
update_desc: " - 远程仓库支持 :branch / :tag / :commit 直接指定"
|
79
80
|
post_install_message:
|
80
81
|
rdoc_options: []
|
81
82
|
require_paths:
|