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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4c34d332123229b2c1d66b0e09e1816d5be52d7a6b26eea0ced488b2caec3ff1
4
- data.tar.gz: c1b6081c741bb665e9c83f61379bfb595d1308bd65a396f894cb5a477712b241
3
+ metadata.gz: 52473a5610798b6c4cac93a671ae0b55c452fba5d7815b7cecf80e925acef601
4
+ data.tar.gz: 7bcebd831048dafbacaa1c10999f45213d24efe8a074f7a5cca26ca6299fe1b1
5
5
  SHA512:
6
- metadata.gz: 50328203b3ab91a7a3f3738bd4f717b84e03182742b7f7ba5e21981c36c2df9cd081946aad50dc4f005be8e242f84ed3b53b891f6527b8fda3116df745a34a1e
7
- data.tar.gz: dd895172daebf3b81bdd7c082e3c195ffc7f1dcfaecf2e335640ff34e0d7983a52de0bb07dbfb94bf8c49cb5255a292ae3cd37b95b5e9b013a7f7c54790c9445
6
+ metadata.gz: b1bca7e67150b27d0e74608edc7a5f5259a08e1fe9297e809848886dba092df36a40b64eaf8a9d55436f85d51cad2beb22a8df55276a7e1ea1fe8a92bae57304
7
+ data.tar.gz: 102cc83d26fbb4202073769e52e32b422baaf22a67b02dc94d7bd18c31834e1020c07502f7cca507b844e85ed33a0ab43c513b0bf57da5155484975335330c38
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ormdev (0.1.6)
4
+ ormdev (0.1.7)
5
5
  claide (~> 1.0, >= 1.0.2)
6
6
  cocoapods (~> 1.5, >= 1.5.3)
7
7
  cocoapods-packager (~> 1.5)
@@ -4,7 +4,61 @@ require 'faraday_middleware'
4
4
  module OrmDev
5
5
  class HTTPUtil
6
6
 
7
- API_THIRD_PLUGIN_PUBLISH = 'http://192.168.2.110:8081/soops/sword/portal?SwordControllerName=uploadPlugin'.freeze #测试地址
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)
@@ -1,3 +1,3 @@
1
1
  module OrmDev
2
- VERSION = '0.1.6'
2
+ VERSION = '0.1.7'
3
3
  end
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.6
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-06 00:00:00.000000000 Z
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.6\n\n"
222
+ \ \e[0m\t\t\t\tv0.1.7\n\n"
223
223
  rdoc_options: []
224
224
  require_paths:
225
225
  - lib