cocoapods 0.22.3 → 0.23.0.rc1

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.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3567ec1832df6804c3e4e6d8e1914003910fdb18
4
+ data.tar.gz: 40decef521b811cd03fa6859477b3409dbdab2d8
5
+ SHA512:
6
+ metadata.gz: d7d7136f56b6ee03c44ec8915852f67e4ae42dc3ab97b99c1d6d7b56bb1d73af9da153916403e03de6eaba935740e28f1046e1217f94e75187d39fbc56089e61
7
+ data.tar.gz: 01e3d5dc91d7cd0a31461f15c70509aff2a6171a98b880f259a77f0fc58d56ba652fd62b250c79700ece2383170d4f90d689867ff670c8e51e375249f18841da
@@ -2,6 +2,59 @@
2
2
 
3
3
  To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides/installing_cocoapods.html).
4
4
 
5
+ ## Master
6
+
7
+ ## 0.23.0.rc1
8
+
9
+ ###### Enhancements
10
+
11
+ * Added `resource_bundles` attribute to Specification DSL.
12
+ [#743](https://github.com/CocoaPods/CocoaPods/issues/743),
13
+ [#1186](https://github.com/CocoaPods/CocoaPods/issues/1186)
14
+
15
+ * Added `vendored_frameworks` attribute to Specification DSL.
16
+ [#809](https://github.com/CocoaPods/CocoaPods/issues/809),
17
+ [#1075](https://github.com/CocoaPods/CocoaPods/issues/1075)
18
+
19
+ * Added `vendored_libraries` attribute to Specification DSL.
20
+ [#809](https://github.com/CocoaPods/CocoaPods/issues/809),
21
+ [#1075](https://github.com/CocoaPods/CocoaPods/issues/1075)
22
+
23
+ * Added `prepare_command` attribute to Specification DSL. The prepare command
24
+ will replace the pre_install hook. The post_install hook has been deprecated.
25
+ [#1247](https://github.com/CocoaPods/CocoaPods/issues/1247)
26
+
27
+ * Restructured `.cocoapods` folder to contain repos in a subdirectory.
28
+ [#1150](https://github.com/CocoaPods/CocoaPods/issues/1150)
29
+ [Ian Ynda-Hummel](https://github.com/ianyh)
30
+
31
+ * Improved `pod spec create` template.
32
+ [#1223](https://github.com/CocoaPods/CocoaPods/issues/1223)
33
+
34
+ * Added copy&paste-friendly dependency to `pod search`.
35
+ [#1073](https://github.com/CocoaPods/CocoaPods/issues/1073)
36
+
37
+ * Improved performance of the installation of Pods with git
38
+ sources which specify a tag.
39
+ [#1077](https://github.com/CocoaPods/CocoaPods/issues/1077)
40
+
41
+ * Core Data `xcdatamodeld` files are now properly referenced from the Pods
42
+ project.
43
+ [#1155](https://github.com/CocoaPods/CocoaPods/issues/1155)
44
+
45
+ * Removed punctuation check from specification validations.
46
+ [#1155](https://github.com/CocoaPods/CocoaPods/issues/1155)
47
+
48
+ * Deprecated the `documentation` DSL attribute of the podspec format.
49
+ [Core#20](https://github.com/CocoaPods/Core/issues/20)
50
+
51
+ ###### Bug Fixes
52
+
53
+ * Fix copy resource script issue related to filenames with spaces.
54
+ [#1231](https://github.com/CocoaPods/CocoaPods/issues/1231)
55
+
56
+ <!------------------------------------------------------------------------ ->
57
+
5
58
  ## 0.22.3
6
59
  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.2...0.22.3)
7
60
 
@@ -33,6 +86,7 @@ To install or update CocoaPods see this [guide](http://docs.cocoapods.org/guides
33
86
  * Fix handling of spaces in paths when compiling xcdatamodel(d) files.
34
87
  [#1201](https://github.com/CocoaPods/CocoaPods/pull/1201)
35
88
 
89
+ <!------------------------------------------------------------------------ ->
36
90
 
37
91
  ## 0.22.2
38
92
  [CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.22.1...0.22.2)
@@ -42,9 +42,6 @@ module Pod
42
42
  autoload :PrefixHeader, 'cocoapods/generator/prefix_header'
43
43
  autoload :TargetEnvironmentHeader, 'cocoapods/generator/target_environment_header'
44
44
  autoload :XCConfig, 'cocoapods/generator/xcconfig'
45
- autoload :AggregateXCConfig, 'cocoapods/generator/xcconfig/aggregate_xcconfig'
46
- autoload :PublicPodXCConfig, 'cocoapods/generator/xcconfig/public_pod_xcconfig'
47
- autoload :PrivatePodXCConfig, 'cocoapods/generator/xcconfig/private_pod_xcconfig'
48
45
  end
49
46
 
50
47
  module Hooks
@@ -5,7 +5,7 @@ module Pod
5
5
 
6
6
  self.summary = 'Shows information on installed Pods.'
7
7
  self.description = <<-DESC
8
- Shows information on installed Pods in current Project.
8
+ Shows information on installed Pods in current Project.
9
9
  If optional `PODFILE_PATH` provided, the info will be shown for
10
10
  that specific Podfile
11
11
  DESC
@@ -21,13 +21,14 @@ module Pod
21
21
  def initialize(argv)
22
22
  @info_all = argv.flag?('all')
23
23
  @info_in_md = argv.flag?('md')
24
+ @info_license = argv.flag?('license')
24
25
  @podfile_path = argv.shift_argument
25
26
  super
26
27
  end
27
28
 
28
29
  def run
29
30
  use_podfile = (@podfile_path || !config.lockfile)
30
-
31
+
31
32
  if !use_podfile
32
33
  UI.puts "Using lockfile" if config.verbose?
33
34
  verify_lockfile_exists!
@@ -57,7 +58,7 @@ module Pod
57
58
  pods.collect! {|pod| (pod.is_a?(Hash)) ? pod.keys.first : pod}
58
59
  end
59
60
 
60
- def pods_info_hash(pods, keys=[:name, :homepage, :summary])
61
+ def pods_info_hash(pods, keys=[:name, :homepage, :summary, :license])
61
62
  pods_info = []
62
63
  pods.each do |pod|
63
64
  spec = (Pod::SourcesManager.search_by_name(pod).first rescue nil)
@@ -66,26 +67,27 @@ module Pod
66
67
  keys.each { |k| info[k] = spec.specification.send(k) }
67
68
  pods_info << info
68
69
  else
69
-
70
+
70
71
  end
71
-
72
+
72
73
  end
73
74
  pods_info
74
75
  end
75
76
 
76
77
  def pods_info(pods, in_md=false)
77
- pods = pods_info_hash(pods, [:name, :homepage, :summary])
78
+ pods = pods_info_hash(pods, [:name, :homepage, :summary, :license])
78
79
 
79
- pods.each do |pod|
80
+ pods.each do |pod|
80
81
  if in_md
81
- UI.puts "* [#{pod[:name]}](#{pod[:homepage]}) - #{pod[:summary]}"
82
+ UI.puts "* [#{pod[:name]}](#{pod[:homepage]}) [#{pod[:license][:type]}] - #{pod[:summary]}"
82
83
  else
83
- UI.puts "- #{pod[:name]} - #{pod[:summary]}"
84
+ UI.puts "- #{pod[:name]} [#{pod[:license][:type]}]".green
85
+ UI.puts " #{pod[:summary]}\n\n"
84
86
  end
85
87
  end
86
88
  end
87
89
 
88
90
  end
89
-
91
+
90
92
  end
91
- end
93
+ end
@@ -9,8 +9,8 @@ module Pod
9
9
  self.description = <<-DESC
10
10
  Validates NAME.podspec or `*.podspec' in the current working dir, creates
11
11
  a directory and version folder for the pod in the local copy of
12
- REPO (~/.cocoapods/[REPO]), copies the podspec file into the version directory,
13
- and finally it pushes REPO to its remote.
12
+ REPO (~/.cocoapods/repos/[REPO]), copies the podspec file into the version
13
+ directory, and finally it pushes REPO to its remote.
14
14
  DESC
15
15
 
16
16
  self.arguments = 'REPO [NAME.podspec]'
@@ -13,7 +13,7 @@ module Pod
13
13
  self.summary = 'Add a spec repo.'
14
14
 
15
15
  self.description = <<-DESC
16
- Clones `URL` in the local spec-repos directory at `~/.cocoapods`. The
16
+ Clones `URL` in the local spec-repos directory at `~/.cocoapods/repos/`. The
17
17
  remote can later be referred to by `NAME`.
18
18
  DESC
19
19
 
@@ -48,7 +48,7 @@ module Pod
48
48
 
49
49
  self.description = <<-DESC
50
50
  Updates the local clone of the spec-repo `NAME`. If `NAME` is omitted
51
- this will update all spec-repos in `~/.cocoapods`.
51
+ this will update all spec-repos in `~/.cocoapods/repos`.
52
52
  DESC
53
53
 
54
54
  self.arguments = '[NAME]'
@@ -1,3 +1,5 @@
1
+ require 'fileutils'
2
+
1
3
  module Pod
2
4
  class Command
3
5
  class Setup < Command
@@ -30,6 +32,8 @@ module Pod
30
32
  set_master_repo_url
31
33
  set_master_repo_branch
32
34
  update_master_repo
35
+ elsif old_master_repo_dir.exist?
36
+ migrate_repos
33
37
  else
34
38
  add_master_repo
35
39
  end
@@ -43,6 +47,21 @@ module Pod
43
47
 
44
48
  # @!group Setup steps
45
49
 
50
+ # Migrates any repos from the old directory structure to the new directory
51
+ # structure.
52
+ #
53
+ # @return [void]
54
+ def migrate_repos
55
+ config.repos_dir.mkpath
56
+ Dir.foreach old_master_repo_dir.parent do |repo_dir|
57
+ source_repo_dir = old_master_repo_dir.parent + repo_dir
58
+ target_repo_dir = config.repos_dir + repo_dir
59
+ if not repo_dir =~ /\.+/ and source_repo_dir != config.repos_dir
60
+ FileUtils.mv source_repo_dir, target_repo_dir
61
+ end
62
+ end
63
+ end
64
+
46
65
  # Sets the url of the master repo according to whether it is push.
47
66
  #
48
67
  # @return [void]
@@ -129,6 +148,12 @@ module Pod
129
148
  def master_repo_dir
130
149
  SourcesManager.master_repo_dir
131
150
  end
151
+
152
+ # @return [Pathname] the directory of the old master repo.
153
+ #
154
+ def old_master_repo_dir
155
+ Pathname.new('~/.cocoapods/master').expand_path
156
+ end
132
157
  end
133
158
  end
134
159
  end
@@ -437,109 +437,137 @@ module Pod
437
437
  def spec_template(data)
438
438
  return <<-SPEC
439
439
  #
440
- # Be sure to run `pod spec lint #{data[:name]}.podspec' to ensure this is a
441
- # valid spec and remove all comments before submitting the spec.
440
+ # Be sure to run `pod spec lint #{data[:name]}.podspec' to ensure this is a
441
+ # valid spec and to remove all comments including this before submitting the spec.
442
442
  #
443
- # To learn more about the attributes see http://docs.cocoapods.org/specification.html
443
+ # To learn more about Podspec attributes see http://docs.cocoapods.org/specification.html
444
+ # To see working Podspecs in the CocoaPods repo see https://github.com/CocoaPods/Specs/
444
445
  #
446
+
445
447
  Pod::Spec.new do |s|
448
+
449
+ # ――― Spec Metadata ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
450
+ #
451
+ # These will help people to find your library, and whilst it
452
+ # can feel like a chore to fill in it's definitely to your advantage. The
453
+ # summary should be tweet-length, and the description more in depth.
454
+ #
455
+
446
456
  s.name = "#{data[:name]}"
447
457
  s.version = "#{data[:version]}"
448
458
  s.summary = "#{data[:summary]}"
449
- # s.description = <<-DESC
450
- # An optional longer description of #{data[:name]}
451
- #
452
- # * Markdown format.
453
- # * Don't worry about the indent, we strip it!
454
- # DESC
459
+
460
+ s.description = <<-DESC
461
+ A longer description of #{data[:name]} in Markdown format.
462
+
463
+ * Think: Why did you write this? What is the focus? What does it do?
464
+ * CocoaPods will be using this to generate tags, and improve search results.
465
+ * Try to keep it short, snappy and to the point.
466
+ * Finally, don't worry about the indent, CocoaPods strips it!
467
+ DESC
468
+
455
469
  s.homepage = "#{data[:homepage]}"
456
470
  # s.screenshots = "www.example.com/screenshots_1", "www.example.com/screenshots_2"
457
471
 
458
- # Specify the license type. CocoaPods detects automatically the license file if it is named
459
- # 'LICENCE*.*' or 'LICENSE*.*', however if the name is different, specify it.
460
- s.license = 'MIT (example)'
461
- # s.license = { :type => 'MIT (example)', :file => 'FILE_LICENSE' }
462
472
 
463
- # Specify the authors of the library, with email addresses. You can often find
464
- # the email addresses of the authors by using the SCM log. E.g. $ git log
465
- #
466
- s.author = { "#{data[:author_name]}" => "#{data[:author_email]}" }
467
- # s.authors = { "#{data[:author_name]}" => "#{data[:author_email]}", "other author" => "and email address" }
473
+ # ――― Spec License ――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
468
474
  #
469
- # If absolutely no email addresses are available, then you can use this form instead.
475
+ # Licensing your code is important. See http://choosealicense.com for more info.
476
+ # CocoaPods will detect a license file if there is a named LICENSE*
477
+ # Popular ones are 'MIT', 'BSD' and 'Apache License, Version 2.0'.
470
478
  #
471
- # s.author = '#{data[:author_name]}', 'other author'
472
479
 
473
- # Specify the location from where the source should be retrieved.
474
- #
475
- s.source = { :git => "#{data[:source_url]}", #{data[:ref_type]} => "#{data[:ref]}" }
480
+ s.license = 'MIT (example)'
481
+ # s.license = { :type => 'MIT', :file => 'FILE_LICENSE' }
476
482
 
477
483
 
478
- # If this Pod runs only on iOS or OS X, then specify the platform and
479
- # the deployment target.
484
+ # ――― Author Metadata ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
485
+ #
486
+ # Specify the authors of the library, with email addresses. Email addresses
487
+ # of the authors by using the SCM log. E.g. $ git log. If no email can be
488
+ # found CocoaPods accept just the names.
480
489
  #
481
- # s.platform = :ios, '5.0'
482
490
 
483
- # ――― MULTI-PLATFORM VALUES ――――――――――――――――――――――――――――――――――――――――――――――――― #
491
+ s.author = { "#{data[:author_name]}" => "#{data[:author_email]}" }
492
+ # s.authors = { "#{data[:author_name]}" => "#{data[:author_email]}", "other author" => "email@address.com" }
493
+ # s.author = '#{data[:author_name]}', 'other author'
494
+
484
495
 
485
- # If this Pod runs on both platforms, then specify the deployment
486
- # targets.
496
+ # ――― Platform Specifics ――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
487
497
  #
498
+ # If this Pod runs only on iOS or OS X, then specify the platform and
499
+ # the deployment target. You can optionally include the target after the platform.
500
+ #
501
+
502
+ # s.platform = :ios
503
+ # s.platform = :ios, '5.0'
504
+
505
+ # When using multiple platforms
488
506
  # s.ios.deployment_target = '5.0'
489
507
  # s.osx.deployment_target = '10.7'
490
508
 
491
- # A list of file patterns which select the source files that should be
492
- # added to the Pods project. If the pattern is a directory then the
493
- # path will automatically have '*.{h,m,mm,c,cpp}' appended.
509
+
510
+ # ――― Source Location ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
494
511
  #
495
- s.source_files = 'Classes', 'Classes/**/*.{h,m}'
496
- s.exclude_files = 'Classes/Exclude'
512
+ # Specify the location from where the source should be retrieved.
513
+ # Supports git, hg, svn and HTTP.
514
+ #
515
+
516
+ s.source = { :git => "#{data[:source_url]}", #{data[:ref_type]} => "#{data[:ref]}" }
497
517
 
498
- # A list of file patterns which select the header files that should be
499
- # made available to the application. If the pattern is a directory then the
500
- # path will automatically have '*.h' appended.
518
+
519
+ # ――― Source Code ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
501
520
  #
502
- # If you do not explicitly set the list of public header files,
503
- # all headers of source_files will be made public.
521
+ # CocoaPods is smart about how it include source code, for source files
522
+ # giving a folder will include any h, m, mm, c & cpp files. For header
523
+ # files it will include any header in the folder.
524
+ # Not including the public_header_files will make all headers public.
504
525
  #
526
+
527
+ s.source_files = 'Classes', 'Classes/**/*.{h,m}'
528
+ s.exclude_files = 'Classes/Exclude'
529
+
505
530
  # s.public_header_files = 'Classes/**/*.h'
506
531
 
507
- # A list of resources included with the Pod. These are copied into the
508
- # target bundle with a build phase script.
532
+
533
+ # ――― Resources ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
534
+ #
535
+ # A list of resources included with the Pod. These are copied into the
536
+ # target bundle with a build phase script. Anything else will be cleaned.
537
+ # You can preserve files from being cleaned, please don't preserve
538
+ # non-essential files like tests, examples and documentation.
509
539
  #
540
+
510
541
  # s.resource = "icon.png"
511
542
  # s.resources = "Resources/*.png"
512
543
 
513
- # A list of paths to preserve after installing the Pod.
514
- # CocoaPods cleans by default any file that is not used.
515
- # Please don't include documentation, example, and test files.
516
- #
517
544
  # s.preserve_paths = "FilesToSave", "MoreFilesToSave"
518
545
 
519
- # Specify a list of frameworks that the application needs to link
520
- # against for this Pod to work.
546
+
547
+ # ――― Project Linking ―――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
521
548
  #
549
+ # Link your library with frameworks, or libraries. Libraries do not include
550
+ # the lib prefix of their name.
551
+ #
552
+
522
553
  # s.framework = 'SomeFramework'
523
554
  # s.frameworks = 'SomeFramework', 'AnotherFramework'
524
555
 
525
- # Specify a list of libraries that the application needs to link
526
- # against for this Pod to work.
527
- #
528
556
  # s.library = 'iconv'
529
557
  # s.libraries = 'iconv', 'xml2'
530
558
 
531
- # If this Pod uses ARC, specify it like so.
532
- #
533
- s.requires_arc = true
534
559
 
535
- # If you need to specify any other build settings, add them to the
536
- # xcconfig hash.
560
+ # ――― Project Settings ――――――――――――――――――――――――――――――――――――――――――――――――――――――――― #
537
561
  #
538
- # s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
562
+ # If your library depends on compiler flags you can set them in the xcconfig hash
563
+ # where they will only apply to your library. If you depend on other Podspecs
564
+ # you can include multiple dependencies to ensure it works.
539
565
 
540
- # Finally, specify any Pods that this Pod depends on.
541
- #
566
+ # s.requires_arc = true
567
+
568
+ # s.xcconfig = { 'HEADER_SEARCH_PATHS' => '$(SDKROOT)/usr/include/libxml2' }
542
569
  # s.dependency 'JSONKit', '~> 1.4'
570
+
543
571
  end
544
572
  SPEC
545
573
  end
@@ -132,10 +132,17 @@ module Pod
132
132
 
133
133
  # @!group Paths
134
134
 
135
+ # @return [Pathname] the directory where repos, templates and configuration
136
+ # files are stored.
137
+ #
138
+ def home_dir
139
+ @home_dir ||= Pathname.new(ENV['CP_HOME_DIR'] || "~/.cocoapods").expand_path
140
+ end
141
+
135
142
  # @return [Pathname] the directory where the CocoaPods sources are stored.
136
143
  #
137
144
  def repos_dir
138
- @repos_dir ||= Pathname.new(ENV['CP_REPOS_DIR'] || "~/.cocoapods").expand_path
145
+ @repos_dir ||= Pathname.new(ENV['CP_REPOS_DIR'] || "~/.cocoapods/repos").expand_path
139
146
  end
140
147
 
141
148
  attr_writer :repos_dir
@@ -261,7 +268,7 @@ module Pod
261
268
  # @return [Pathname] The path of the file which contains the user settings.
262
269
  #
263
270
  def user_settings_file
264
- repos_dir + "config.yaml"
271
+ home_dir + "config.yaml"
265
272
  end
266
273
 
267
274
  # Sets the values of the attributes with the given hash.