cocoapods 1.0.0.beta.8 → 1.0.0.rc.1

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: 750770f51d11c8442124a3c068f6711f1adf6fb8
4
- data.tar.gz: 5052424563a03f5e35ea76cdea8c6b758e755d46
3
+ metadata.gz: 985b3c38667faafd2578c63001e98ea612344ff4
4
+ data.tar.gz: a52ebd6d0998d1853f568ec367136ee6bc83714b
5
5
  SHA512:
6
- metadata.gz: 9013646662d97e5f5757064dd08f3efd08317d528f1751a330d5290e1f5a4ee7dc422583beb79926dd3e12b9f7b0e3cf7615d522bb34cef1a2c695093a341bab
7
- data.tar.gz: 40daf7fb664920be399bb7a78c16c9e73daa147fd9cbaa5d3e3c4a01269ad86d78c966ab98aa3733d8d8fa9bd5531e0b5d73007d311607cb7cb82acca9878980
6
+ metadata.gz: 157feee6689c96fda7dcc79a7a8bc3670799056f74a0d977574c9d5913eff920f503a23967f324a2fc08b8323e5fa3213ae587bdd7ebea984838a592a3650c95
7
+ data.tar.gz: 6827ef208e36db5ce03620020bed595f18474df44f627665511825452622faf8d31e6897743fc2364e007fe048470ad6c65ef4ad600e52dff9924d682c2f2611
@@ -4,6 +4,32 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
4
4
 
5
5
  To install release candidates run `[sudo] gem install cocoapods --pre`
6
6
 
