cocoapods-vemars 0.0.3 → 0.0.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: db2b7ede8ac9872aa0750683c6cf6b937e7c5bfe619a1419acb3b946da631fdd
4
- data.tar.gz: add3cfba272b078af7e24c2aa0a5e9acded640aba24f3bdeb6b653e74c7ecc6d
3
+ metadata.gz: ce531382e591ecfbc337cc96b019dee3e01e08db54e74661edd8a9b7bfba5a09
4
+ data.tar.gz: d6d5e7a9c6ba4faa87d0c4c262053cc82fe33ebf891278a790e3d5f3229d12ce
5
5
  SHA512:
6
- metadata.gz: 3404059e79b56c1d3786d0a4a4c4f91c77259f54178b0a9e5bd16e6211f95202ea375a269563c21fa31dd379486872609f769c57e91eb5ab690c2e0286565268
7
- data.tar.gz: d0bd479ded7c05962eb9c9b928b774ec5b90544cdba259b1c0f5b1eaeedd9f883be61cb070b1ead7218dcba7602f557c2bddf1b7e05df81040ed58855355d9e7
6
+ metadata.gz: 2df655100debe173901074517f0ea78fc7742c6fe2afc611c73001effe77f606930224a677eeb4c49beaba6c60b75e8017d6c096dafffb48cb85d12cdbb51a4f
7
+ data.tar.gz: 7032cd7b71861d3c19a7917930dcaae1bcae32e849d17bdde3ed7b5d01c94eade1ceeb72841162db60ab5b88e33f84699f219032438eda74be4c93890676ea46
data/.gitignore CHANGED
@@ -6,4 +6,6 @@ install
6
6
  .bundle
7
7
 
8
8
  *.gem
9
- *.gemspec
9
+ *.gemspec
10
+ ruby/
11
+ test/
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-vemars (0.0.2)
4
+ cocoapods-vemars (0.0.5)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -12,7 +12,7 @@ GEM
12
12
  i18n (>= 0.7, < 2)
13
13
  minitest (~> 5.1)
14
14
  tzinfo (~> 1.1)
15
- addressable (2.8.0)
15
+ addressable (2.7.0)
16
16
  public_suffix (>= 2.0.2, < 5.0)
17
17
  algoliasearch (1.27.5)
18
18
  httpclient (~> 2.8, >= 2.8.3)
@@ -57,11 +57,14 @@ GEM
57
57
  netrc (~> 0.11)
58
58
  cocoapods-try (1.2.0)
59
59
  colored2 (3.1.2)
60
- concurrent-ruby (1.1.9)
60
+ concurrent-ruby (1.1.8)
61
+ debase (0.2.5.beta2)
62
+ debase-ruby_core_source (>= 0.10.12)
63
+ debase-ruby_core_source (0.10.12)
61
64
  escape (0.0.4)
62
65
  ethon (0.14.0)
63
66
  ffi (>= 1.15.0)
64
- ffi (1.15.3)
67
+ ffi (1.15.1)
65
68
  fourflusher (2.3.1)
66
69
  fuzzy_match (2.0.4)
67
70
  gh_inspector (1.1.3)
@@ -76,34 +79,38 @@ GEM
76
79
  netrc (0.11.0)
77
80
  plist (3.6.0)
78
81
  public_suffix (4.0.6)
79
- rake (13.0.6)
82
+ rake (13.0.3)
80
83
  rexml (3.2.5)
84
+ ruby-debug-ide (0.7.2)
85
+ rake (>= 0.8.1)
81
86
  ruby-macho (1.4.0)
82
87
  thread_safe (0.3.6)
83
88
  typhoeus (1.4.0)
84
89
  ethon (>= 0.9.0)
85
90
  tzinfo (1.2.9)
86
91
  thread_safe (~> 0.1)
87
- xcodeproj (1.20.0)
92
+ xcodeproj (1.19.0)
88
93
  CFPropertyList (>= 2.3.3, < 4.0)
89
94
  atomos (~> 0.1.3)
90
95
  claide (>= 1.0.2, < 2.0)
91
96
  colored2 (~> 3.1)
