cocoapods-stats 0.5.3 → 0.6.0
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 +4 -4
- data/.rubocop.yml +4 -0
- data/.travis.yml +4 -0
- data/CHANGELOG.md +15 -4
- data/Gemfile.lock +2 -3
- data/cocoapods-stats.gemspec +0 -2
- data/lib/cocoapods_plugin.rb +2 -1
- data/lib/cocoapods_stats/gem_version.rb +1 -1
- data/lib/cocoapods_stats/sender.rb +17 -10
- metadata +13 -27
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 24bcdcf2ea427d3d5a77ac169243df6c79c8b059
|
4
|
+
data.tar.gz: 61ab9a5c68464a814bf1f4bf7851a41ec7e66b03
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 05015d6c80db9ca3552b231e764d3ef5cbb7fd97537e663e956b790b59f58437ecd0a5e8b5975a0dbe3d8ce1793f4dcb35389593eb0c122a3ad6d279d925d801
|
7
|
+
data.tar.gz: dce2d9dde246b227b3d72be0a5ec20944b234d873e97332872382afc4289a2e6fcb29537c41167fb9bcb5ea9fe52d285f2e1c3b611b566e5508b29fb44304671
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
#CocoaPods Stats CHANGELOG
|
2
2
|
|
3
|
-
## 0.
|
3
|
+
## 0.6.0 (2015-08-26)
|
4
|
+
|
5
|
+
##### Enhancements
|
6
|
+
|
7
|
+
* Send stats to the API asynchronously and out of process.
|
8
|
+
[Samuel Giddins](https://github.com/segiddins)
|
9
|
+
|
10
|
+
* Set maximum timeout of 30 seconds for asynchronous stats sending.
|
11
|
+
[Boris Bügling](https://github.com/neonichu)
|
12
|
+
|
13
|
+
|
14
|
+
## 0.5.3 (2015-07-02)
|
4
15
|
|
5
16
|
##### Bug Fixes
|
6
17
|
|
@@ -8,14 +19,14 @@
|
|
8
19
|
[Samuel Giddins](https://github.com/segiddins)
|
9
20
|
|
10
21
|
|
11
|
-
## 0.5.2
|
22
|
+
## 0.5.2 (2015-07-01)
|
12
23
|
|
13
24
|
##### Bug Fixes
|
14
25
|
|
15
26
|
* Don't raise an exception when attempting to opt out.
|
16
27
|
[Samuel Giddins](https://github.com/segiddins)
|
17
28
|
|
18
|
-
## 0.5.1
|
29
|
+
## 0.5.1 (2015-07-01)
|
19
30
|
|
20
31
|
##### Bug Fixes
|
21
32
|
|
@@ -23,7 +34,7 @@
|
|
23
34
|
[Samuel Giddins](https://github.com/CocoaPods/cocoapods-stats/pull/15)
|
24
35
|
|
25
36
|
|
26
|
-
## 0.5.0
|
37
|
+
## 0.5.0 (2015-06-24)
|
27
38
|
|
28
39
|
* Initial implementation of stats uploading.
|
29
40
|
[Orta](https://github.com/orta)
|
data/Gemfile.lock
CHANGED
data/cocoapods-stats.gemspec
CHANGED
@@ -19,8 +19,6 @@ Gem::Specification.new do |spec|
|
|
19
19
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
20
20
|
spec.require_paths = ['lib']
|
21
21
|
|
22
|
-
spec.add_runtime_dependency 'nap', '~> 0.8'
|
23
|
-
|
24
22
|
spec.add_development_dependency 'bundler', '~> 1.3'
|
25
23
|
spec.add_development_dependency 'rake', '~> 10.0'
|
26
24
|
end
|
data/lib/cocoapods_plugin.rb
CHANGED
@@ -36,7 +36,8 @@ module CocoaPodsStats
|
|
36
36
|
end
|
37
37
|
|
38
38
|
is_pod_try = defined?(Pod::Command::Try::TRY_TMP_DIR) &&
|
39
|
-
|
39
|
+
Pod::Command::Try::TRY_TMP_DIR.exist? &&
|
40
|
+
context.sandbox_root.start_with?(Pod::Command::Try::TRY_TMP_DIR.realpath.to_s)
|
40
41
|
|
41
42
|
# Send the analytics stuff up
|
42
43
|
Sender.new.send(targets, :pod_try => is_pod_try)
|
@@ -5,18 +5,25 @@ module CocoaPodsStats
|
|
5
5
|
API_URL = 'https://stats.cocoapods.org/api/v1/install'
|
6
6
|
|
7
7
|
def send(targets, pod_try: false)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
}.to_json,
|
8
|
+
body = {
|
9
|
+
:targets => targets,
|
10
|
+
:cocoapods_version => Pod::VERSION,
|
11
|
+
:pod_try => pod_try,
|
12
|
+
}
|
13
|
+
headers = {
|
15
14
|
'Accept' => 'application/json',
|
16
15
|
'Content-Type' => 'application/json',
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
}
|
17
|
+
curl(API_URL, body, headers)
|
18
|
+
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def curl(url, json, headers)
|
23
|
+
headers = headers.map { |k, v| ['-H', "#{k}: #{v}"] }.flatten
|
24
|
+
command = ['curl', *headers, '-X', 'POST', '-d', json.to_json, '-m', '30', url]
|
25
|
+
dev_null = '/dev/null'
|
26
|
+
Process.spawn(*command, :out => dev_null, :err => dev_null)
|
20
27
|
end
|
21
28
|
end
|
22
29
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-stats
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Orta Therox
|
@@ -9,48 +9,34 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-
|
12
|
+
date: 2015-08-26 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: nap
|
16
|
-
requirement: !ruby/object:Gem::Requirement
|
17
|
-
requirements:
|
18
|
-
- - "~>"
|
19
|
-
- !ruby/object:Gem::Version
|
20
|
-
version: '0.8'
|
21
|
-
type: :runtime
|
22
|
-
prerelease: false
|
23
|
-
version_requirements: !ruby/object:Gem::Requirement
|
24
|
-
requirements:
|
25
|
-
- - "~>"
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
version: '0.8'
|
28
14
|
- !ruby/object:Gem::Dependency
|
29
15
|
name: bundler
|
30
16
|
requirement: !ruby/object:Gem::Requirement
|
31
17
|
requirements:
|
32
|
-
- -
|
18
|
+
- - ~>
|
33
19
|
- !ruby/object:Gem::Version
|
34
20
|
version: '1.3'
|
35
21
|
type: :development
|
36
22
|
prerelease: false
|
37
23
|
version_requirements: !ruby/object:Gem::Requirement
|
38
24
|
requirements:
|
39
|
-
- -
|
25
|
+
- - ~>
|
40
26
|
- !ruby/object:Gem::Version
|
41
27
|
version: '1.3'
|
42
28
|
- !ruby/object:Gem::Dependency
|
43
29
|
name: rake
|
44
30
|
requirement: !ruby/object:Gem::Requirement
|
45
31
|
requirements:
|
46
|
-
- -
|
32
|
+
- - ~>
|
47
33
|
- !ruby/object:Gem::Version
|
48
34
|
version: '10.0'
|
49
35
|
type: :development
|
50
36
|
prerelease: false
|
51
37
|
version_requirements: !ruby/object:Gem::Requirement
|
52
38
|
requirements:
|
53
|
-
- -
|
39
|
+
- - ~>
|
54
40
|
- !ruby/object:Gem::Version
|
55
41
|
version: '10.0'
|
56
42
|
description: Uploads statistics for Pod Analytics.
|
@@ -61,10 +47,10 @@ executables: []
|
|
61
47
|
extensions: []
|
62
48
|
extra_rdoc_files: []
|
63
49
|
files:
|
64
|
-
-
|
65
|
-
-
|
66
|
-
-
|
67
|
-
-
|
50
|
+
- .gitignore
|
51
|
+
- .rubocop.yml
|
52
|
+
- .rubocop_cocoapods.yml
|
53
|
+
- .travis.yml
|
68
54
|
- CHANGELOG.md
|
69
55
|
- Gemfile
|
70
56
|
- Gemfile.lock
|
@@ -92,17 +78,17 @@ require_paths:
|
|
92
78
|
- lib
|
93
79
|
required_ruby_version: !ruby/object:Gem::Requirement
|
94
80
|
requirements:
|
95
|
-
- -
|
81
|
+
- - '>='
|
96
82
|
- !ruby/object:Gem::Version
|
97
83
|
version: '0'
|
98
84
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
99
85
|
requirements:
|
100
|
-
- -
|
86
|
+
- - '>='
|
101
87
|
- !ruby/object:Gem::Version
|
102
88
|
version: '0'
|
103
89
|
requirements: []
|
104
90
|
rubyforge_project:
|
105
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.4.8
|
106
92
|
signing_key:
|
107
93
|
specification_version: 4
|
108
94
|
summary: Uploads installation version data to stats.cocoapods.org to provide per-Pod
|