ormdev 0.1.6 → 0.1.7
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/ormdev/source/util/http_util.rb +58 -1
- data/lib/ormdev/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 52473a5610798b6c4cac93a671ae0b55c452fba5d7815b7cecf80e925acef601
|
4
|
+
data.tar.gz: 7bcebd831048dafbacaa1c10999f45213d24efe8a074f7a5cca26ca6299fe1b1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b1bca7e67150b27d0e74608edc7a5f5259a08e1fe9297e809848886dba092df36a40b64eaf8a9d55436f85d51cad2beb22a8df55276a7e1ea1fe8a92bae57304
|
7
|
+
data.tar.gz: 102cc83d26fbb4202073769e52e32b422baaf22a67b02dc94d7bd18c31834e1020c07502f7cca507b844e85ed33a0ab43c513b0bf57da5155484975335330c38
|
data/Gemfile.lock
CHANGED
@@ -4,7 +4,61 @@ require 'faraday_middleware'
|
|
4
4
|
module OrmDev
|
5
5
|
class HTTPUtil
|
6
6
|
|
7
|
-
|
7
|
+
API_THIRD_PLUGIN_CHECK = 'http://112.65.142.83:7799/soops/sword/portal/checkPluginBaseInfo'.freeze #测试地址
|
8
|
+
API_THIRD_PLUGIN_PUBLISH = 'http://112.65.142.83:7799/soops/sword/portal?SwordControllerName=uploadPlugin'.freeze #测试地址
|
9
|
+
|
10
|
+
def self.send_check_plugin_http(username, password, publish_type, podspec_path, zip_path, changelog = '')
|
11
|
+
@spec = Pod::Specification.from_file(podspec_path)
|
12
|
+
cim_sdk_version = ''
|
13
|
+
@spec.dependencies.each do |dep|
|
14
|
+
if 'CIMSDK'.eql? dep.name
|
15
|
+
cim_sdk_version = plugin_version_from(dep.requirement.requirements.flatten.last.to_s)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
# start upload
|
20
|
+
conn_options = {
|
21
|
+
request: {
|
22
|
+
timeout: 1000,
|
23
|
+
open_timeout: 300
|
24
|
+
}
|
25
|
+
}
|
26
|
+
pgyer_client = Faraday.new(nil, conn_options) do |c|
|
27
|
+
c.request :multipart
|
28
|
+
c.request :url_encoded
|
29
|
+
c.response :json, content_type: /\bjson$/
|
30
|
+
c.adapter :net_http
|
31
|
+
end
|
32
|
+
|
33
|
+
params = {
|
34
|
+
'username' => username || ENV['ORMDEV_CLT_USERNAME'],
|
35
|
+
'password' => password || ENV['ORMDEV_CLT_PASSWORD'],
|
36
|
+
'version' => OrmDev::VERSION,
|
37
|
+
'platform' => 1,# 0:android,1:ios
|
38
|
+
'pluginName' => @spec.name.gsub(/^CIP/, 'cip'),
|
39
|
+
'pluginVersion' => @spec.version.to_s,
|
40
|
+
'pluginBaseVersion' => cim_sdk_version, #base版本号
|
41
|
+
}
|
42
|
+
|
43
|
+
unless podspec_path.nil? then
|
44
|
+
params[File.basename(podspec_path)] = Faraday::UploadIO.new(podspec_path, 'application/octet-stream') if File.exist?(podspec_path)
|
45
|
+
end
|
46
|
+
unless zip_path.nil? then
|
47
|
+
params[File.basename(zip_path)] = Faraday::UploadIO.new(zip_path, 'application/octet-stream') if File.exist?(zip_path)
|
48
|
+
end
|
49
|
+
OrmDev::LogUtil.info '【发布第三方插件】开始上传 ...'
|
50
|
+
|
51
|
+
api = ENV['ORMDEV_CLT_API_THIRD_PLUGIN_PUBLISH'] || API_THIRD_PLUGIN_PUBLISH
|
52
|
+
response = pgyer_client.post api, params
|
53
|
+
|
54
|
+
info = response.body
|
55
|
+
OrmDev::LogUtil.info "【第三方插件发布】#{api}"
|
56
|
+
OrmDev::LogUtil.info "【第三方插件发布】Upload complate: #{info}"
|
57
|
+
if info && info['status'] && info['status'] == '0000' then
|
58
|
+
OrmDev::LogUtil.info '【第三方插件发布】上传成功'
|
59
|
+
end
|
60
|
+
info
|
61
|
+
end
|
8
62
|
|
9
63
|
def self.send_pulish_plugin_http(username, password, publish_type, podspec_path, zip_path, changelog = '')
|
10
64
|
@spec = Pod::Specification.from_file(podspec_path)
|
@@ -58,6 +112,9 @@ module OrmDev
|
|
58
112
|
info
|
59
113
|
end
|
60
114
|
|
115
|
+
ORMDEV_CLT_API_THIRD_PLUGIN_CHECK
|
116
|
+
|
117
|
+
|
61
118
|
private
|
62
119
|
|
63
120
|
def self.plugin_version_from(pod_version)
|
data/lib/ormdev/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ormdev
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- devorm
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-12-
|
11
|
+
date: 2018-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: claide
|
@@ -219,7 +219,7 @@ post_install_message: "\e[32m\n _____ __ __ ________\n
|
|
219
219
|
___ \\ / / / / / _ _ /\n / / / // /_/ / / // // /\n / / / //
|
220
220
|
____/ / // // /\n / /__/ // / / // // /\n \\_____//_/ /_//_//_/
|
221
221
|
\ Dev\n\n\n -- 欢迎使用OrmDev for iOS --\n ---- 技术支持:devorm@163.com ----\n\n
|
222
|
-
\ \e[0m\t\t\t\tv0.1.
|
222
|
+
\ \e[0m\t\t\t\tv0.1.7\n\n"
|
223
223
|
rdoc_options: []
|
224
224
|
require_paths:
|
225
225
|
- lib
|