92
97
  nanaimo (~> 0.3.0)
93
- rexml (~> 3.2.4)
94
98
 
95
99
  PLATFORMS
96
100
  x86_64-darwin-19
101
+ x86_64-darwin-20
97
102
 
98
103
  DEPENDENCIES
99
104
  bundler (~> 2.2.15)
100
105
  cocoapods
101
106
  cocoapods-vemars!
102
107
  concurrent-ruby
108
+ debase (= 0.2.5.beta2)
103
109
  json
104
110
  plist (~> 3.2)
105
111
  rake
106
112
  rexml
113
+ ruby-debug-ide
107
114
  xcodeproj
108
115
 
109
116
  BUNDLED WITH
@@ -4,7 +4,6 @@ require_relative '../services/tailor'
4
4
  require_relative 'basicInfo'
5
5
  require_relative '../services/renamer'
6
6
  require 'json'
7
-
8
7
  module Pod
9
8
 
10
9
  class VemarsProject
@@ -13,6 +12,7 @@ module Pod
13
12
  attr_reader :basicInfo
14
13
  attr_reader :selected_components
15
14
  attr_reader :git_url
15
+ attr_reader :service_url
16
16
 
17
17
  attr_accessor :components_details
18
18
  attr_accessor :source
@@ -21,13 +21,14 @@ module Pod
21
21
  File.join(Dir.pwd, "Project")
22
22
  end
23
23
 
24
- def initialize(app_key, components, config_json, version=nil, bundle_id=nil, name='', language='objc', git_url)
24
+ def initialize(app_key, components, config_json, version=nil, bundle_id=nil, name='', language='objc', git_url, service_url)
25
25
  @language = language
26
26
  @basicInfo = BasicInfo.new(app_key, bundle_id, name, version)
27
27
  @git_url = git_url
28
28
  @config_json = config_json
29
29
  @selected_components = components | (language == 'swift' ? %w[OneKit SwiftOneKit] : ['OneKit'])
30
30
  @components_details = []
31
+ @service_url = service_url
31
32
  end
32
33
 
33
34
  def generate
@@ -84,7 +85,7 @@ module Pod
84
85
  end
85
86
 
86
87
  def collect_components
87
- components_api = Components_api.new(@basicInfo.version)
88
+ components_api = Components_api.new(@basicInfo.version,@service_url)
88
89
  all_components = components_api.getComponents
89
90
  @source = components_api.source
90
91
  @selected_components.each do |com|
@@ -105,6 +106,16 @@ module Pod
105
106
 
106
107
  def construct_plist
107
108
  json = JSON.load_file @config_json
109
+ json["project_info"]["app_id"] = json["project_info"]["app_id"].to_s
110
+ services = Hash.new
111
+ if @selected_components.include? "BDHotfix"
112
+ services["bdhotfix"] = { "dist_area" => "cn", "domain_name" => "", "debug" => true}
113
+ end
114
+ if @selected_components.include? "VEH5Kit"
115
+ services["jsbridge_services"] = { "auth_domain" => "", "auth_enable" => false}
116
+ services["gecko_services"] = { "platform_domain" => "", "pattern" => "", "gecko_channels" => [], "gecko_access_key" => ""}
117
+ end
118
+ json["services"] = services
108
119
  File.open(Dir.pwd + "/onekit-config.plist", 'w') { |file|
109
120
  file.puts json.to_plist
110
121
  }
@@ -11,8 +11,20 @@ module Pod
11
11
  Query what baseline versions are available in vemars.
12
12
  DESC
13
13
 
14
+ def self.options
15
+ options = [
16
+ ['--service_url=SERVICE_URL', 'url of vemars CLI service.']
17
+ ]
18
+ end
19
+
20
+ def initialize(argv)
21
+ @service_url = argv.option('service_url',nil)
22
+ super
23
+ @additional_args = argv.remainder!
24
+ end
25
+
14
26
  def run
15
- api = Baselines_api.new()
27
+ api = Baselines_api.new(@service_url)
16
28
  api.getBaselines
17
29
  end
18
30
 
