cocoapods-vemars 0.0.4 → 0.0.8

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: 6ea36ccb5da9226ceef1f978efd520bc78c6770f854b88d5429c54103bfbb935
4
- data.tar.gz: 41841a5a35ae6dfb2bc7c69afca607f4b7ce74a3fc89aaf56ba7f813d0e6fe53
3
+ metadata.gz: 30550c108fbd5a78c3700c13e93afac49018e01bdb1905c7d173b0c70c7a3b7b
4
+ data.tar.gz: d4903f6342f6a8e0b1a7b7ca632ca0595165d948137e05a84e009101b25fd03f
5
5
  SHA512:
6
- metadata.gz: 225984860fadd5d010475d77be742bfe67516e3bb7f507da032678547226a319ec50a5a464b5d9c38e83c735203b971eccc358c3c32a42b15b64843913de5500
7
- data.tar.gz: fe9cc48afdb2c702357510da6275e311a2fcd0bbc9fd10d22131afd4daa00791ac117e097f8362f35fa3fd184dda419db32b4520ad1039cd60cf679ecbb31081
6
+ metadata.gz: d8f4de048cf85455d281aead71f02a32a032709963dc793bba8aa410425fe29f866ad83c73973f3f6b32ae8558e07b2990b894a6eac62baa9c61d6daaa395f48
7
+ data.tar.gz: e1f51022de625322340b8bf1b6283c9152b61832358fb8d445458f6bf1f34ee8f1abd80dc8a70dd09f96bba4b8b41c97fc05d03f75b10cff26d94178185b1a7e
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gem 'plist', '~> 3.2'
7
7
  gem 'rexml'
8
8
  gem 'concurrent-ruby', require: 'concurrent'
9
9
  gem 'xcodeproj'
10
- gem 'json'
10
+ gem 'json_pure'
11
11
  gem 'cocoapods'
12
12
 
13
13
  group :debug do
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-vemars (0.0.4)
4
+ cocoapods-vemars (0.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -106,12 +106,10 @@ DEPENDENCIES
106
106
  cocoapods-vemars!
107
107
  concurrent-ruby
108
108
  debase (= 0.2.5.beta2)
109
- json
110
109
  plist (~> 3.2)
111
110
  rake
112
111
  rexml
113
112
  ruby-debug-ide
114
- xcodeproj
115
113
 
116
114
  BUNDLED WITH
117
- 2.2.25
115
+ 2.2.15
@@ -3,7 +3,7 @@ require_relative '../services/patcher'
3
3
  require_relative '../services/tailor'
4
4
  require_relative 'basicInfo'
5
5
  require_relative '../services/renamer'
6
- require 'json'
6
+ require 'json/pure'
7
7
  module Pod
8
8
 
9
9
  class VemarsProject
@@ -12,6 +12,7 @@ module Pod
12
12
  attr_reader :basicInfo
13
13
  attr_reader :selected_components
14
14
  attr_reader :git_url
15
+ attr_reader :service_url
15
16
 
16
17
  attr_accessor :components_details
17
18
  attr_accessor :source
@@ -20,13 +21,14 @@ module Pod
20
21
  File.join(Dir.pwd, "Project")
21
22
  end
22
23
 
23
- 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)
24
25
  @language = language
25
26
  @basicInfo = BasicInfo.new(app_key, bundle_id, name, version)
26
27
  @git_url = git_url
27
28
  @config_json = config_json
28
29
  @selected_components = components | (language == 'swift' ? %w[OneKit SwiftOneKit] : ['OneKit'])
29
30
  @components_details = []
31
+ @service_url = service_url
30
32
  end
31
33
 
32
34
  def generate
@@ -83,7 +85,7 @@ module Pod
83
85
  end
84
86
 
85
87
  def collect_components
86
- components_api = Components_api.new(@basicInfo.version)
88
+ components_api = Components_api.new(@basicInfo.version,@service_url)
87
89
  all_components = components_api.getComponents
88
90
  @source = components_api.source
89
91
  @selected_components.each do |com|
@@ -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.4"
2
+ VERSION = "0.0.8"
3
3
  end
@@ -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.4
4
+ version: 0.0.8
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-08-05 00:00:00.000000000 Z
11
+ date: 2021-08-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler