cocoapods 0.17.2 → 0.18.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c25c65ce92bbe864c71397e829e4d3937bc688ba
4
- data.tar.gz: 3d0be603cb93b99462a6b4dae722faadf80f01c4
3
+ metadata.gz: 5b1df58baee810ede899c2654dc4839739eb371c
4
+ data.tar.gz: b2d143a8e33bf73b380fe0666080379f05d3bbb0
5
5
  SHA512:
6
- metadata.gz: 83945b68a115773fd383b35aa13040c20f7ee077b6465f3ae0408f7a8f2f31d0adc4509b3f6fe76f476b9aa147a8d9bd6c46ce3d957b037a4172e5b2bf4d84c2
7
- data.tar.gz: da9910b5c607f58106c75a579ac3250b52bbeef09879c823785ad35305976e7568cfb07a568b97305f37d903603d9c62d71eac5c7f73ba7df55676c879939c6d
6
+ metadata.gz: f3f16d90e3a16e73916c0effbdbb0bd9eaa71bbcb50e6494394050b09d4857551400d16e5eb74bb9635018cca27656e4e29d7643d5a68f20f27b5584b4d2073b
7
+ data.tar.gz: 0954a3a480bad61c2fb5abeee3d95d55f723f65d58aca68d52ad42159e6868be9bbc1b1e3552cc3fc0109eb6d2ca033ca56c0374697bb7f69cc0ba54d239d3ac
data/CHANGELOG.md CHANGED
@@ -1,3 +1,48 @@
1
+ ## 0.18.0 (unreleased)
2
+ [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.2...0.17.3)
3
+ • [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.2...0.17.3)
4
+ • [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.5.2...0.5.4)
5
+
6
+ ###### Enhancements
7
+
8
+ * Added the ability to inhibit warnings per pod.
9
+ Just pass `:inhibit_warnings => true` inline.
10
+ This feature has been implemented by Marin Usalj (@mneorr).
11
+ [#10](https://github.com/CocoaPods/Core/pull/10)
12
+ [#934](https://github.com/CocoaPods/CocoaPods/pull/934)
13
+ * Inhibiting warnings will also suppress the warnings of the static analyzer.
14
+ * A new build phase has been added to check that your
15
+ installation is in sync with the `Podfile.lock` and fail the build otherwise.
16
+ The new build phase will not be added automatically to targets already
17
+ integrated with CocoaPods, for integrating targets manually see [this
18
+ comment](https://github.com/CocoaPods/CocoaPods/pull/946#issuecomment-16042419).
19
+ This feature has been implemented by Ullrich Schäfer (@stigi).
20
+ [#946](https://github.com/CocoaPods/CocoaPods/pull/946)
21
+ * The `pod search` commands now accepts the `--ios` and the `--osx` arguments
22
+ to filter the results by platform.
23
+ [#625](https://github.com/CocoaPods/CocoaPods/issues/625)
24
+ * The developer frameworks are automatically added if `SenTestingKit` is
25
+ detected. There is no need to specify them in specifications anymore.
26
+ [#771](https://github.com/CocoaPods/CocoaPods/issues/771)
27
+ * The `--no-update` argument of the `install`, `update`, `outdated` subcommands
28
+ has been renamed to `--no-repo-update`.
29
+ [#913](https://github.com/CocoaPods/CocoaPods/issues/913)
30
+
31
+ ###### Bug fixes
32
+
33
+ * Improved handling for Xcode projects containing non ASCII characters.
34
+ Special thanks to Cédric Luthi (@0xced), Vincent Isambart (@vincentisambart),
35
+ and Manfred Stienstra (@Manfred) for helping to develop the workaround.
36
+ [#926](https://github.com/CocoaPods/CocoaPods/issues/926)
37
+ * Corrected improper configuration of the PODS_ROOT xcconfig variable in
38
+ non-integrating installations.
39
+ [#918](https://github.com/CocoaPods/CocoaPods/issues/918)
40
+ * Improved support for pre-release versions using dashes.
41
+ [#935](https://github.com/CocoaPods/CocoaPods/issues/935)
42
+ * Documentation sets are now namespaced by pod solving improper attribution.
43
+ [#659](https://github.com/CocoaPods/CocoaPods/issues/659)
44
+
45
+
1
46
  ## 0.17.2
2
47
  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.1...0.17.2)
3
48
  • [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.1...0.17.2)
@@ -9,11 +9,11 @@ module Pod
9
9
  DESC
10
10
 
11
11
  def self.options
12
- [["--no-update", "Skip running `pod repo update` before install"]].concat(super)
12
+ [["--no-repo-update", "Skip running `pod repo update` before install"]].concat(super)
13
13
  end
14
14
 
15
15
  def initialize(argv)
16
- config.skip_repo_update = argv.flag?('update', config.skip_repo_update)
16
+ config.skip_repo_update = argv.flag?('repo-update', config.skip_repo_update)
17
17
  super
18
18
  end
19
19
 
@@ -8,10 +8,10 @@ module Pod
8
8
  module Options
9
9
  def options
10
10
  [
11
- ["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"],
12
- ["--no-doc", "Skip documentation generation with appledoc"],
13
- ["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"],
14
- ["--no-update", "Skip running `pod repo update` before install"],
11
+ ["--no-clean", "Leave SCM dirs like `.git' and `.svn' intact after downloading"],
12
+ ["--no-doc", "Skip documentation generation with appledoc"],
13
+ ["--no-integrate", "Skip integration of the Pods libraries in the Xcode project(s)"],
14
+ ["--no-repo-update", "Skip running `pod repo update` before install"],
15
15
  ].concat(super)
16
16
  end
17
17
  end
@@ -24,7 +24,7 @@ module Pod
24
24
  config.clean = argv.flag?('clean', config.clean)
25
25
  config.generate_docs = argv.flag?('doc', config.generate_docs)
26
26
  config.integrate_targets = argv.flag?('integrate', config.integrate_targets)
27
- config.skip_repo_update = !argv.flag?('update', !config.skip_repo_update)
27
+ config.skip_repo_update = !argv.flag?('repo-update', !config.skip_repo_update)
28
28
  super
29
29
  end
30
30
 
@@ -14,13 +14,17 @@ module Pod
14
14
  def self.options
15
15
  [[
16
16
  "--full", "Search by name, summary, and description",
17
- "--stats", "Show additional stats (like GitHub watchers and forks)"
17
+ "--stats", "Show additional stats (like GitHub watchers and forks)",
18
+ "--ios", "Restricts the search to Pods supported on iOS",
19
+ "--osx", "Restricts the search to Pods supported on OS X",
18
20
  ]].concat(super)
19
21
  end
20
22
 
21
23
  def initialize(argv)
22
24
  @full_text_search = argv.flag?('full')
23
25
  @stats = argv.flag?('stats')
26
+ @supported_on_ios = argv.flag?('ios')
27
+ @supported_on_osx = argv.flag?('osx')
24
28
  @query = argv.shift_argument
25
29
  super
26
30
  end
@@ -32,10 +36,16 @@ module Pod
32
36
 
33
37
  def run
34
38
  sets = SourcesManager.search_by_name(@query.strip, @full_text_search)
39
+ if @supported_on_ios
40
+ sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:ios) }
41
+ end
42
+ if @supported_on_osx
43
+ sets.reject!{ |set| !set.specification.available_platforms.map(&:name).include?(:osx) }
44
+ end
35
45
  sets.each do |set|
36
46
  begin
37
47
  UI.pod(set, (@stats ? :stats : :normal))
38
- rescue DSLError => e
48
+ rescue DSLError
39
49
  UI.warn "Skipping `#{set.name}` because the podspec contains errors."
40
50
  end
41
51
  end
@@ -2,6 +2,6 @@ module Pod
2
2
 
3
3
  # The version of the cocoapods command line tool.
4
4
  #
5
- VERSION = '0.17.2' unless defined? Pod::VERSION
5
+ VERSION = '0.18.0' unless defined? Pod::VERSION
6
6
  end
7
7
 
@@ -54,8 +54,7 @@ module Pod
54
54
  #
55
55
  def generate(install_docset)
56
56
  if `which appledoc`.strip.empty?
57
- UI.warn "[!] Skipping documentation generation because appledoc can't be found.",
58
- actions = [], verbose_only = true
57
+ UI.warn "[!] Skipping documentation generation because appledoc can't be found.", [], true
59
58
  return
60
59
  end
61
60
 
@@ -106,10 +105,10 @@ module Pod
106
105
  specification.summary || specification.description || 'Generated by CocoaPods.'
107
106
  end
108
107
 
109
- # @return [String] The id of the docset.
108
+ # @return [String] The id of the docset, uniq for every Pod.
110
109
  #
111
110
  def docs_id
112
- 'org.cocoapods'
111
+ "org.cocoapods.#{specification.name.downcase}"
113
112
  end
114
113
 
115
114
  #-----------------------------------------------------------------------#
@@ -61,10 +61,7 @@ module Pod
61
61
  })
62
62
 
63
63
  spec_consumers.each do |consumer|
64
- @xcconfig.merge!(consumer.xcconfig);
65
- @xcconfig.libraries.merge(consumer.libraries);
66
- @xcconfig.frameworks.merge(consumer.frameworks);
67
- @xcconfig.weak_frameworks.merge(consumer.weak_frameworks);
64
+ add_spec_build_settings_to_xcconfig(consumer, @xcconfig)
68
65
  end
69
66
 
70
67
  @xcconfig
@@ -124,6 +121,63 @@ module Pod
124
121
  def quote(strings)
125
122
  strings.sort.map { |s| %W|"#{s}"| }.join(" ")
126
123
  end
124
+
125
+ # Configures the given Xcconfig according to the build settings of the
126
+ # given Specification.
127
+ #
128
+ # @param [Specification::Consumer] consumer
129
+ # The consumer of the specification.
130
+ #
131
+ # @param [Xcodeproj::Config] xcconfig
132
+ # The xcconfig to edit.
133
+ #
134
+ # @return [void]
135
+ #
136
+ def add_spec_build_settings_to_xcconfig(consumer, xcconfig)
137
+ xcconfig.merge!(consumer.xcconfig)
138
+ xcconfig.libraries.merge(consumer.libraries)
139
+ xcconfig.frameworks.merge(consumer.frameworks)
140
+ xcconfig.weak_frameworks.merge(consumer.weak_frameworks)
141
+ add_developers_frameworks_if_needed(consumer, xcconfig)
142
+ end
143
+
144
+ # @return [Array<String>] The search paths for the developer frameworks.
145
+ #
146
+ # @todo Inheritance should be properly handled in Xcconfigs.
147
+ #
148
+ DEVELOPER_FRAMEWORKS_SEARCH_PATHS = [
149
+ '"$(inherited)"',
150
+ '"$(SDKROOT)/Developer/Library/Frameworks"',
151
+ '"$(DEVELOPER_LIBRARY_DIR)/Frameworks"'
152
+ ]
153
+
154
+ # Adds the search paths of the developer frameworks to the specification
155
+ # if needed. This is done because the `SenTestingKit` requires them and
156
+ # adding them to each specification which requires it is repetitive and
157
+ # error prone.
158
+ #
159
+ # @param [Specification::Consumer] consumer
160
+ # The consumer of the specification.
161
+ #
162
+ # @param [Xcodeproj::Config] xcconfig
163
+ # The xcconfig to edit.
164
+ #
165
+ # @return [void]
166
+ #
167
+ def add_developers_frameworks_if_needed(consumer, xcconfig)
168
+ if xcconfig.frameworks.include?('SenTestingKit')
169
+ search_paths = xcconfig.attributes['FRAMEWORK_SEARCH_PATHS'] ||= ''
170
+ DEVELOPER_FRAMEWORKS_SEARCH_PATHS.each do |search_path|
171
+ unless search_paths.include?(search_path)
172
+ search_paths << ' ' unless search_paths.empty?
173
+ search_paths << search_path
174
+ end
175
+ end
176
+ end
177
+ end
178
+
179
+ #-----------------------------------------------------------------------#
180
+
127
181
  end
128
182
  end
129
183
  end
@@ -179,18 +179,19 @@ module Pod
179
179
  user_project = Xcodeproj::Project.new(project_path)
180
180
  targets = compute_user_project_targets(target_definition, user_project)
181
181
 
182
- lib.user_project_path = project_path
183
- lib.user_target_uuids = targets.map(&:uuid)
182
+ lib.user_project_path = project_path
183
+ lib.client_root = project_path.dirname
184
+ lib.user_target_uuids = targets.map(&:uuid)
184
185
  lib.user_build_configurations = compute_user_build_configurations(target_definition, targets)
185
- lib.platform = compute_platform_for_target_definition(target_definition, targets)
186
+ lib.platform = compute_platform_for_target_definition(target_definition, targets)
186
187
  else
187
188
  unless target_definition.platform
188
189
  raise Informative, "It is necessary to specify the platform in the Podfile if not integrating."
189
190
  end
190
- lib.user_project_path = config.installation_root
191
- lib.user_target_uuids = []
191
+ lib.client_root = config.installation_root
192
+ lib.user_target_uuids = []
192
193
  lib.user_build_configurations = {}
193
- lib.platform = target_definition.platform
194
+ lib.platform = target_definition.platform
194
195
  end
195
196
  libraries << lib
196
197
  end
@@ -72,9 +72,6 @@ module Pod
72
72
  if library.platform.requires_legacy_ios_archs?
73
73
  settings['ARCHS'] = "armv6 armv7"
74
74
  end
75
- if target_definition.inhibit_all_warnings?
76
- settings['GCC_WARN_INHIBIT_ALL_WARNINGS'] = 'YES'
77
- end
78
75
 
79
76
  @target.build_settings('Debug').merge!(settings)
80
77
  @target.build_settings('Release').merge!(settings)
@@ -362,7 +359,10 @@ module Pod
362
359
  flags << '-DOS_OBJECT_USE_OBJC=0'
363
360
  end
364
361
  end
365
- flags = flags * " "
362
+ if target_definition.inhibits_warnings_for_pod?(consumer.spec.root.name)
363
+ flags << '-w -Xanalyzer -analyzer-disable-checker'
364
+ end
365
+ flags * " "
366
366
  end
367
367
 
368
368
  #-----------------------------------------------------------------------#
@@ -1,3 +1,5 @@
1
+ require 'active_support'
2
+
1
3
  module Pod
2
4
  class Installer
3
5
  class UserProjectIntegrator
@@ -29,6 +31,7 @@ module Pod
29
31
  add_xcconfig_base_configuration
30
32
  add_pods_library
31
33
  add_copy_resources_script_phase
34
+ add_check_manifest_lock_script_phase
32
35
  save_user_project
33
36
  end
34
37
  end
@@ -129,6 +132,32 @@ module Pod
129
132
  end
130
133
  end
131
134
 
135
+ # Adds a shell script build phase responsible for checking if the Pods
136
+ # locked in the Pods/Manifest.lock file are in sync with the Pods defined
137
+ # in the Podfile.lock.
138
+ #
139
+ # @note The build phase is appended to the front because to fail
140
+ # fast.
141
+ #
142
+ # @return [void]
143
+ #
144
+ def add_check_manifest_lock_script_phase
145
+ targets.each do |target|
146
+ phase = target.project.new(Xcodeproj::Project::Object::PBXShellScriptBuildPhase)
147
+ target.build_phases.unshift(phase)
148
+ phase.name = 'Check Pods Manifest.lock'
149
+ phase.shell_script = <<-EOS.strip_heredoc
150
+ diff "${PODS_ROOT}/../Podfile.lock" "${PODS_ROOT}/Manifest.lock" > /dev/null
151
+ if [[ $? != 0 ]] ; then
152
+ cat << EOM
153
+ error: The sanbox is not in sync with the Podfile.lock. Run 'pod install'.
154
+ EOM
155
+ exit 1
156
+ fi
157
+ EOS
158
+ end
159
+ end
160
+
132
161
  # Saves the changes to the user project to the disk.
133
162
  #
134
163
  # @return [void]
@@ -53,6 +53,13 @@ module Pod
53
53
  #
54
54
  attr_accessor :support_files_root
55
55
 
56
+ # @return [Pathname] the folder where the client is stored used for
57
+ # computing the relative paths. If integrating it should be the
58
+ # folder where the user project is stored, otherwise it should
59
+ # be the installation root.
60
+ #
61
+ attr_accessor :client_root
62
+
56
63
  # @return [Pathname] the path of the user project that this library will
57
64
  # integrate as identified by the analyzer.
58
65
  #
@@ -157,7 +164,7 @@ module Pod
157
164
  # variable of the user's project.
158
165
  #
159
166
  def relative_pods_root
160
- "${SRCROOT}/#{support_files_root.relative_path_from(user_project_path.dirname)}"
167
+ "${SRCROOT}/#{support_files_root.relative_path_from(client_root)}"
161
168
  end
162
169
 
163
170
  # @return [String] the path of the xcconfig file relative to the root of
@@ -189,7 +196,7 @@ module Pod
189
196
  # @return [String] the computed path.
190
197
  #
191
198
  def relative_to_srcroot(path)
192
- path.relative_path_from(user_project_path.dirname).to_s
199
+ path.relative_path_from(client_root).to_s
193
200
  end
194
201
  end
195
202
  end
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: 0.17.2
4
+ version: 0.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-03 00:00:00.000000000 Z
12
+ date: 2013-04-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: cocoapods-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.17.2
20
+ version: 0.18.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.17.2
27
+ version: 0.18.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: claide
30
30
  requirement: !ruby/object:Gem::Requirement
@@ -59,14 +59,14 @@ dependencies:
59
59
  requirements:
60
60
  - - ~>
61
61
  - !ruby/object:Gem::Version
62
- version: 0.5.2
62
+ version: 0.5.5
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - ~>
68
68
  - !ruby/object:Gem::Version
69
- version: 0.5.2
69
+ version: 0.5.5
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: faraday
72
72
  requirement: !ruby/object:Gem::Requirement