@@ -15,9 +15,16 @@ module Pod
15
15
  CLAide::Argument.new('BASELINE', false)
16
16
  ]
17
17
 
18
+ def self.options
19
+ options = [
20
+ ['--service_url=SERVICE_URL', 'url of vemars CLI service.']
21
+ ]
22
+ end
23
+
18
24
  def initialize(argv)
19
25
  baseline = argv.shift_argument
20
- @api = Components_api.new(baseline)
26
+ service_url = argv.option('service_url',nil)
27
+ @api = Components_api.new(baseline,service_url)
21
28
  super
22
29
  @additional_args = argv.remainder!
23
30
  end
@@ -22,7 +22,10 @@ module Pod
22
22
  ['--silent', 'do not run pod install'],
23
23
  ['--bundle_id=bundle_id', 'the bundle_id from Vemars'],
24
24
  ['--com=COM1,COM2', 'Selected components in vemars.'],
25
- ['--config=CONFIG_PATH', 'config path of vemars.']
25
+ ['--config=CONFIG_PATH', 'config path of vemars.'],
26
+ ['--service_url=SERVICE_URL', 'url of vemars CLI service.'],
27
+ ['--git=GIT_URL', 'git url of demo repo'],
28
+ ['--pod_repo_no_update', 'do not run pod repo update']
26
29
  ]
27
30
  options.concat(super.reject { |option, _| option == '--silent' })
28
31
  end
@@ -33,11 +36,13 @@ module Pod
33
36
  @language = argv.option('language', 'objc')
34
37
  git_url = argv.option('git', 'git@github.com:volcengine/ve_Template_iOS.git')
35
38
  @silent = argv.flag?('silent', false)
39
+ @repo_no_update = argv.flag?('pod_repo_no_update',false)
36
40
  @appkey = argv.option('appkey', '')
37
41
  @bundle_id = argv.option('bundle_id', nil)
38
42
  @selected_components = argv.option('com', "").split(',')
39
43
  @config_json = argv.option('config', '/onekit-config.json')
40
- @project = VemarsProject.new(@appkey, @selected_components, @config_json, @version, @bundle_id, @name, @language, git_url)
44
+ service_url = argv.option('service_url',nil)
45
+ @project = VemarsProject.new(@appkey, @selected_components, @config_json, @version, @bundle_id, @name, @language, git_url,service_url)
41
46
  super
42
47
  @additional_args = argv.remainder!
43
48
  end
@@ -79,7 +84,12 @@ module Pod
79
84
  Dir.chdir(project_dir) do
80
85
  # system('bundle install')
81
86
  # system('bundle exec pod install --repo-update')
82
- system('pod install --repo-update')
87
+ if @repo_no_update
88
+ puts "pod install with no repo update"
89
+ system('pod install --no-repo-update')
90
+ else
91
+ system('pod install --repo-update')
92
+ end
83
93
  end
84
94
  end
85
95
 
@@ -19,8 +19,10 @@ module Pod
19
19
  options = [
20
20
  ['--path=PODFILE_PATH', 'the /path/to/Dir_contains_Podfile'],
21
21
  ['--com=COM1,COM2', 'Selected components in vemars.'],
22
- ['--silent', 'do not run pod install'],
23
- ['--config=CONFIG_PATH', 'config path of vemars.']
22
+ ['--config=CONFIG_PATH', 'config path of vemars.'],
23
+ ['--service_url=SERVICE_URL', 'url of vemars CLI service.'],
24
+ ['--git=GIT_URL', 'git url of demo repo'],
25
+ ['--pod_repo_no_update', 'do not run pod repo update']
24
26
  ]
25
27
  options.concat(super.reject { |option, _| option == '--silent' })
26
28
  end
@@ -30,10 +32,12 @@ module Pod
30
32
  @path = argv.option('path', '')
31
33
  @selected_components = argv.option('com', '').split(',')
32
34
  @config_json = argv.option('config', '/onekit-config.json')
35
+ @repo_no_update = argv.flag?('pod_repo_no_update',false)
36
+ git_url = argv.option('git', 'git@github.com:volcengine/ve_Template_iOS.git')
37
+ service_url = argv.option('service_url',nil)
38
+ @project = VemarsProject.new(@appkey, @selected_components, @config_json, @baseline, git_url, service_url)
33
39
  super