7
+ ## 1.0.0.rc.1 (2016-04-30)
8
+
9
+ ##### Enhancements
10
+
11
+ * The `pod init` command now uses target inheritance for test targets
12
+ in the generated Podfile.
13
+ [Orta Therox](https://github.com/orta)
14
+ [#4714](https://github.com/CocoaPods/CocoaPods/issue/4714)
15
+
16
+ * Support customized build directories by letting user xcconfig definitions
17
+ rely on the new overridable alias build variable `PODS_BUILD_DIR`.
18
+ [Marius Rackwitz(https://github.com/mrackwitz]
19
+ [#5217](https://github.com/CocoaPods/CocoaPods/issue/5217)
20
+
21
+ ##### Bug Fixes
22
+
23
+ * Fix for `pod repo push --help` throwing an error.
24
+ [Boris Bügling](https://github.com/neonichu)
25
+ [#5214](https://github.com/CocoaPods/CocoaPods/pull/5214)
26
+
27
+ * The warning for not having utf-8 set as the default encoding for a
28
+ terminal now properly respects the `--no-ansi` argument.
29
+ [Joshua Kalpin](https://github.com/Kapin)
30
+ [#5199](https://github.com/CocoaPods/CocoaPods/pull/5199)
31
+
32
+
7
33
  ## 1.0.0.beta.8 (2016-04-15)
8
34
 
9
35
  ##### Enhancements
data/README.md CHANGED
@@ -76,4 +76,5 @@ CocoaPods is composed of the following projects:
76
76
  | [![Build Status](http://img.shields.io/travis/CocoaPods/Xcodeproj/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Xcodeproj) | [Xcodeproj](https://github.com/CocoaPods/Xcodeproj) | Create and modify Xcode projects from Ruby. | [docs](http://docs.cocoapods.org/xcodeproj/index.html)
77
77
  | [![Build Status](http://img.shields.io/travis/CocoaPods/CLAide/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CLAide) | [CLAide](https://github.com/CocoaPods/CLAide) | A small command-line interface framework. | [docs](http://docs.cocoapods.org/claide/index.html)
78
78
  | [![Build Status](http://img.shields.io/travis/CocoaPods/Molinillo/master.svg?style=flat)](https://travis-ci.org/CocoaPods/Molinillo) | [Molinillo](https://github.com/CocoaPods/Molinillo) | A powerful generic dependency resolver. | [docs](http://www.rubydoc.info/gems/molinillo)
79
+ | [![Build Status](http://img.shields.io/travis/CocoaPods/CocoaPods-app/master.svg?style=flat)](https://travis-ci.org/CocoaPods/CocoaPods-app) | [CocoaPods.app](https://github.com/CocoaPods/CocoaPods-app) | A full-featured and standalone installation of CocoaPods. | [info](https://cocoapods.org/app)
79
80
  | | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guide](http://docs.cocoapods.org/guides/contributing_to_the_master_repo.html)
data/bin/pod CHANGED
@@ -1,13 +1,24 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  if Encoding.default_external != Encoding::UTF_8
4
- STDERR.puts <<-DOC
5
- \e[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
6
- Consider adding the following to ~/.profile:
7
4
 
8
- export LANG=en_US.UTF-8
9
- \e[0m
10
- DOC
5
+ if ARGV.include? '--no-ansi'
6
+ STDERR.puts <<-DOC
7
+ WARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
8
+ Consider adding the following to ~/.profile:
9
+
10
+ export LANG=en_US.UTF-8
11
+ DOC
12
+ else
13
+ STDERR.puts <<-DOC
14
+ \e[33mWARNING: CocoaPods requires your terminal to be using UTF-8 encoding.
15
+ Consider adding the following to ~/.profile:
16
+
17
+ export LANG=en_US.UTF-8
18
+ \e[0m
19
+ DOC
20
+ end
21
+
11
22
  end
12
23
 
13
24
  if $PROGRAM_NAME == __FILE__ && !ENV['COCOAPODS_NO_BUNDLER']
@@ -58,37 +58,69 @@ module Pod
58
58
  podfile << <<-PLATFORM.strip_heredoc
59
59
  # Uncomment this line to define a global platform for your project
60
60
  # platform :ios, '9.0'
61
- # Uncomment this line if you're using Swift
62
- # use_frameworks!
63
61
  PLATFORM
64
62
 
65
- project.native_targets.each do |target|
66
- podfile << target_module(target)
63
+ # Split out the targets into app and test targets
64
+ test_targets, app_targets = project.native_targets.
65
+ sort_by { |t| t.name.downcase }.
66
+ partition { |t| t.name =~ /test/i }
67
+
68
+ app_targets.each do |app_target|
69
+ test_targets_for_app = test_targets.select do |target|
70
+ target.name.downcase.start_with?(app_target.name.downcase)
71
+ end
72
+ podfile << target_module(app_target, test_targets_for_app)
67
73
  end
68
- podfile << "\n"
74
+
75
+ podfile
69
76
  end
70
77
 
71
- # @param [Xcodeproj::PBXTarget] target
72
- # A target to generate a Podfile target module for.
78
+ # @param [[Xcodeproj::PBXTarget]] targets
79
+ # An array which always has a target as it's first item
80
+ # and may optionally contain related test targets
73
81
  #
74
82
  # @return [String] the text for the target module
75
83
  #
76
- def target_module(target)
77
- target_module = "\ntarget '#{target.name.gsub(/'/, "\\\\\'")}' do\n"
84
+ def target_module(app, tests)
85
+ target_module = "\ntarget '#{app.name.gsub(/'/, "\\\\\'")}' do\n"
78
86
 
79
- if target.name =~ /tests?/i
80
- target_module << template_contents(config.default_test_podfile_path)
81
- else
82
- target_module << template_contents(config.default_podfile_path)
87
+ target_module << if app.resolved_build_setting('SWIFT_OPTIMIZATION_LEVEL').values.any?
88
+ <<-RUBY
89
+ # Comment this line if you're not using Swift and don't want to use dynamic frameworks
90
+ use_frameworks!
91
+
92
+ RUBY
93
+ else
94
+ <<-RUBY
95
+ # Uncomment this line if you're using Swift or would like to use dynamic frameworks
96
+ # use_frameworks!
97
+
98
+ RUBY
99
+ end
100
+
101
+ target_module << template_contents(config.default_podfile_path, ' ', "Pods for #{app.name}\n")
102
+
103
+ tests.each do |test|
104
+ target_module << "\n target '#{test.name.gsub(/'/, "\\\\\'")}' do\n"
105
+ target_module << " inherit! :search_paths\n"
106
+ target_module << template_contents(config.default_test_podfile_path, ' ', 'Pods for testing')
107
+ target_module << "\n end\n"
83
108
  end
109
+
84
110
  target_module << "\nend\n"
85
111
  end
86
112
 
87
- def template_contents(path)
113
+ # @param [[Xcodeproj::PBXTarget]] targets
114
+ # An array which always has a target as it's first item
115
+ # and may optionally contain a second target as its test target
116
+ #
117
+ # @return [String] the text for the target module
118
+ #
119
+ def template_contents(path, prefix, fallback)
88
120
  if path.exist?
89
- path.read.chomp.lines.map { |line| " #{line}" }.join("\n")
121
+ path.read.chomp.lines.map { |line| "#{prefix}#{line}" }.join("\n")
90
122
  else
91
- ''
123
+ "#{prefix}# #{fallback}"
92
124
  end
93
125
  end
94
126
  end
@@ -13,7 +13,7 @@ module Pod
13
13
 
14
14
  # Run the command
15
15
  #
16
- # @todo the command report new dependencies added to the Podfile as
16
+ # @todo the command reports new dependencies added to the Podfile as
17
17
  # updates.
18
18
  #
19
19
  # @todo fix.
@@ -38,7 +38,7 @@ module Pod
38
38
  @allow_warnings = argv.flag?('allow-warnings')
39
39
  @local_only = argv.flag?('local-only')
40
40
  @repo = argv.shift_argument
41
- @source = config.sources_manager.sources([@repo]).first
41
+ @source = config.sources_manager.sources([@repo]).first unless @repo.nil?
42
42
  @source_urls = argv.option('sources', config.sources_manager.all.map(&:url).join(',')).split(',')
43
43
  @podspec = argv.shift_argument
44
44
  @use_frameworks = !argv.flag?('use-libraries')
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the CocoaPods command line tool.
3
3
  #
4
- VERSION = '1.0.0.beta.8'.freeze unless defined? Pod::VERSION
4
+ VERSION = '1.0.0.rc.1'.freeze unless defined? Pod::VERSION
5
5
  end
@@ -4,12 +4,21 @@ module Pod
4
4
  # Stores the shared logic of the classes of the XCConfig module.
5
5
  #
6
6
  module XCConfigHelper
7
- # @return [String] Defined to hold the default Xcode build path, so
8
- # that when this is overridden per {PodTarget}, it is still
9
- # possible to reference other build products relative to the
10
- # original path.
7
+ # @return [String] Used as alias for BUILD_DIR, so that when this
8
+ # is overridden in the user target, the user can override
9
+ # this variable to point to the standard directory, which
10
+ # will be used by CocoaPods.
11
11
  #
12
- SHARED_BUILD_DIR_VARIABLE = 'PODS_SHARED_BUILD_DIR'.freeze
12
+ BUILD_DIR_VARIABLE = '$PODS_BUILD_DIR'.freeze
13
+
14
+ # @return [String] Used as alias for CONFIGURATION_BUILD_DIR, so that
15
+ # when this is overridden per {PodTarget}, it is still possible
16
+ # to reference other build products relative to the original
17
+ # path. Furthermore if it was overridden in the user target,
18
+ # the user can override this variable to point to the standard
19
+ # directory, which will be used by CocoaPods.
20
+ #
21
+ CONFIGURATION_BUILD_DIR_VARIABLE = '$PODS_CONFIGURATION_BUILD_DIR'.freeze
13
22
 
14
23
  # Converts an array of strings to a single string where the each string
15
24
  # is surrounded by double quotes and separated by a space. Used to
@@ -232,25 +241,27 @@ module Pod
232
241
  #
233
242
  def self.settings_for_dependent_targets(target, dependent_targets)
234
243
  dependent_targets = dependent_targets.select(&:should_build?)
235
- has_configuration_build_dir = target.respond_to?(:configuration_build_dir)
236
- if has_configuration_build_dir
237
- build_dir_var = "$#{SHARED_BUILD_DIR_VARIABLE}"
238
- build_settings = {
239
- 'CONFIGURATION_BUILD_DIR' => target.configuration_build_dir(build_dir_var),
240
- SHARED_BUILD_DIR_VARIABLE => '$(BUILD_DIR)/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)',
241
- }
242
- else
243
- build_dir_var = '$CONFIGURATION_BUILD_DIR'
244
- build_settings = {}
244
+
245
+ # Alias build dirs to avoid recursive definitions for pod targets and depending
246
+ # on build settings which could be overwritten in the user target.
247
+ build_settings = {
248
+ BUILD_DIR_VARIABLE[1..-1] => '$BUILD_DIR',
249
+ CONFIGURATION_BUILD_DIR_VARIABLE[1..-1] => "#{BUILD_DIR_VARIABLE}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)",
250
+ }
251
+
252
+ # Scope pod targets
253
+ if target.respond_to?(:configuration_build_dir)
254
+ build_settings['CONFIGURATION_BUILD_DIR'] = target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)
245
255
  end
256
+
246
257
  unless dependent_targets.empty?
247
258
  framework_search_paths = []
248
259
  library_search_paths = []
249
260
  dependent_targets.each do |dependent_target|
250
261
  if dependent_target.requires_frameworks?
251
- framework_search_paths << dependent_target.configuration_build_dir(build_dir_var)
262
+ framework_search_paths << dependent_target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)
252
263
  else
253
- library_search_paths << dependent_target.configuration_build_dir(build_dir_var)
264
+ library_search_paths << dependent_target.configuration_build_dir(CONFIGURATION_BUILD_DIR_VARIABLE)
254
265
  end
255
266
  end
256
267
  build_settings['FRAMEWORK_SEARCH_PATHS'] = XCConfigHelper.quote(framework_search_paths.uniq)
@@ -240,7 +240,7 @@ module Pod
240
240
  #
241
241
  # @return [String] The absolute path to the configuration build dir
242
242
  #
243
- def configuration_build_dir(dir = '$CONFIGURATION_BUILD_DIR')
243
+ def configuration_build_dir(dir = Generator::XCConfig::XCConfigHelper::CONFIGURATION_BUILD_DIR_VARIABLE)
244
244
  "#{dir}/#{label}"
245
245
  end
246
246
 
@@ -249,7 +249,7 @@ module Pod
249
249
  #
250
250
  # @return [String] The absolute path to the build product
251
251
  #
252
- def build_product_path(dir = '$CONFIGURATION_BUILD_DIR')
252
+ def build_product_path(dir = Generator::XCConfig::XCConfigHelper::CONFIGURATION_BUILD_DIR_VARIABLE)
253
253
  "#{configuration_build_dir(dir)}/#{product_name}"
254
254
  end
255
255
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta.8
4
+ version: 1.0.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2016-04-15 00:00:00.000000000 Z
14
+ date: 2016-04-29 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: cocoapods-core
@@ -19,172 +19,154 @@ dependencies:
19
19
  requirements:
20
20
  - - '='
21
21
  - !ruby/object:Gem::Version
22
- version: 1.0.0.beta.8
22
+ version: 1.0.0.rc.1
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - '='
28
28
  - !ruby/object:Gem::Version
29
- version: 1.0.0.beta.8
29
+ version: 1.0.0.rc.1
30
30
  - !ruby/object:Gem::Dependency
31
31
  name: claide
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  requirements:
34
- - - '>='
35
- - !ruby/object:Gem::Version
36
- version: 1.0.0.beta.3
37
- - - <
34
+ - - '='
38
35
  - !ruby/object:Gem::Version
39
- version: '2.0'
36
+ version: 1.0.0.rc.1
40
37
  type: :runtime
41
38
  prerelease: false
42
39
  version_requirements: !ruby/object:Gem::Requirement
43
40
  requirements:
44
- - - '>='
45
- - !ruby/object:Gem::Version
46
- version: 1.0.0.beta.3
47
- - - <
41
+ - - '='
48
42
  - !ruby/object:Gem::Version
49
- version: '2.0'
43
+ version: 1.0.0.rc.1
50
44
  - !ruby/object:Gem::Dependency
51
45
  name: cocoapods-deintegrate
52
46
  requirement: !ruby/object:Gem::Requirement
53
47
  requirements:
54
- - - '>='
55
- - !ruby/object:Gem::Version
56
- version: 1.0.0.beta.1
57
- - - <
48
+ - - '='
58
49
  - !ruby/object:Gem::Version
59
- version: '2.0'
50
+ version: 1.0.0.rc.1
60
51
  type: :runtime
61
52
  prerelease: false
62
53
  version_requirements: !ruby/object:Gem::Requirement
63
54
  requirements:
64
- - - '>='
65
- - !ruby/object:Gem::Version
66
- version: 1.0.0.beta.1
67
- - - <
55
+ - - '='
68
56
  - !ruby/object:Gem::Version
69
- version: '2.0'
57
+ version: 1.0.0.rc.1
70
58
  - !ruby/object:Gem::Dependency
71
59
  name: cocoapods-downloader
72
60
  requirement: !ruby/object:Gem::Requirement
73
61
  requirements:
74
62
  - - '='
75
63
  - !ruby/object:Gem::Version
76
- version: 1.0.0.beta.3
64
+ version: 1.0.0.rc.1
77
65
  type: :runtime
78
66
  prerelease: false
79
67
  version_requirements: !ruby/object:Gem::Requirement
80
68
  requirements:
81
69
  - - '='
82
70
  - !ruby/object:Gem::Version
83
- version: 1.0.0.beta.3
71
+ version: 1.0.0.rc.1
84
72
  - !ruby/object:Gem::Dependency
85
73
  name: cocoapods-plugins
86
74
  requirement: !ruby/object:Gem::Requirement
87
75
  requirements:
88
- - - '>='
89
- - !ruby/object:Gem::Version
90
- version: 1.0.0.beta.1
91
- - - <
76
+ - - '='
92
77
  - !ruby/object:Gem::Version
93
- version: '2.0'
78
+ version: 1.0.0.rc.1
94
79
  type: :runtime
95
80
  prerelease: false
96
81
  version_requirements: !ruby/object:Gem::Requirement
97
82
  requirements:
98
- - - '>='
99
- - !ruby/object:Gem::Version
100
- version: 1.0.0.beta.1
101
- - - <
83
+ - - '='
102
84
  - !ruby/object:Gem::Version
103
- version: '2.0'
85
+ version: 1.0.0.rc.1
104
86
  - !ruby/object:Gem::Dependency
105
87
  name: cocoapods-search
106
88
  requirement: !ruby/object:Gem::Requirement
107
89
  requirements:
108
90
  - - '='
109
91
  - !ruby/object:Gem::Version
110
- version: 1.0.0.beta.2
92
+ version: 1.0.0.rc.1
111
93
  type: :runtime
112
94
  prerelease: false
113
95
  version_requirements: !ruby/object:Gem::Requirement
114
96
  requirements:
115
97
  - - '='
116
98
  - !ruby/object:Gem::Version
117
- version: 1.0.0.beta.2
99
+ version: 1.0.0.rc.1
118
100
  - !ruby/object:Gem::Dependency
119
101
  name: cocoapods-stats
120
102
  requirement: !ruby/object:Gem::Requirement
121
103
  requirements:
122
104
  - - '='
123
105
  - !ruby/object:Gem::Version
124
- version: 1.0.0.beta.4
106
+ version: 1.0.0.rc.1
125
107
  type: :runtime
126
108
  prerelease: false
127
109
  version_requirements: !ruby/object:Gem::Requirement
128
110
  requirements:
129
111
  - - '='
130
112
  - !ruby/object:Gem::Version
131
- version: 1.0.0.beta.4
113
+ version: 1.0.0.rc.1
132
114
  - !ruby/object:Gem::Dependency
133
115
  name: cocoapods-trunk
134
116
  requirement: !ruby/object:Gem::Requirement
135
117
  requirements:
136
118
  - - '='
137
119
  - !ruby/object:Gem::Version
138
- version: 1.0.0.beta.4
120
+ version: 1.0.0.rc.1
139
121
  type: :runtime
140
122
  prerelease: false
141
123
  version_requirements: !ruby/object:Gem::Requirement
142
124
  requirements:
143
125
  - - '='
144
126
  - !ruby/object:Gem::Version
145
- version: 1.0.0.beta.4
127
+ version: 1.0.0.rc.1
146
128
  - !ruby/object:Gem::Dependency
147
129
  name: cocoapods-try
148
130
  requirement: !ruby/object:Gem::Requirement
149
131
  requirements:
150
132
  - - '='
151
133
  - !ruby/object:Gem::Version
152
- version: 1.0.0.beta.4
134
+ version: 1.0.0.rc.1
153
135
  type: :runtime
154
136
  prerelease: false
155
137
  version_requirements: !ruby/object:Gem::Requirement
156
138
  requirements:
157
139
  - - '='
158
140
  - !ruby/object:Gem::Version
159
- version: 1.0.0.beta.4
141
+ version: 1.0.0.rc.1
160
142
  - !ruby/object:Gem::Dependency
161
143
  name: molinillo
162
144
  requirement: !ruby/object:Gem::Requirement
163
145
  requirements:
164
146
  - - ~>
165
147
  - !ruby/object:Gem::Version
166
- version: 0.4.4
148
+ version: 0.4.5
167
149
  type: :runtime
168
150
  prerelease: false
169
151
  version_requirements: !ruby/object:Gem::Requirement
170
152
  requirements:
171
153
  - - ~>
172
154
  - !ruby/object:Gem::Version
173
- version: 0.4.4
155
+ version: 0.4.5
174
156
  - !ruby/object:Gem::Dependency
175
157
  name: xcodeproj
176
158
  requirement: !ruby/object:Gem::Requirement
177
159
  requirements:
178
160
  - - '='
179
161
  - !ruby/object:Gem::Version
180
- version: 1.0.0.beta.4
162
+ version: 1.0.0.rc.1
181
163
  type: :runtime
182
164
  prerelease: false
183
165
  version_requirements: !ruby/object:Gem::Requirement
184
166
  requirements:
185
167
  - - '='
186
168
  - !ruby/object:Gem::Version
187
- version: 1.0.0.beta.4
169
+ version: 1.0.0.rc.1
188
170
  - !ruby/object:Gem::Dependency
189
171
  name: activesupport
190
172
  requirement: !ruby/object:Gem::Requirement