luna-binary-uploader 0.1.14 → 0.1.15
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/lib/luna/binary/common/common.rb +21 -0
- data/lib/luna/binary/delete.rb +1 -1
- data/lib/luna/binary/refresh.rb +2 -14
- data/lib/luna/binary/update.rb +2 -14
- data/lib/luna/binary/uploader/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d529f4891c5824ed5c894073bbeec5d5668e875b54bff33d2ec84ce40279951
|
4
|
+
data.tar.gz: 298fe5853064bf24929dd43289415d4252e12e1448e08c10e665e0edc3e67870
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13a975f4a72a7b0991ae61347d75cada675ed8e9e26276a9499d55d5bbbc31c342115c924f2530c5e28900a688eeb8d107d8a5ddd595b656b52b8079a24a1c85
|
7
|
+
data.tar.gz: 23544e5512fbc4ea880afe1010c0f6fc37fae92a14a266f1e702368352cda6fb5a1bfd184ef07b71509ecc3c4958123e9f7bc8159e7eb03f372b9ad9da765038
|
@@ -94,6 +94,27 @@ module Luna
|
|
94
94
|
@lockfile ||= Pod::Lockfile.from_file(podFilePath) if podFilePath.exist?
|
95
95
|
end
|
96
96
|
|
97
|
+
def request_result_hash
|
98
|
+
command = "curl #{CBin.config.binary_upload_url}"
|
99
|
+
p command
|
100
|
+
result = %x(#{command})
|
101
|
+
request_result_hash = JSON.parse(result)
|
102
|
+
p request_result_hash
|
103
|
+
return request_result_hash
|
104
|
+
end
|
105
|
+
|
106
|
+
def createNeedFrameworkMapper
|
107
|
+
spec_repo_binary = {}
|
108
|
+
Pod::UserInterface.puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
|
109
|
+
Luna::Binary::Common.instance.use_framework_list.each { |item|
|
110
|
+
name = item.split('/').first
|
111
|
+
if spec_repo_binary[name] == nil
|
112
|
+
spec_repo_binary[name] = lockfile.version(name).version
|
113
|
+
end
|
114
|
+
}
|
115
|
+
return spec_repo_binary
|
116
|
+
end
|
117
|
+
|
97
118
|
def use_framework_list
|
98
119
|
list = []
|
99
120
|
File.open(Dir.pwd+"/Podfile", 'r:utf-8') do |f|
|
data/lib/luna/binary/delete.rb
CHANGED
@@ -41,7 +41,7 @@ module Luna
|
|
41
41
|
end
|
42
42
|
|
43
43
|
def deleteBinaryFramework
|
44
|
-
command = "curl -X 'DELETE' #{CBin.config.binary_upload_url}/#{name}/#{version}
|
44
|
+
command = "curl -X 'DELETE' #{CBin.config.binary_upload_url}/#{name}/#{version}"
|
45
45
|
p command
|
46
46
|
system command
|
47
47
|
end
|
data/lib/luna/binary/refresh.rb
CHANGED
@@ -50,25 +50,13 @@ module Luna
|
|
50
50
|
|
51
51
|
def request_result_hash
|
52
52
|
if @request_result_hash == nil
|
53
|
-
|
54
|
-
p command
|
55
|
-
result = %x(#{command})
|
56
|
-
@request_result_hash = JSON.parse(result)
|
57
|
-
p @request_result_hash
|
53
|
+
@request_result_hash = Luna::Binary::Common.instance.request_result_hash
|
58
54
|
end
|
59
55
|
return @request_result_hash
|
60
56
|
end
|
61
57
|
|
62
58
|
def createNeedFrameworkMapper
|
63
|
-
|
64
|
-
Pod::UserInterface.puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
|
65
|
-
Luna::Binary::Common.instance.use_framework_list.each { |item|
|
66
|
-
if spec_repo_binary[item] == nil && item["/"] == nil
|
67
|
-
name = item.split('/').first
|
68
|
-
spec_repo_binary[name] = lockfile.version(name).version
|
69
|
-
end
|
70
|
-
}
|
71
|
-
return spec_repo_binary
|
59
|
+
return Luna::Binary::Common.instance.createNeedFrameworkMapper
|
72
60
|
end
|
73
61
|
end
|
74
62
|
end
|
data/lib/luna/binary/update.rb
CHANGED
@@ -104,25 +104,13 @@ module Luna
|
|
104
104
|
|
105
105
|
def request_result_hash
|
106
106
|
if @request_result_hash == nil
|
107
|
-
|
108
|
-
p command
|
109
|
-
result = %x(#{command})
|
110
|
-
@request_result_hash = JSON.parse(result)
|
111
|
-
p @request_result_hash
|
107
|
+
@request_result_hash = Luna::Binary::Common.instance.request_result_hash
|
112
108
|
end
|
113
109
|
return @request_result_hash
|
114
110
|
end
|
115
111
|
|
116
112
|
def createNeedFrameworkMapper
|
117
|
-
|
118
|
-
Pod::UserInterface.puts "二进制repo地址 : #{CBin.config.binary_repo_url}".yellow
|
119
|
-
Luna::Binary::Common.instance.use_framework_list.each { |item|
|
120
|
-
if spec_repo_binary[item] == nil && item["/"] == nil
|
121
|
-
name = item.split('/').first
|
122
|
-
spec_repo_binary[name] = lockfile.version(name).version
|
123
|
-
end
|
124
|
-
}
|
125
|
-
return spec_repo_binary
|
113
|
+
return Luna::Binary::Common.instance.createNeedFrameworkMapper
|
126
114
|
end
|
127
115
|
end
|
128
116
|
end
|