34
40
  @additional_args = argv.remainder!
35
- git_url = argv.option('git', 'git@github.com:volcengine/ve_Template_iOS.git')
36
- @project = VemarsProject.new(@appkey, @selected_components, @config_json, @baseline, git_url)
37
41
  end
38
42
 
39
43
  def validate!
@@ -65,7 +69,12 @@ module Pod
65
69
  Dir.chdir(project_dir) do
66
70
  # system('bundle install')
67
71
  # system('bundle exec pod install --repo-update')
68
- system('pod install --repo-update')
72
+ if @repo_no_update
73
+ puts "pod install with no repo update"
74
+ system('pod install --no-repo-update')
75
+ else
76
+ system('pod install --repo-update')
77
+ end
69
78
  end
70
79
  end
71
80
 
@@ -1,3 +1,3 @@
1
1
  module CocoapodsVemars
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -19,6 +19,7 @@ module Pod
19
19
  #{platform}
20
20
 
21
21
  #plugin 'cocoapods-vemars'
22
+ install! 'cocoapods', :deterministic_uuids => false
22
23
 
23
24
  source 'https://cdn.cocoapods.org/'
24
25
  #{source_template}
@@ -4,13 +4,17 @@ module Pod
4
4
  class Baselines_api
5
5
  include Concurrent::Async
6
6
 
7
- BASELINES_URL = 'http://mars-mpaas.bytedance.net/mpaas/baseline/baselines'.freeze
7
+ BASELINES_URL = 'https://poc-api.vemarsdev.com/mpaas/baseline/baselines'.freeze
8
8
  attr_accessor :result
9
9
 
10
+ public def initialize(url=BASELINES_URL)
11
+ @baseline_url = (url.blank? ? BASELINES_URL : url + "mpaas/baseline/baselines")
12
+ end
13
+
10
14
  def getBaselines
11
15
  body= "{\"technology_stack\": \"iOS\"}"
12
16
  header = {"ContentType" => 'application/json'}
13
- response = REST.post(BASELINES_URL, body, header)
17
+ response = REST.post(@baseline_url, body, header)
14
18
  if response.ok?
15
19
  json = JSON.parse(response.body)
16
20
  error_code = json["error_no"]
@@ -5,18 +5,20 @@ module Pod
5
5
  class Components_api
6
6
  include Concurrent::Async
7
7
 
8
- COMPONENTS_URL = 'http://mars-mpaas.bytedance.net/mpaas/baseline/baseline_config'.freeze
8
+ COMPONENTS_URL = 'https://poc-api.vemarsdev.com/mpaas/baseline/baseline_config'.freeze
9
9
 
10
10
  attr_reader :source
11
11
  attr_reader :baseline
12
12
  attr_reader :component_list
13
13
  attr_reader :baseline_api
14
+ attr_reader :components_url
14
15
 
15
- public def initialize(baseline=nil)
16
+ public def initialize(baseline=nil,url=COMPONENTS_URL)
16
17
  @baseline = baseline
17
18
  @source = ""
18
19
  @component_list = []
19
- @baseline_api = Baselines_api.new()
20
+ @baseline_api = Baselines_api.new(url)
21
+ @components_url = (url.blank? ? COMPONENTS_URL : url + "mpaas/baseline/baseline_config")
20
22
  end
21
23
 
22
24
  public def validate!
@@ -36,7 +38,7 @@ module Pod
36
38
  public def getComponents(baseline=@baseline)
37
39
  body= "{\"baseline_version\": \"#{baseline}\", \"technology_stack\": \"iOS\"}"
38
40
  header = {"ContentType" => 'application/json'}
39
- response = REST.post(COMPONENTS_URL, body, header)
41
+ response = REST.post(@components_url, body, header)
40
42
  deserilise(response)
41
43
  return component_list
42
44
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-vemars
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - huangbomao@bytedance.com
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-07-21 00:00:00.000000000 Z
11
+ date: 2021-08-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler