cocoapods-try 1.1.0 → 1.2.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 +5 -5
- data/.rubocop_cocoapods.yml +34 -26
- data/.rubocop_todo.yml +63 -3
- data/.travis.yml +19 -15
- data/CHANGELOG.md +14 -0
- data/Gemfile +2 -5
- data/Gemfile.lock +89 -72
- data/README.md +0 -2
- data/Rakefile +1 -3
- data/lib/cocoapods_try.rb +1 -1
- data/lib/pod/command/try.rb +13 -1
- data/spec/command/try_spec.rb +42 -20
- data/spec/spec_helper.rb +0 -11
- metadata +14 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 16ded50a120c162fb0f05b252161b7c3b2530e64701624363af892bb194f8859
|
4
|
+
data.tar.gz: 4b07109feb4c1be1efc15ed20018ae2b671ac50cc905e4ee660fc25c1be18985
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d7b3daacde6cd46974e975901dade3a96b614fa11c0081b2886e65e2f0d10662210d180fa2ee2fb3509b99fe2a1e46a6b586183819478bf2c64d567fcdbe699b
|
7
|
+
data.tar.gz: 79cfbe49b8a4bf580e2c0518ab3db233d617c859da6591b1db163b01cdcfc9018989b45236cbc87ee83d759d3e4e741823d1745aad23953e86cc93718903b85b
|
data/.rubocop_cocoapods.yml
CHANGED
@@ -9,49 +9,54 @@ AllCops:
|
|
9
9
|
|
10
10
|
# At the moment not ready to be used
|
11
11
|
# https://github.com/bbatsov/rubocop/issues/947
|
12
|
-
Documentation:
|
12
|
+
Style/Documentation:
|
13
13
|
Enabled: false
|
14
14
|
|
15
15
|
#- CocoaPods -----------------------------------------------------------------#
|
16
16
|
|
17
17
|
# We adopted raise instead of fail.
|
18
|
-
SignalException:
|
18
|
+
Style/SignalException:
|
19
19
|
EnforcedStyle: only_raise
|
20
20
|
|
21
21
|
# They are idiomatic
|
22
|
-
AssignmentInCondition:
|
22
|
+
Lint/AssignmentInCondition:
|
23
23
|
Enabled: false
|
24
24
|
|
25
25
|
# Allow backticks
|
26
|
-
AsciiComments:
|
26
|
+
Style/AsciiComments:
|
27
27
|
Enabled: false
|
28
28
|
|
29
29
|
# Indentation clarifies logic branches in implementations
|
30
|
-
IfUnlessModifier:
|
30
|
+
Style/IfUnlessModifier:
|
31
31
|
Enabled: false
|
32
32
|
|
33
33
|
# No enforced convention here.
|
34
|
-
SingleLineBlockParams:
|
34
|
+
Style/SingleLineBlockParams:
|
35
35
|
Enabled: false
|
36
36
|
|
37
37
|
# We only add the comment when needed.
|
38
|
-
Encoding:
|
38
|
+
Style/Encoding:
|
39
39
|
Enabled: false
|
40
40
|
|
41
41
|
# Having these make it easier to *not* forget to add one when adding a new
|
42
42
|
# value and you can simply copy the previous line.
|
43
|
-
|
43
|
+
Style/TrailingCommaInLiteral:
|
44
44
|
EnforcedStyleForMultiline: comma
|
45
45
|
|
46
|
-
|
46
|
+
Layout/MultilineOperationIndentation:
|
47
47
|
EnforcedStyle: indented
|
48
48
|
|
49
|
+
Style/PercentLiteralDelimiters:
|
50
|
+
PreferredDelimiters:
|
51
|
+
default: '()'
|
52
|
+
'%w': '()'
|
53
|
+
|
49
54
|
# Clashes with CLAide Command#validate!
|
50
|
-
GuardClause:
|
55
|
+
Style/GuardClause:
|
51
56
|
Enabled: false
|
52
57
|
|
53
|
-
# Not always desirable
|
54
|
-
Next:
|
58
|
+
# Not always desirable
|
59
|
+
Style/Next:
|
55
60
|
Enabled: false
|
56
61
|
|
57
62
|
# Arbitrary max lengths for classes simply do not work and enabling this will
|
@@ -83,39 +88,42 @@ Metrics/AbcSize:
|
|
83
88
|
Metrics/CyclomaticComplexity:
|
84
89
|
Enabled: false
|
85
90
|
|
86
|
-
|
87
|
-
|
88
|
-
HashSyntax:
|
91
|
+
Style/HashSyntax:
|
89
92
|
EnforcedStyle: hash_rockets
|
90
93
|
|
91
|
-
Lambda:
|
92
|
-
Enabled:
|
94
|
+
Style/Lambda:
|
95
|
+
Enabled: true
|
93
96
|
|
94
|
-
DotPosition:
|
97
|
+
Layout/DotPosition:
|
95
98
|
EnforcedStyle: trailing
|
96
99
|
|
97
|
-
EachWithObject:
|
98
|
-
Enabled:
|
100
|
+
Style/EachWithObject:
|
101
|
+
Enabled: true
|
99
102
|
|
100
|
-
|
101
|
-
Enabled:
|
103
|
+
Performance/HashEachMethods:
|
104
|
+
Enabled: true
|
102
105
|
|
103
106
|
#- CocoaPods specs -----------------------------------------------------------#
|
104
107
|
|
105
108
|
# Allow for `should.match /regexp/`.
|
106
|
-
AmbiguousRegexpLiteral:
|
109
|
+
Lint/AmbiguousRegexpLiteral:
|
107
110
|
Exclude:
|
108
111
|
- spec/**/*
|
109
112
|
|
110
113
|
# Allow `object.should == object` syntax.
|
111
|
-
Void:
|
114
|
+
Lint/Void:
|
112
115
|
Exclude:
|
113
116
|
- spec/**/*
|
114
117
|
|
115
|
-
ClassAndModuleChildren:
|
118
|
+
Style/ClassAndModuleChildren:
|
116
119
|
Exclude:
|
117
120
|
- spec/**/*
|
118
121
|
|
119
|
-
UselessComparison:
|
122
|
+
Lint/UselessComparison:
|
120
123
|
Exclude:
|
121
124
|
- spec/**/*
|
125
|
+
|
126
|
+
Metrics/BlockLength:
|
127
|
+
Exclude:
|
128
|
+
- spec/**/*
|
129
|
+
|
data/.rubocop_todo.yml
CHANGED
@@ -1,12 +1,72 @@
|
|
1
1
|
# This configuration was generated by
|
2
2
|
# `rubocop --auto-gen-config`
|
3
|
-
# on
|
3
|
+
# on 2020-04-16 22:06:47 -0700 using RuboCop version 0.50.0.
|
4
4
|
# The point is for the user to remove these configuration records
|
5
5
|
# one by one as the offenses are removed from the code base.
|
6
6
|
# Note that changes in the inspected code, or installation of new
|
7
7
|
# versions of RuboCop, may require this file to be generated again.
|
8
8
|
|
9
|
-
# Offense count:
|
10
|
-
#
|
9
|
+
# Offense count: 1
|
10
|
+
# Cop supports --auto-correct.
|
11
|
+
Layout/EmptyLineAfterMagicComment:
|
12
|
+
Exclude:
|
13
|
+
- 'cocoapods-try.gemspec'
|
14
|
+
|
15
|
+
# Offense count: 2
|
16
|
+
# Configuration parameters: ContextCreatingMethods, MethodCreatingMethods.
|
17
|
+
Lint/UselessAccessModifier:
|
18
|
+
Exclude:
|
19
|
+
- 'lib/pod/command/try.rb'
|
20
|
+
|
21
|
+
# Offense count: 37
|
22
|
+
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, IgnoredPatterns.
|
23
|
+
# URISchemes: http, https
|
11
24
|
Metrics/LineLength:
|
12
25
|
Max: 108
|
26
|
+
|
27
|
+
# Offense count: 3
|
28
|
+
# Configuration parameters: ExpectMatchingDefinition, Regex, IgnoreExecutableScripts, AllowedAcronyms.
|
29
|
+
# AllowedAcronyms: CLI, DSL, ACL, API, ASCII, CPU, CSS, DNS, EOF, GUID, HTML, HTTP, HTTPS, ID, IP, JSON, LHS, QPS, RAM, RHS, RPC, SLA, SMTP, SQL, SSH, TCP, TLS, TTL, UDP, UI, UID, UUID, URI, URL, UTF8, VM, XML, XMPP, XSRF, XSS
|
30
|
+
Naming/FileName:
|
31
|
+
Exclude:
|
32
|
+
- 'Gemfile'
|
33
|
+
- 'Rakefile'
|
34
|
+
- 'cocoapods-try.gemspec'
|
35
|
+
|
36
|
+
# Offense count: 1
|
37
|
+
# Cop supports --auto-correct.
|
38
|
+
# Configuration parameters: AutoCorrect, EnforcedStyle, SupportedStyles.
|
39
|
+
# SupportedStyles: predicate, comparison
|
40
|
+
Style/NumericPredicate:
|
41
|
+
Exclude:
|
42
|
+
- 'spec/**/*'
|
43
|
+
- 'lib/pod/command/try.rb'
|
44
|
+
|
45
|
+
# Offense count: 1
|
46
|
+
# Cop supports --auto-correct.
|
47
|
+
# Configuration parameters: PreferredDelimiters.
|
48
|
+
Style/PercentLiteralDelimiters:
|
49
|
+
Exclude:
|
50
|
+
- 'cocoapods-try.gemspec'
|
51
|
+
|
52
|
+
# Offense count: 1
|
53
|
+
# Cop supports --auto-correct.
|
54
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles.
|
55
|
+
# SupportedStyles: use_perl_names, use_english_names
|
56
|
+
Style/SpecialGlobalVars:
|
57
|
+
Exclude:
|
58
|
+
- 'cocoapods-try.gemspec'
|
59
|
+
|
60
|
+
# Offense count: 8
|
61
|
+
# Cop supports --auto-correct.
|
62
|
+
# Configuration parameters: EnforcedStyle, SupportedStyles, ConsistentQuotesInMultiline.
|
63
|
+
# SupportedStyles: single_quotes, double_quotes
|
64
|
+
Style/StringLiterals:
|
65
|
+
Exclude:
|
66
|
+
- 'cocoapods-try.gemspec'
|
67
|
+
|
68
|
+
# Offense count: 1
|
69
|
+
# Cop supports --auto-correct.
|
70
|
+
Style/UnneededPercentQ:
|
71
|
+
Exclude:
|
72
|
+
- 'cocoapods-try.gemspec'
|
data/.travis.yml
CHANGED
@@ -1,30 +1,34 @@
|
|
1
1
|
# Sets Travis to run the Ruby specs on OS X machines to be as close as possible
|
2
2
|
# to the user environment.
|
3
3
|
#
|
4
|
-
language:
|
5
|
-
|
6
|
-
|
7
|
-
repo_token: e8abdb417b7d86d7427d8861e85209c7b194820bb372a1c05f0529835eac9c7c
|
4
|
+
language: ruby
|
5
|
+
|
6
|
+
dist: trusty
|
8
7
|
|
9
8
|
branches:
|
10
9
|
only:
|
11
10
|
- master
|
12
11
|
- /.+-stable$/
|
13
12
|
|
14
|
-
|
15
|
-
|
16
|
-
|
13
|
+
matrix:
|
14
|
+
include:
|
15
|
+
- rvm: 2.4.1
|
17
16
|
|
18
|
-
|
19
|
-
-
|
20
|
-
-
|
21
|
-
-
|
22
|
-
-
|
23
|
-
- rvm use $RVM_RUBY_VERSION
|
24
|
-
- if [[ $RVM_RUBY_VERSION == 'system' ]]; then sudo gem install bundler --no-ri --no-rdoc; else gem install bundler --no-ri --no-rdoc; fi
|
17
|
+
rvm:
|
18
|
+
- 2.0.0-p647
|
19
|
+
- 2.3.4
|
20
|
+
- 2.4.1
|
21
|
+
- 2.6.2
|
25
22
|
|
23
|
+
before_install:
|
24
|
+
# There is a bug in travis. When using system ruby, bundler is not
|
25
|
+
# installed and causes the default install action to fail.
|
26
|
+
- if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem install "bundler:~> 1.17"; else gem install "bundler:~> 1.17"; fi
|
27
|
+
# RubyGems 2.0.14 isn't a fun time on 2.0.0p648
|
28
|
+
- if [ "$TRAVIS_RUBY_VERSION" = "system" ]; then sudo gem update --system; fi
|
26
29
|
|
27
30
|
install:
|
28
|
-
-
|
31
|
+
- bundle install --path .bundle
|
32
|
+
- bundle exec pod repo add-cdn trunk 'https://cdn.cocoapods.org'
|
29
33
|
|
30
34
|
script: bundle exec rake spec
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,19 @@
|
|
1
1
|
# CocoaPods::Try CHANGELOG
|
2
2
|
|
3
|
+
## 1.2.0 (2020-04-20)
|
4
|
+
|
5
|
+
##### Enhancements
|
6
|
+
|
7
|
+
* None.
|
8
|
+
|
9
|
+
##### Bug Fixes
|
10
|
+
|
11
|
+
* Fix a crash when using `pod try` with CocoaPods 1.8.0 or higher.
|
12
|
+
[@arielpollack](https://github.com/arielpollack)
|
13
|
+
[#63](https://github.com/CocoaPods/cocoapods-try/issues/63)
|
14
|
+
[#65](https://github.com/CocoaPods/cocoapods-try/pull/65)
|
15
|
+
|
16
|
+
|
3
17
|
## 1.1.0 (2016-07-10)
|
4
18
|
|
5
19
|
##### Enhancements
|
data/Gemfile
CHANGED
@@ -3,17 +3,14 @@ source 'https://rubygems.org'
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
group :development do
|
6
|
+
gem 'claide', :git => 'https://github.com/CocoaPods/CLAide.git', :branch => 'master'
|
6
7
|
gem 'cocoapods', :git => 'https://github.com/CocoaPods/CocoaPods.git', :branch => 'master'
|
7
8
|
gem 'cocoapods-core', :git => 'https://github.com/CocoaPods/Core.git', :branch => 'master'
|
8
|
-
gem 'claide', :git => 'https://github.com/CocoaPods/CLAide.git', :branch => 'master'
|
9
9
|
|
10
10
|
gem 'bacon'
|
11
11
|
gem 'mocha'
|
12
12
|
gem 'mocha-on-bacon'
|
13
13
|
gem 'prettybacon'
|
14
14
|
|
15
|
-
|
16
|
-
gem 'codeclimate-test-reporter', :require => nil
|
17
|
-
gem 'rubocop'
|
18
|
-
end
|
15
|
+
gem 'rubocop', '0.50.0'
|
19
16
|
end
|
data/Gemfile.lock
CHANGED
@@ -1,114 +1,132 @@
|
|
1
1
|
GIT
|
2
2
|
remote: https://github.com/CocoaPods/CLAide.git
|
3
|
-
revision:
|
3
|
+
revision: b5ced9cc141df732e8027078543eb92fc6447567
|
4
4
|
branch: master
|
5
5
|
specs:
|
6
|
-
claide (1.0.
|
6
|
+
claide (1.0.3)
|
7
7
|
|
8
8
|
GIT
|
9
9
|
remote: https://github.com/CocoaPods/CocoaPods.git
|
10
|
-
revision:
|
10
|
+
revision: c75c4a6dd226c45e0ad876caa926bff51a3f00d9
|
11
11
|
branch: master
|
12
12
|
specs:
|
13
|
-
cocoapods (1.
|
14
|
-
activesupport (>= 4.0.2)
|
15
|
-
claide (>= 1.0.
|
16
|
-
cocoapods-core (= 1.
|
17
|
-
cocoapods-deintegrate (>= 1.0.
|
18
|
-
cocoapods-downloader (
|
19
|
-
cocoapods-plugins (>= 1.0.0
|
20
|
-
cocoapods-search (
|
21
|
-
cocoapods-
|
22
|
-
cocoapods-
|
23
|
-
|
24
|
-
colored (~> 1.2)
|
13
|
+
cocoapods (1.9.1)
|
14
|
+
activesupport (>= 4.0.2, < 5)
|
15
|
+
claide (>= 1.0.2, < 2.0)
|
16
|
+
cocoapods-core (= 1.9.1)
|
17
|
+
cocoapods-deintegrate (>= 1.0.3, < 2.0)
|
18
|
+
cocoapods-downloader (>= 1.2.2, < 2.0)
|
19
|
+
cocoapods-plugins (>= 1.0.0, < 2.0)
|
20
|
+
cocoapods-search (>= 1.0.0, < 2.0)
|
21
|
+
cocoapods-trunk (>= 1.4.0, < 2.0)
|
22
|
+
cocoapods-try (= 1.2.0)
|
23
|
+
colored2 (~> 3.1)
|
25
24
|
escape (~> 0.0.4)
|
26
|
-
fourflusher (
|
27
|
-
|
25
|
+
fourflusher (>= 2.3.0, < 3.0)
|
26
|
+
gh_inspector (~> 1.0)
|
27
|
+
molinillo (~> 0.6.6)
|
28
28
|
nap (~> 1.0)
|
29
|
-
|
29
|
+
ruby-macho (~> 1.4)
|
30
|
+
xcodeproj (>= 1.14.0, < 2.0)
|
30
31
|
|
31
32
|
GIT
|
32
33
|
remote: https://github.com/CocoaPods/Core.git
|
33
|
-
revision:
|
34
|
+
revision: 8923c0cdca68d4bc7126cd64106a5fc1e9217ced
|
34
35
|
branch: master
|
35
36
|
specs:
|
36
|
-
cocoapods-core (1.
|
37
|
-
activesupport (>= 4.0.2)
|
37
|
+
cocoapods-core (1.9.1)
|
38
|
+
activesupport (>= 4.0.2, < 6)
|
39
|
+
addressable (~> 2.6)
|
40
|
+
algoliasearch (~> 1.0)
|
41
|
+
concurrent-ruby (~> 1.1)
|
38
42
|
fuzzy_match (~> 2.0.4)
|
39
43
|
nap (~> 1.0)
|
44
|
+
netrc (~> 0.11)
|
45
|
+
public_suffix (~> 2.0)
|
46
|
+
typhoeus (~> 1.0)
|
40
47
|
|
41
48
|
PATH
|
42
49
|
remote: .
|
43
50
|
specs:
|
44
|
-
cocoapods-try (1.
|
51
|
+
cocoapods-try (1.2.0)
|
45
52
|
|
46
53
|
GEM
|
47
54
|
remote: https://rubygems.org/
|
48
55
|
specs:
|
49
|
-
|
56
|
+
CFPropertyList (3.0.2)
|
57
|
+
activesupport (4.2.11.1)
|
50
58
|
i18n (~> 0.7)
|
51
|
-
json (~> 1.7, >= 1.7.7)
|
52
59
|
minitest (~> 5.1)
|
53
60
|
thread_safe (~> 0.3, >= 0.3.4)
|
54
61
|
tzinfo (~> 1.1)
|
55
|
-
|
56
|
-
|
57
|
-
|
62
|
+
addressable (2.7.0)
|
63
|
+
public_suffix (>= 2.0.2, < 5.0)
|
64
|
+
algoliasearch (1.27.1)
|
65
|
+
httpclient (~> 2.8, >= 2.8.3)
|
66
|
+
json (>= 1.5.1)
|
67
|
+
ast (2.4.0)
|
68
|
+
atomos (0.1.3)
|
58
69
|
bacon (1.2.0)
|
59
|
-
cocoapods-deintegrate (1.0.
|
60
|
-
cocoapods-downloader (1.
|
61
|
-
cocoapods-plugins (1.0.0
|
70
|
+
cocoapods-deintegrate (1.0.4)
|
71
|
+
cocoapods-downloader (1.3.0)
|
72
|
+
cocoapods-plugins (1.0.0)
|
62
73
|
nap
|
63
|
-
cocoapods-search (1.0.0
|
64
|
-
cocoapods-
|
65
|
-
cocoapods-trunk (1.0.0.beta.3)
|
74
|
+
cocoapods-search (1.0.0)
|
75
|
+
cocoapods-trunk (1.4.1)
|
66
76
|
nap (>= 0.8, < 2.0)
|
67
|
-
netrc (
|
68
|
-
|
69
|
-
|
70
|
-
colored (1.2)
|
71
|
-
docile (1.1.5)
|
77
|
+
netrc (~> 0.11)
|
78
|
+
colored2 (3.1.2)
|
79
|
+
concurrent-ruby (1.1.6)
|
72
80
|
escape (0.0.4)
|
73
|
-
|
81
|
+
ethon (0.12.0)
|
82
|
+
ffi (>= 1.3.0)
|
83
|
+
ffi (1.12.2)
|
84
|
+
fourflusher (2.3.1)
|
74
85
|
fuzzy_match (2.0.4)
|
75
|
-
|
76
|
-
|
77
|
-
|
86
|
+
gh_inspector (1.1.3)
|
87
|
+
httpclient (2.8.3)
|
88
|
+
i18n (0.9.5)
|
89
|
+
concurrent-ruby (~> 1.0)
|
90
|
+
json (2.3.0)
|
78
91
|
minitest (5.8.4)
|
79
|
-
mocha (1.
|
80
|
-
|
81
|
-
mocha-on-bacon (0.2.2)
|
92
|
+
mocha (1.11.2)
|
93
|
+
mocha-on-bacon (0.2.3)
|
82
94
|
mocha (>= 0.13.0)
|
83
|
-
molinillo (0.
|
95
|
+
molinillo (0.6.6)
|
96
|
+
nanaimo (0.2.6)
|
84
97
|
nap (1.1.0)
|
85
|
-
netrc (0.
|
86
|
-
|
87
|
-
|
88
|
-
|
98
|
+
netrc (0.11.0)
|
99
|
+
parallel (1.10.0)
|
100
|
+
parser (2.7.1.1)
|
101
|
+
ast (~> 2.4.0)
|
102
|
+
powerpack (0.1.2)
|
89
103
|
prettybacon (0.0.2)
|
90
104
|
bacon (~> 1.2)
|
91
|
-
|
92
|
-
|
93
|
-
|
94
|
-
|
95
|
-
|
105
|
+
public_suffix (2.0.5)
|
106
|
+
rainbow (2.2.2)
|
107
|
+
rake
|
108
|
+
rake (10.5.0)
|
109
|
+
rubocop (0.50.0)
|
110
|
+
parallel (~> 1.10)
|
111
|
+
parser (>= 2.3.3.1, < 3.0)
|
96
112
|
powerpack (~> 0.1)
|
97
|
-
rainbow (>=
|
98
|
-
ruby-progressbar (~> 1.
|
99
|
-
|
100
|
-
|
101
|
-
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
|
106
|
-
tzinfo (1.2.2)
|
113
|
+
rainbow (>= 2.2.2, < 3.0)
|
114
|
+
ruby-progressbar (~> 1.7)
|
115
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
116
|
+
ruby-macho (1.4.0)
|
117
|
+
ruby-progressbar (1.10.1)
|
118
|
+
thread_safe (0.3.6)
|
119
|
+
typhoeus (1.3.1)
|
120
|
+
ethon (>= 0.9.0)
|
121
|
+
tzinfo (1.2.7)
|
107
122
|
thread_safe (~> 0.1)
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
123
|
+
unicode-display_width (1.7.0)
|
124
|
+
xcodeproj (1.16.0)
|
125
|
+
CFPropertyList (>= 2.3.3, < 4.0)
|
126
|
+
atomos (~> 0.1.3)
|
127
|
+
claide (>= 1.0.2, < 2.0)
|
128
|
+
colored2 (~> 3.1)
|
129
|
+
nanaimo (~> 0.2.6)
|
112
130
|
|
113
131
|
PLATFORMS
|
114
132
|
ruby
|
@@ -120,12 +138,11 @@ DEPENDENCIES
|
|
120
138
|
cocoapods!
|
121
139
|
cocoapods-core!
|
122
140
|
cocoapods-try!
|
123
|
-
codeclimate-test-reporter
|
124
141
|
mocha
|
125
142
|
mocha-on-bacon
|
126
143
|
prettybacon
|
127
144
|
rake (~> 10.0)
|
128
|
-
rubocop
|
145
|
+
rubocop (= 0.50.0)
|
129
146
|
|
130
147
|
BUNDLED WITH
|
131
|
-
1.
|
148
|
+
1.17.2
|
data/README.md
CHANGED
@@ -1,8 +1,6 @@
|
|
1
1
|
# Cocoapods try
|
2
2
|
|
3
3
|
[](https://travis-ci.org/CocoaPods/cocoapods-try)
|
4
|
-
[](https://codeclimate.com/github/CocoaPods/cocoapods-try)
|
5
|
-
[](https://codeclimate.com/github/CocoaPods/cocoapods-try)
|
6
4
|
|
7
5
|
CocoaPods plugin which allows to quickly try the demo project of a Pod.
|
8
6
|
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
# Bootstrap
|
2
2
|
#-----------------------------------------------------------------------------#
|
3
3
|
|
4
|
-
task :bootstrap, :use_bundle_dir? do |
|
4
|
+
task :bootstrap, :use_bundle_dir? do |_t, args|
|
5
5
|
if system('which bundle')
|
6
6
|
if args[:use_bundle_dir?]
|
7
7
|
sh 'bundle install --path ./travis_bundle_dir'
|
@@ -18,7 +18,6 @@ task :bootstrap, :use_bundle_dir? do |t, args|
|
|
18
18
|
end
|
19
19
|
|
20
20
|
begin
|
21
|
-
|
22
21
|
require 'bundler/gem_tasks'
|
23
22
|
|
24
23
|
task :default => 'spec'
|
@@ -47,7 +46,6 @@ begin
|
|
47
46
|
require 'rubocop/rake_task'
|
48
47
|
RuboCop::RakeTask.new
|
49
48
|
end
|
50
|
-
|
51
49
|
rescue LoadError
|
52
50
|
$stderr.puts "\033[0;31m" \
|
53
51
|
'[!] Some Rake tasks haven been disabled because the environment' \
|
data/lib/cocoapods_try.rb
CHANGED
data/lib/pod/command/try.rb
CHANGED
@@ -135,7 +135,12 @@ module Pod
|
|
135
135
|
#
|
136
136
|
def install_pod(spec, sandbox)
|
137
137
|
specs = { :ios => spec, :osx => spec }
|
138
|
-
|
138
|
+
if cocoapods_version >= Pod::Version.new('1.8.0')
|
139
|
+
dummy_podfile = Podfile.new
|
140
|
+
installer = Installer::PodSourceInstaller.new(sandbox, dummy_podfile, specs, :can_cache => false)
|
141
|
+
else
|
142
|
+
installer = Installer::PodSourceInstaller.new(sandbox, specs, :can_cache => false)
|
143
|
+
end
|
139
144
|
installer.install!
|
140
145
|
sandbox.root + spec.name
|
141
146
|
end
|
@@ -153,6 +158,7 @@ module Pod
|
|
153
158
|
# @return [String] The path of the project.
|
154
159
|
#
|
155
160
|
def pick_demo_project(dir)
|
161
|
+
dir = Pathname.new(dir)
|
156
162
|
projs = projects_in_dir(dir)
|
157
163
|
if projs.count == 0
|
158
164
|
raise Informative, 'Unable to find any project in the source files' \
|
@@ -261,6 +267,12 @@ module Pod
|
|
261
267
|
end
|
262
268
|
end
|
263
269
|
|
270
|
+
# @return [Pod::Version] the version of CocoaPods currently running
|
271
|
+
#
|
272
|
+
def cocoapods_version
|
273
|
+
Pod::Version.new(Pod::VERSION)
|
274
|
+
end
|
275
|
+
|
264
276
|
#-------------------------------------------------------------------#
|
265
277
|
end
|
266
278
|
end
|
data/spec/command/try_spec.rb
CHANGED
@@ -128,66 +128,88 @@ module Pod
|
|
128
128
|
path.should == sandbox.root + 'ARAnalytics'
|
129
129
|
end
|
130
130
|
|
131
|
+
it 'installs the pod on older versions of CocoaPods' do
|
132
|
+
@sut.stubs(:cocoapods_version).returns(Pod::Version.new('1.7.0'))
|
133
|
+
spec = stub(:name => 'ARAnalytics')
|
134
|
+
sandbox_root = Pathname.new(Pod::Command::Try::TRY_TMP_DIR)
|
135
|
+
sandbox = Sandbox.new(sandbox_root)
|
136
|
+
installer = stub('Installer')
|
137
|
+
installer.stubs(:install!)
|
138
|
+
Pod::Installer::PodSourceInstaller.expects(:new).with(any_parameters) do |*args|
|
139
|
+
args.size == 3
|
140
|
+
end.returns(installer).once
|
141
|
+
@sut.install_pod(spec, sandbox)
|
142
|
+
|
143
|
+
@sut.stubs(:cocoapods_version).returns(Pod::Version.new('1.8.0'))
|
144
|
+
Pod::Installer::PodSourceInstaller.expects(:new).with(any_parameters) do |*args|
|
145
|
+
args.size == 4
|
146
|
+
end.returns(installer)
|
147
|
+
@sut.install_pod(spec, sandbox)
|
148
|
+
end
|
149
|
+
|
131
150
|
describe '#pick_demo_project' do
|
132
151
|
it 'raises if no demo project could be found' do
|
133
|
-
|
134
|
-
Dir.stubs(:glob).returns(projects)
|
152
|
+
@sut.stubs(:projects_in_dir).returns([])
|
135
153
|
should.raise Informative do
|
136
|
-
@sut.pick_demo_project(
|
154
|
+
@sut.pick_demo_project('.')
|
137
155
|
end.message.should.match(/Unable to find any project/)
|
138
156
|
end
|
139
157
|
|
140
158
|
it 'picks a demo project' do
|
141
159
|
projects = ['Demo.xcodeproj']
|
142
160
|
Dir.stubs(:glob).returns(projects)
|
143
|
-
path = @sut.pick_demo_project(
|
161
|
+
path = @sut.pick_demo_project('.')
|
144
162
|
path.should == 'Demo.xcodeproj'
|
145
163
|
end
|
146
164
|
|
147
165
|
it 'is not case sensitive' do
|
148
166
|
projects = ['demo.xcodeproj']
|
149
167
|
Dir.stubs(:glob).returns(projects)
|
150
|
-
path = @sut.pick_demo_project(
|
168
|
+
path = @sut.pick_demo_project('.')
|
151
169
|
path.should == 'demo.xcodeproj'
|
152
170
|
end
|
153
171
|
|
154
172
|
it 'considers also projects named example' do
|
155
173
|
projects = ['Example.xcodeproj']
|
156
174
|
Dir.stubs(:glob).returns(projects)
|
157
|
-
path = @sut.pick_demo_project(
|
175
|
+
path = @sut.pick_demo_project('.')
|
158
176
|
path.should == 'Example.xcodeproj'
|
159
177
|
end
|
160
178
|
|
161
179
|
it 'returns the project if only one is found' do
|
162
|
-
projects = ['Lib.xcodeproj']
|
163
|
-
|
164
|
-
path = @sut.pick_demo_project(
|
165
|
-
path.should == 'Lib.xcodeproj'
|
180
|
+
projects = [Pathname.new('Lib.xcodeproj')]
|
181
|
+
@sut.stubs(:projects_in_dir).returns(projects)
|
182
|
+
path = @sut.pick_demo_project('.')
|
183
|
+
path.to_s.should == 'Lib.xcodeproj'
|
166
184
|
end
|
167
185
|
|
168
186
|
it 'asks the user which project would like to open if not a single suitable one is found' do
|
169
187
|
projects = ['Lib_1.xcodeproj', 'Lib_2.xcodeproj']
|
170
|
-
|
188
|
+
@sut.stubs(:projects_in_dir).returns(projects)
|
171
189
|
UI.stubs(:choose_from_array).returns(0)
|
172
|
-
path = @sut.pick_demo_project(
|
173
|
-
path.should == 'Lib_1.xcodeproj'
|
190
|
+
path = @sut.pick_demo_project('.')
|
191
|
+
path.to_s.should == 'Lib_1.xcodeproj'
|
192
|
+
|
193
|
+
UI.stubs(:choose_from_array).returns(1)
|
194
|
+
path = @sut.pick_demo_project('.')
|
195
|
+
path.to_s.should == 'Lib_2.xcodeproj'
|
174
196
|
end
|
175
197
|
|
176
198
|
it 'should prefer demo or example workspaces' do
|
177
|
-
|
178
|
-
path = @sut.pick_demo_project(
|
199
|
+
@sut.stubs(:projects_in_dir).returns(['Project Demo.xcodeproj', 'Project Demo.xcworkspace'])
|
200
|
+
path = @sut.pick_demo_project('.')
|
179
201
|
path.should == 'Project Demo.xcworkspace'
|
180
202
|
end
|
181
203
|
|
182
204
|
it 'should not show workspaces inside a project' do
|
183
205
|
Dir.stubs(:glob).returns(['Project Demo.xcodeproj', 'Project Demo.xcodeproj/project.xcworkspace'])
|
184
|
-
path = @sut.pick_demo_project(
|
206
|
+
path = @sut.pick_demo_project('.')
|
185
207
|
path.should == 'Project Demo.xcodeproj'
|
186
208
|
end
|
187
209
|
|
188
210
|
it 'should prefer workspaces over projects with the same name' do
|
189
|
-
|
190
|
-
path = @sut.pick_demo_project(
|
211
|
+
@sut.stubs(:projects_in_dir).returns(['Project Demo.xcodeproj', 'Project Demo.xcworkspace'])
|
212
|
+
path = @sut.pick_demo_project('.')
|
191
213
|
path.should == 'Project Demo.xcworkspace'
|
192
214
|
end
|
193
215
|
end
|
@@ -204,7 +226,7 @@ module Pod
|
|
204
226
|
Pathname.any_instance.stubs(:exist?).returns(true)
|
205
227
|
proj = XCODE_PROJECT
|
206
228
|
@sut.expects(:perform_cocoapods_installation)
|
207
|
-
Podfile.stubs(:from_file).returns(stub(:workspace_path => XCODE_WORKSPACE))
|
229
|
+
Podfile.stubs(:from_file).returns(stub('Workspace', :workspace_path => XCODE_WORKSPACE))
|
208
230
|
path = @sut.install_podfile(proj)
|
209
231
|
path.to_s.should == XCODE_WORKSPACE.to_s
|
210
232
|
end
|
@@ -212,7 +234,7 @@ module Pod
|
|
212
234
|
it 'returns the default workspace if one is not set' do
|
213
235
|
Pathname.any_instance.stubs(:exist?).returns(true)
|
214
236
|
proj = XCODE_PROJECT
|
215
|
-
Podfile.stubs(:from_file).returns(stub(:workspace_path => nil))
|
237
|
+
Podfile.stubs(:from_file).returns(stub('Workspace', :workspace_path => nil))
|
216
238
|
@sut.expects(:perform_cocoapods_installation).once
|
217
239
|
path = @sut.install_podfile(proj)
|
218
240
|
path.to_s.should == XCODE_WORKSPACE.to_s
|
data/spec/spec_helper.rb
CHANGED
@@ -1,15 +1,4 @@
|
|
1
1
|
|
2
|
-
# Set up coverage analysis
|
3
|
-
#-----------------------------------------------------------------------------#
|
4
|
-
|
5
|
-
if RUBY_VERSION >= '1.9.3'
|
6
|
-
require 'codeclimate-test-reporter'
|
7
|
-
CodeClimate::TestReporter.configure do |config|
|
8
|
-
config.logger.level = Logger::WARN
|
9
|
-
end
|
10
|
-
CodeClimate::TestReporter.start
|
11
|
-
end
|
12
|
-
|
13
2
|
# Set up
|
14
3
|
#-----------------------------------------------------------------------------#
|
15
4
|
|
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cocoapods-try
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fabio Pelosin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-04-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '1.3'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - ~>
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.3'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '10.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '10.0'
|
41
41
|
description:
|
@@ -44,11 +44,11 @@ executables: []
|
|
44
44
|
extensions: []
|
45
45
|
extra_rdoc_files: []
|
46
46
|
files:
|
47
|
-
- .gitignore
|
48
|
-
- .rubocop.yml
|
49
|
-
- .rubocop_cocoapods.yml
|
50
|
-
- .rubocop_todo.yml
|
51
|
-
- .travis.yml
|
47
|
+
- ".gitignore"
|
48
|
+
- ".rubocop.yml"
|
49
|
+
- ".rubocop_cocoapods.yml"
|
50
|
+
- ".rubocop_todo.yml"
|
51
|
+
- ".travis.yml"
|
52
52
|
- CHANGELOG.md
|
53
53
|
- Gemfile
|
54
54
|
- Gemfile.lock
|
@@ -73,17 +73,16 @@ require_paths:
|
|
73
73
|
- lib
|
74
74
|
required_ruby_version: !ruby/object:Gem::Requirement
|
75
75
|
requirements:
|
76
|
-
- -
|
76
|
+
- - ">="
|
77
77
|
- !ruby/object:Gem::Version
|
78
78
|
version: '0'
|
79
79
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - ">="
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
requirements: []
|
85
|
-
|
86
|
-
rubygems_version: 2.6.5
|
85
|
+
rubygems_version: 3.1.2
|
87
86
|
signing_key:
|
88
87
|
specification_version: 4
|
89
88
|
summary: CocoaPods plugin which allows to quickly try the demo project of a Pod.
|