Class: OrmDev::RunHelper

Inherits:
Object
  • Object
show all
Defined in:
lib/ormdev/source/core/run_helper.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(path) ⇒ RunHelper

Returns a new instance of RunHelper.



10
11
12
# File 'lib/ormdev/source/core/run_helper.rb', line 10

def initialize(path)
  @spec = Pod::Specification.from_file(path)
end

Instance Attribute Details

#specObject (readonly)

Returns the value of attribute spec.



8
9
10
# File 'lib/ormdev/source/core/run_helper.rb', line 8

def spec
  @spec
end

Instance Method Details

#setupObject



14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
# File 'lib/ormdev/source/core/run_helper.rb', line 14

def setup()
  task_start_time = Time.now
  time_info_logs = ["开始运行:#{task_start_time}"]
  start_time = task_start_time

  # check_environment
  # current_time = Time.new
  # time_info_logs << "检查运行环境:#{current_time - start_time}秒"
  # start_time = current_time
  #
  # pod_package_framwork
  # current_time = Time.new
  # time_info_logs << "打包静态库:#{current_time - start_time}秒"
  # start_time = current_time

  upload_zip_framwork
  current_time = Time.new
  time_info_logs << "上传静态framework:#{current_time - start_time}秒"

  time_info_logs << "#{@spec.name}总耗时:#{Time.new - task_start_time}秒"
  puts time_info_logs
end