cocoapods-stats 1.0.0.beta.2 → 1.0.0.beta.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: f83f2c32f2b11b9f98a6b33d73b1447d9c96826d
4
- data.tar.gz: 79ba9a9b409484c8af70056b3b0b185c75bde286
3
+ metadata.gz: e9ddf8b9591fb258c991c29b51905f3c2464c914
4
+ data.tar.gz: 0a4a17dc4b4b90b1e0182706ae70c8157ab1dc19
5
5
  SHA512:
6
- metadata.gz: e1ce9b9bf7efadf1c30a6fcd685d7f9cec66235d5e894eafe3d526a7d35bd9f372e2ad50b27116793a42ec15ec191886c39536a5287a76f4e9be377f4784f4e1
7
- data.tar.gz: 809721de765a386814dd70829445e93a60f889910b3ec73d739a9ea007d90189b378ba6e162d2670a261bbcaf76e8e18f60c7c8878fa91d37c0fca065dd4399c
6
+ metadata.gz: 09ae1d7747773271cc65ac1a11235869c7a7dd522796c5bac9d653f3aa4062e9d870e36ce73a05906cbe724bc12a76044e80652c5e0953751d77b53d05b53528
7
+ data.tar.gz: 060d875ebb6a0a8e8803c541f70fbf217f3d593501ca3abb3f9bf7d337fde76645fbcaf793af7199f2d130dbe863194aebbc50ae1b4bcdcc4bb57533466d6e05
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # CocoaPods Stats CHANGELOG
2
2
 
