cocoapods-time-analyze 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 90448f904d5dc96cee02eb05cf9b7c1edb0eac67
4
- data.tar.gz: 87420f3dcebff8c293eaa0b7c81ddecf2c8d27be
3
+ metadata.gz: dc05ca8a3125b73796ca1333f0b5378b8d5cca26
4
+ data.tar.gz: 2cc1eaea1778bf0d5a75bfae4e07615eb723083b
5
5
  SHA512:
6
- metadata.gz: c4ebb8f479d2f71b6bb394d73c538c5c70b52bf8045f21c8efe760832094c0e116bc3ce5e85634b3aa1d1b84c119b9bee9ffa79c1606a071985e43cbba902dc1
7
- data.tar.gz: 6c1b95350ffac524371afce41a0006c55b65799c27c47a790c539efb6f6eb7a0c9294d854a6a1986036b337ba717930f3c43a4912722bff712de3c166b937af0
6
+ metadata.gz: 00cc70c4a98c3bf295013fbc52e6c40a400dec7527ccf2367e6fe1f42978258e79530162c55283cce94c0ed69c230301509875afc954c26ad65baf1f7d617535
7
+ data.tar.gz: 249999b5914e5d34b102a98648b07dc5c44c5e0a3cd70045d4e30209f1c47933e592c25ee6681405ac585760c15a4d7cb614ed5d6bc35c520f58465d2df58358
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-time-analyze (0.0.1)
4
+ cocoapods-time-analyze (0.0.2)
5
5
 
6
6
  GEM
7
7
  remote: https://gems.ruby-china.com/
data/README.md CHANGED
@@ -39,14 +39,17 @@ module TimeAnalyzeConfig
39
39
  %w[prepare resolve_dependencies generate_pods_project]
40
40
  end
41
41
  # do anything you want to do after pod install, for example, you can send the result to a server
42
- # @param total_time [Float] pod install totoal time, in second
42
+ # this method will be executed in the directory the `pod install` command called.
43
+ # @param total_time [Float] pod install total time, in second
43
44
  # @param detail [Hash] analyze result in hash format, the key is the step name, value is the duration in second.
44
- def self.after_all(total_time, detail)
45
+ # @param installer [Pod::Installer] instance of Pod::Installer of this install process
46
+ def self.after_all(total_time, detail, installer)
45
47
  # something awesome
46
48
  end
47
49
  end
48
50
  end
49
51
  ```
52
+
50
53
  ### Build time analyze
51
54
 
52
55
  Open Xcode, add this script to the post build action of scheme you want to analyze:
@@ -69,7 +72,9 @@ module TimeAnalyzeConfig
69
72
  true
70
73
  end
71
74
  # do anything you want to do after build, for example, you can send the result to a server
72
- # @param total_time [Float] build totoal time, in second
75
+ # this method will be executed under Xcode derived data directory, and you can use ENV to
76
+ # fetch environment variables of xcode build
77
+ # @param total_time [Float] build total time, in second
73
78
  # @param detail [Hash] analyze result in hash format
74
79
  # @option opts [Integer] :binary_size The size of the binary in final .app product
75
80
  # @option opts [Integer] :other_size The size of things except binary size in final .app product
@@ -1,3 +1,3 @@
1
1
  module CocoapodsTimeAnalyze
2
- VERSION = '0.0.2'.freeze
2
+ VERSION = '0.0.3'.freeze
3
3
  end
@@ -14,7 +14,7 @@ module Pod
14
14
  origin_install!
15
15
  total_time = Time.now - install_start_time
16
16
 
17
- TimeAnalyzeConfig::PodInstall.after_all(total_time, @time_log)
17
+ TimeAnalyzeConfig::PodInstall.after_all(total_time, @time_log, self)
18
18
  write_summary_file(total_time) if TimeAnalyzeConfig::PodInstall.enable_local_summary
19
19
  end
20
20
 
@@ -12,9 +12,11 @@ module TimeAnalyzeConfig
12
12
  end
13
13
 
14
14
  # do anything you want to do after pod install, for example, you can send the result to a server
15
- # @param total_time [Float] pod install totoal time, in second
15
+ # this method will be executed in the directory the `pod install` command called.
16
+ # @param total_time [Float] pod install total time, in second
16
17
  # @param detail [Hash] analyze result in hash format, the key is the step name, value is the duration in second.
17
- def self.after_all(total_time, detail)
18
+ # @param installer [Pod::Installer] instance of Pod::Installer of this install process
19
+ def self.after_all(total_time, detail, installer)
18
20
  # something awesome
19
21
  end
20
22
  end
@@ -27,7 +29,9 @@ module TimeAnalyzeConfig
27
29
  end
28
30
 
29
31
  # do anything you want to do after build, for example, you can send the result to a server
30
- # @param total_time [Float] build totoal time, in second
32
+ # this method will be executed under Xcode derived data directory, and you can use ENV to
33
+ # fetch environment variables of xcode build
34
+ # @param total_time [Float] build total time, in second
31
35
  # @param detail [Hash] analyze result in hash format
32
36
  # @option opts [Integer] :binary_size The size of the binary in final .app product
33
37
  # @option opts [Integer] :other_size The size of things except binary size in final .app product
@@ -39,7 +39,8 @@ describe 'InstallHook' do
39
39
  it 'call the after_all hook in config file' do
40
40
  expect(TimeAnalyzeConfig::PodInstall).to have_received(:after_all).with(
41
41
  be_within(0.05).of(expected_total_time),
42
- a_approximate_hash_of(expected_detail)
42
+ a_approximate_hash_of(expected_detail),
43
+ an_instance_of(Pod::Installer)
43
44
  )
44
45
  end
45
46
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-time-analyze
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Forelax