3
+ ## 1.0.0.beta.3 (2016-01-16)
4
+
5
+ ##### Bug Fixes
6
+
7
+ * Introduce a compatibility shim for CocoaPods 0.39.
8
+ [Samuel Giddins](https://github.com/segiddins)
9
+ [CocoaPods#4741](https://github.com/CocoaPods/CocoaPods/issues/4741)
10
+
11
+
3
12
  ## 1.0.0.beta.2 (2016-01-05)
4
13
 
5
14
  ##### Enhancements
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- cocoapods-stats (1.0.0.beta.2)
4
+ cocoapods-stats (1.0.0.beta.3)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -17,24 +17,24 @@ GEM
17
17
  parser (>= 2.2.0.pre.3, < 3.0)
18
18
  bacon (1.2.0)
19
19
  claide (1.0.0.beta.1)
20
- cocoapods (1.0.0.beta.1)
20
+ cocoapods (1.0.0.beta.2)
21
21
  activesupport (>= 4.0.2)
22
22
  claide (>= 1.0.0.beta.1, < 2.0)
23
- cocoapods-core (= 1.0.0.beta.1)
23
+ cocoapods-core (= 1.0.0.beta.2)
24
24
  cocoapods-deintegrate (>= 1.0.0.beta.1, < 2.0)
25
25
  cocoapods-downloader (>= 1.0.0.beta.1, < 2.0)
26
26
  cocoapods-plugins (>= 1.0.0.beta.1, < 2.0)
27
27
  cocoapods-search (>= 1.0.0.beta.1, < 2.0)
28
- cocoapods-stats (>= 1.0.0.beta.1, < 2.0)
28
+ cocoapods-stats (>= 1.0.0.beta.2, < 2.0)
29
29
  cocoapods-trunk (>= 1.0.0.beta.1, < 2.0)
30
- cocoapods-try (>= 1.0.0.beta.1, < 2.0)
30
+ cocoapods-try (>= 1.0.0.beta.2, < 2.0)
31
31
  colored (~> 1.2)
32
32
  escape (~> 0.0.4)
33
33
  fourflusher (~> 0.3.0)
34
34
  molinillo (~> 0.4.1)
35
35
  nap (~> 1.0)
36
36
  xcodeproj (>= 1.0.0.beta.1, < 2.0)
37
- cocoapods-core (1.0.0.beta.1)
37
+ cocoapods-core (1.0.0.beta.2)
38
38
  activesupport (>= 4.0.2)
39
39
  fuzzy_match (~> 2.0.4)
40
40
  nap (~> 1.0)
@@ -46,7 +46,7 @@ GEM
46
46
  cocoapods-trunk (1.0.0.beta.1)
47
47
  nap (>= 0.8, < 2.0)
48
48
  netrc (= 0.7.8)
49
- cocoapods-try (1.0.0.beta.1)
49
+ cocoapods-try (1.0.0.beta.2)
50
50
  colored (1.2)
51
51
  escape (0.0.4)
52
52
  fourflusher (0.3.0)
@@ -1,3 +1,3 @@
1
1
  module CocoapodsStats
2
- VERSION = '1.0.0.beta.2'.freeze
2
+ VERSION = '1.0.0.beta.3'.freeze
3
3
  end
@@ -17,7 +17,7 @@ module CocoaPodsStats
17
17
  map { |spec| { :name => spec.name, :version => spec.version.to_s } }
18
18
 
19
19
  # This will be an empty array for `integrate_targets: false` Podfiles
20
- target.user_targets.map do |user_target|
20
+ user_targets(target).map do |user_target|
21
21
  # Send in a digested'd UUID anyway, a second layer
22
22
  # of misdirection can't hurt
23
23
  {
@@ -29,5 +29,16 @@ module CocoaPodsStats
29
29
  end
30
30
  end
31
31
  end
32
+
33
+ private
34
+
35
+ # @todo remove this once everyone has migrated to CocoaPods 1.0, see
36
+ # https://github.com/CocoaPods/CocoaPods/issues/4741
37
+ def user_targets(target)
38
+ return target.user_targets if target.respond_to?(:user_targets)
39
+ project = Xcodeproj::Project.open(target.user_project_path) if target.user_project_path
40
+ return [] unless project
41
+ target.user_target_uuids.map { |uuid| project.objects_by_uuid[uuid] }.compact
42
+ end
32
43
  end
33
44
  end
@@ -4,65 +4,56 @@ require 'cocoapods_stats/target_mapper'
4
4
  describe CocoaPodsStats::TargetMapper do
5
5
  describe 'pods_from_project' do
6
6
  before do
7
- @user_target = mock('PBXNativeTarget')
8
- @user_target.stubs(:product_type).returns('testing')
9
- @user_target.stubs(:platform_name).returns('test platform')
7
+ @user_project = Xcodeproj::Project.new('App.xcodeproj')
8
+ @user_target = @user_project.new_target(:application, 'App', :ios)
10
9
  @user_target.stubs(:uuid).returns('111222333')
10
+
11
+ @spec = Pod::Specification.new do |spec|
12
+ spec.name = 'ORStackView'
13
+ spec.version = '1.1.1'
14
+ end
15
+
16
+ @sandbox = stub('Sandbox',
17
+ :root => Pathname('Pods/'),
18
+ :project => Pod::Project.new('Pods/Pods.xcodeproj'))
19
+ aggregate_target = stub('AggregateTarget',
20
+ :specs => [@spec],
21
+ :platform => Pod::Platform.new('test platform', '9.3'),
22
+ :user_targets => [@user_target],
23
+ :user_project => @user_project,
24
+ :label => 'Pods-App')
25
+ @context = Pod::Installer::PostInstallHooksContext.generate(@sandbox, [aggregate_target])
11
26
  end
12
27
 
13
28
  it 'returns expected data' do
14
29
  master_pods = Set.new(['ORStackView'])
15
30
 
16
- spec = Pod::Specification.new
17
- spec.name = 'ORStackView'
18
- spec.version = '1.1.1'
19
-
20
- target = mock('AggregateTarget')
21
- target.stubs(:specs).returns([spec])
22
- target.stubs(:user_targets).returns([@user_target])
23
- target.stubs(:user_project).returns(mock('Project'))
24
-
25
- context = mock('Context')
26
- context.stubs(:umbrella_targets).returns([target])
27
-
28
31
  mapper = CocoaPodsStats::TargetMapper.new
29
- pods = mapper.pods_from_project(context, master_pods)
32
+ pods = mapper.pods_from_project(@context, master_pods)
30
33
 
31
34
  pods.should == [
32
35
  {
33
36
  :uuid => 'da5511d2baa83c2e753852f1f2fba11003ed0c46c96820c7589b243a8ddb787a',
34
- :type => 'testing',
37
+ :type => 'com.apple.product-type.application',
35
38
  :pods => [
36
39
  { :name => 'ORStackView', :version => '1.1.1' },
37
40
  ],
38
- :platform => 'test platform',
41
+ :platform => :ios,
39
42
  }]
40
43
  end
41
44
 
42
45
  it 'returns no pods if it cannot find them in the master_pods set' do
43
46
  master_pods = Set.new([''])
44
47
 
45
- spec = Pod::Specification.new
46
- spec.name = 'ORStackView'
47
- spec.version = '1.1.1'
48
-
49
- target = mock('AggregateTarget')
50
- target.stubs(:specs).returns([spec])
51
- target.stubs(:user_targets).returns([@user_target])
52
- target.stubs(:user_project).returns(mock('Project'))
53
-
54
- context = mock('Context')
55
- context.stubs(:umbrella_targets).returns([target])
56
-
57
48
  mapper = CocoaPodsStats::TargetMapper.new
58
- pods = mapper.pods_from_project(context, master_pods)
49
+ pods = mapper.pods_from_project(@context, master_pods)
59
50
 
60
51
  pods.should == [
61
52
  {
62
53
  :uuid => 'da5511d2baa83c2e753852f1f2fba11003ed0c46c96820c7589b243a8ddb787a',
63
- :type => 'testing',
54
+ :type => 'com.apple.product-type.application',
64
55
  :pods => [],
65
- :platform => 'test platform',
56
+ :platform => :ios,
66
57
  },
67
58
  ]
68
59
  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: 1.0.0.beta.2
4
+ version: 1.0.0.beta.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-01-05 00:00:00.000000000 Z
12
+ date: 2016-01-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.3'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: '10.0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: '10.0'
42
42
  description: Uploads statistics for Pod Analytics.
@@ -47,10 +47,10 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - .gitignore
51
- - .rubocop.yml
52
- - .rubocop_cocoapods.yml
53
- - .travis.yml
50
+ - ".gitignore"
51
+ - ".rubocop.yml"
52
+ - ".rubocop_cocoapods.yml"
53
+ - ".travis.yml"
54
54
  - CHANGELOG.md
55
55
  - Gemfile
56
56
  - Gemfile.lock
@@ -78,12 +78,12 @@ require_paths:
78
78
  - lib
79
79
  required_ruby_version: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  required_rubygems_version: !ruby/object:Gem::Requirement
85
85
  requirements:
86
- - - '>'
86
+ - - ">"
87
87
  - !ruby/object:Gem::Version
88
88
  version: 1.3.1
89
89
  requirements: []