cocoapods 0.17.0.rc2 → 0.17.0.rc3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +24 -1
- data/README.md +69 -104
- data/lib/cocoapods.rb +6 -12
- data/lib/cocoapods/command.rb +9 -5
- data/lib/cocoapods/command/inter_process_communication.rb +57 -6
- data/lib/cocoapods/command/push.rb +72 -39
- data/lib/cocoapods/external_sources.rb +5 -4
- data/lib/cocoapods/gem_version.rb +1 -1
- data/lib/cocoapods/generator/acknowledgements.rb +11 -5
- data/lib/cocoapods/generator/documentation.rb +4 -4
- data/lib/cocoapods/hooks/installer_representation.rb +2 -0
- data/lib/cocoapods/hooks/library_representation.rb +12 -0
- data/lib/cocoapods/installer.rb +11 -1
- data/lib/cocoapods/installer/analyzer.rb +1 -1
- data/lib/cocoapods/installer/pod_source_installer.rb +10 -0
- data/lib/cocoapods/resolver.rb +3 -0
- data/lib/cocoapods/sandbox.rb +37 -23
- data/lib/cocoapods/user_interface.rb +13 -3
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 74228860bfe13ef84dd8e60454d29c94236d5bb0
|
4
|
+
data.tar.gz: fddc172441d9b378abe7ac8b1ab81df832b467d3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a5b7857acea13393645d5721c05a715c12e001a79d3abc3731425ea5c0b24f0485f4164eebdabbc76c76512841bba5941bfb804da7d52fa7d1ce47f2bb16a2da
|
7
|
+
data.tar.gz: fb80a8e7dd50bd800e95959292b328304bdf4337b959814d0da03f421fa8fff932affa8c376aae14fdd606a61a5aa3734082e2cf73751a69725ce1e147ca6396
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,26 @@
|
|
1
|
+
## 0.17.0.rc3
|
2
|
+
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0.rc1...0.17.0.rc2
|
3
|
+
• [Xcodeproj](https://github.com/CocoaPods/Xcodeproj/compare/0.5.0...0.5.1))
|
4
|
+
|
5
|
+
###### Bug fixes
|
6
|
+
|
7
|
+
- CocoaPods will not crash anymore if the license file indicated on the spec
|
8
|
+
doesn't exits.
|
9
|
+
- Pre install hooks are called before the Pods are cleaned.
|
10
|
+
- Fixed and issue which prevent the inclusion of OTHER_CFLAGS and
|
11
|
+
OTHER_CPLUSPLUSFLAGS in the release builds of the Pods project.
|
12
|
+
- Fixed `pod lint --local`
|
13
|
+
- Fixed the `--allow-warnings` of `pod push`
|
14
|
+
[#835](https://github.com/CocoaPods/CocoaPods/issues/835)
|
15
|
+
- Added `copy_resources_script_name` to the library representation used in the
|
16
|
+
hooks.
|
17
|
+
[#837](https://github.com/CocoaPods/CocoaPods/issues/837)
|
18
|
+
|
19
|
+
###### Ancillary enhancements
|
20
|
+
|
21
|
+
- General improvements to `pod ipc`.
|
22
|
+
- Added `pod ipc repl` subcommand.
|
23
|
+
|
1
24
|
## 0.17.0.rc2
|
2
25
|
[CocoaPods](https://github.com/CocoaPods/CocoaPods/compare/0.17.0.rc1...0.17.0.rc2)
|
3
26
|
• [cocoapods-core](https://github.com/CocoaPods/Core/compare/0.17.0.rc1...0.17.0.rc2)
|
@@ -96,7 +119,7 @@ presented below.
|
|
96
119
|
[#534](https://github.com/CocoaPods/CocoaPods/issues/534)
|
97
120
|
- Install hooks and the `prefix_header_contents` attribute are supported in subspecs.
|
98
121
|
[#617](https://github.com/CocoaPods/CocoaPods/issues/617)
|
99
|
-
- Dashes are now supported in the versions of the Pods.
|
122
|
+
- Dashes are now supported in the versions of the Pods.
|
100
123
|
[#293](https://github.com/CocoaPods/CocoaPods/issues/293)
|
101
124
|
|
102
125
|
###### Bug fixes
|
data/README.md
CHANGED
@@ -1,128 +1,93 @@
|
|
1
1
|
# CocoaPods – an Objective-C library manager
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
[![
|
6
|
-
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/cocoapods.png)](http://badge.fury.io/rb/cocoapods)
|
4
|
+
[![Build Status](https://travis-ci.org/CocoaPods/CocoaPods.png?branch=master)](https://travis-ci.org/CocoaPods/CocoaPods)
|
5
|
+
[![Dependency Status](https://gemnasium.com/CocoaPods/CocoaPods.png)](https://gemnasium.com/CocoaPods/CocoaPods)
|
7
6
|
|
8
7
|
CocoaPods manages library dependencies for your Xcode project.
|
9
8
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
You specify the dependencies for your project in one easy text file. CocoaPods resolves dependencies between libraries, fetches source code for the dependencies, and creates and maintains an Xcode workspace to build your project.
|
15
|
-
|
16
|
-
Ultimately, the goal is to improve discoverability of, and engagement in, third party open-source libraries, by creating a more centralized ecosystem.
|
17
|
-
|
18
|
-
See the [NSScreencast](https://twitter.com/NSScreencast) episode about [using CocoaPods](http://nsscreencast.com/episodes/5-cocoapods) for a quick overview on how to get started or [create a Pod specification](http://nsscreencast.com/episodes/28-creating-a-cocoapod), or [the wiki](https://github.com/CocoaPods/CocoaPods/wiki) for more in depth information on several topics.
|
19
|
-
|
20
|
-
Or, if you’re already using CocoaPods, you can find the changelog [here](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md), which contains an overview of the changes in recent versions.
|
21
|
-
|
22
|
-
|
23
|
-
## Installation
|
24
|
-
|
25
|
-
Downloading and installing CocoaPods only takes a few minutes.
|
26
|
-
|
27
|
-
CocoaPods runs on [Ruby](http://www.ruby-lang.org/en/). To install it run the following commands:
|
28
|
-
|
29
|
-
```
|
30
|
-
$ [sudo] gem install cocoapods
|
31
|
-
```
|
32
|
-
|
33
|
-
If you want to have CocoaPods generate documentation for each library, then install the [appledoc](http://gentlebytes.com/appledoc/) tool:
|
34
|
-
|
35
|
-
```
|
36
|
-
$ brew install appledoc
|
37
|
-
```
|
38
|
-
|
39
|
-
Now that you've got CocoaPods installed you can easily add it to your project.
|
40
|
-
|
41
|
-
**NOTES**
|
9
|
+
You specify the dependencies for your project in one easy text file. CocoaPods
|
10
|
+
resolves dependencies between libraries, fetches source code for the
|
11
|
+
dependencies, and creates and maintains an Xcode workspace to build your
|
12
|
+
project.
|
42
13
|
|
43
|
-
|
44
|
-
|
14
|
+
Ultimately, the goal is to improve discoverability of, and engagement in, third
|
15
|
+
party open-source libraries, by creating a more centralized ecosystem.
|
45
16
|
|
46
|
-
|
17
|
+
Installing and updating CocoaPods is very easy. Don't miss the [Installation
|
18
|
+
guide](http://docs.cocoapods.org/guides/installing_cocoapods.html) and the
|
19
|
+
[Getting started guide](http://docs.cocoapods.org/guides/getting_started.html).
|
20
|
+
See the [NSScreencast](https://twitter.com/NSScreencast) episode about [using
|
21
|
+
CocoaPods](http://nsscreencast.com/episodes/5-cocoapods) for a quick overview.
|
47
22
|
|
48
|
-
3. If you use [RVM](https://rvm.io), you might need to create a symbolic link to the LLVM GCC compiler: `$ [sudo] ln -s /usr/bin/llvm-gcc-4.2 /usr/bin/gcc-4.2`
|
49
23
|
|
24
|
+
## Links
|
50
25
|
|
51
|
-
|
26
|
+
| Link | Description |
|
27
|
+
| :----- | :------ |
|
28
|
+
[CocoaPods.org](http://cocoapods.org/) | Homepage and search for Pods.
|
29
|
+
[@CocoaPods](http://twitter.com/CocoaPods) | Follow CocoaPods on Twitter to get up to date information about what's going on in the CocoaPods world.
|
30
|
+
[Mailing List](http://groups.google.com/group/cocoapods) | Announcements and support. Feel free to ask any kind of question.
|
31
|
+
[Documentation](http://docs.cocoapods.org) | Everything you want to know about CocoaPods.
|
32
|
+
[Changelog](https://github.com/CocoaPods/CocoaPods/blob/master/CHANGELOG.md) | See the changes introduced by each CocoaPods version.
|
33
|
+
[RSS feed](http://feeds.cocoapods.org/new-pods.rss) | Don't miss any new Pod.
|
52
34
|
|
53
|
-
Search for Pods by name or description.
|
54
35
|
|
55
|
-
|
56
|
-
$ pod search json
|
36
|
+
## Projects
|
57
37
|
|
58
|
-
|
59
|
-
A Very High Performance Objective-C JSON Library.
|
60
|
-
- Homepage: https://github.com/johnezang/JSONKit
|
61
|
-
- Source: https://github.com/johnezang/JSONKit.git
|
38
|
+
CocoaPods is composed by the following projects:
|
62
39
|
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
```
|
72
|
-
$ edit Podfile
|
73
|
-
```
|
74
|
-
|
75
|
-
```ruby
|
76
|
-
platform :ios
|
77
|
-
pod 'JSONKit', '~> 1.4'
|
78
|
-
pod 'Reachability', '~> 2.0.4'
|
79
|
-
```
|
80
|
-
|
81
|
-
And then you [install the dependencies](https://github.com/CocoaPods/CocoaPods/wiki/Creating-a-project-that-uses-CocoaPods) in your project.
|
82
|
-
|
83
|
-
```
|
84
|
-
$ pod install
|
85
|
-
```
|
86
|
-
|
87
|
-
Remember to always open the Xcode workspace instead of the project file when you're building.
|
88
|
-
|
89
|
-
```
|
90
|
-
$ open App.xcworkspace
|
91
|
-
```
|
92
|
-
|
93
|
-
Sometimes CocoaPods doesn't have a Pod for one of your dependencies yet. Fortunately [creating a Pod](https://github.com/CocoaPods/CocoaPods/wiki/A-pod-specification) is really easy.
|
94
|
-
|
95
|
-
```
|
96
|
-
$ pod spec create Peanuts
|
97
|
-
$ edit Peanuts.podspec
|
98
|
-
$ pod spec lint Peanuts.podspec
|
99
|
-
```
|
100
|
-
|
101
|
-
Once you've got it running [create a ticket](https://github.com/CocoaPods/CocoaPods/issues) and upload the Pod. If you're familiar with Git you can also fork the [CocoaPods specs](https://github.com/CocoaPods/Specs) repository and send a pull request. We really love contributions!
|
102
|
-
|
103
|
-
There are several other ways to start using **any** library without a Pod specification, which can be seen in the [SSCatalog example](https://github.com/CocoaPods/CocoaPods/blob/master/examples/SSCatalog/Podfile).
|
40
|
+
| Status | Project | Description | Info |
|
41
|
+
| :----- | :------ | :--- | :--- |
|
42
|
+
| [![Build Status](https://secure.travis-ci.org/CocoaPods/CocoaPods.png?branch=master)](http://travis-ci.org/CocoaPods/CocoaPods) | [CocoaPods](https://github.com/CocoaPods/CocoaPods) | The CocoaPods command line tool. | [docs](http://docs.cocoapods.org/cocoapods)
|
43
|
+
| [![Build Status](https://secure.travis-ci.org/CocoaPods/Core.png?branch=master)](http://travis-ci.org/CocoaPods/Core) | [CocoaPods Core](https://github.com/CocoaPods/Core) | Support for working with specifications and podfiles. | [docs](http://docs.cocoapods.org/cocoapods_core)
|
44
|
+
| [![Build Status](https://secure.travis-ci.org/CocoaPods/cocoapods-downloader.png?branch=master)](http://travis-ci.org/CocoaPods/cocoapods-downloader) |[CocoaPods Downloader](https://github.com/CocoaPods/cocoapods-downloader) | A small library that provides downloaders for various source types. | [docs](http://docs.cocoapods.org/cocoapods_downloader/index.html)
|
45
|
+
| [![Build Status](https://travis-ci.org/CocoaPods/Xcodeproj.png?branch=master)](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)
|
46
|
+
| [![Build Status](https://travis-ci.org/CocoaPods/CLAide.png?branch=master)](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)
|
47
|
+
| [![Build Status](https://secure.travis-ci.org/CocoaPods/Specs.png?branch=master)](http://travis-ci.org/CocoaPods/Specs) | [Master Repo ](https://github.com/CocoaPods/Specs) | Master repository of specifications. | [guide](http://docs.cocoapods.org/guides/contributing_to_the_master_repo.html)
|
104
48
|
|
105
49
|
|
106
50
|
## Collaborate
|
107
51
|
|
108
|
-
All CocoaPods development happens on GitHub,
|
109
|
-
|
110
|
-
Follow [@CocoaPods](http://twitter.com/CocoaPods) to get up to date information about what's going on in the CocoaPods world.
|
111
|
-
|
52
|
+
All CocoaPods development happens on GitHub, contributions make good karma and
|
53
|
+
we welcome with joy new contributors.
|
112
54
|
|
113
55
|
# Donations
|
114
56
|
|
115
|
-
|
116
|
-
|
57
|
+
- [@fngtps](http://twitter.com/fngtps) is donating time to work on the design
|
58
|
+
of the forthcoming cocoapods.org website and donated the money to hire [Max
|
59
|
+
Steenbergen](http://twitter.com/maxsteenbergen) to design [an
|
60
|
+
icon](http://drbl.in/cpmL) for it.
|
61
|
+
- [@sauspiel](http://twitter.com/Sauspiel) uses CocoaPods for their games and
|
62
|
+
have hired me to add features and specs they needed. These are Nimbus,
|
63
|
+
QuincyKit, and HockeyKit. For the [Nimbus
|
64
|
+
spec](https://github.com/CocoaPods/Specs/blob/master/Nimbus/0.9.0/Nimbus.podspec),
|
65
|
+
the ‘subspecs’ feature was added.
|
117
66
|
|
118
67
|
# Endorsements
|
119
68
|
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
69
|
+
- “I am crazy excited about this. With the growing number of Objective-C
|
70
|
+
libraries, this will make things so much better.” –– [Sam
|
71
|
+
Soffes](http://news.ycombinator.com/item?id=3009154)
|
72
|
+
- “Are you doing open source iOS components? You really should support
|
73
|
+
@CocoaPods!” –– [Matthias
|
74
|
+
Tretter](http://twitter.com/#!/myell0w/status/134955697740840961)
|
75
|
+
- “So glad someone has finally done this...” –– [Tom
|
76
|
+
Wilson](http://news.ycombinator.com/item?id=3009349)
|
77
|
+
- “Anybody who has tasted the coolness of RubyGems (and @gembundler)
|
78
|
+
understands how cool CocoaPods might be.” –– [StuFF
|
79
|
+
mc](http://twitter.com/#!/stuffmc/status/115374231591731200)
|
80
|
+
- “I will be working on getting several of my Objective-C libraries ready for
|
81
|
+
CocoaPods this week!” –– [Luke
|
82
|
+
Redpath](http://twitter.com/#!/lukeredpath/status/115510581921988608)
|
83
|
+
- “Really digg how @alloy is building a potential game changer” –– [Klaas
|
84
|
+
Speller](https://twitter.com/#!/spllr/status/115914209438601216)
|
85
|
+
- “@alloy's making an Objective-C package manager. This is fantastic news
|
86
|
+
kids!” –– [Josh
|
87
|
+
Abernathy](http://twitter.com/#!/joshaber/status/115273577703555073)
|
88
|
+
- “A package manager for Cocoa/Objective-C, built with @MacRuby. Awesomeness!”
|
89
|
+
–– [Johannes
|
90
|
+
Fahrenkrug](http://twitter.com/#!/jfahrenkrug/status/115303240286998528)
|
91
|
+
- “This is awesome, I love endorsements!” –– [Appie
|
92
|
+
Durán](http://twitter.com/#!/AppieDuran)
|
93
|
+
|
data/lib/cocoapods.rb
CHANGED
@@ -2,13 +2,13 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
module Pod
|
4
4
|
require 'cocoapods/gem_version'
|
5
|
+
require 'cocoapods-core'
|
6
|
+
require 'xcodeproj'
|
7
|
+
require 'cocoapods/downloader'
|
8
|
+
require 'cocoapods/file_list'
|
9
|
+
require 'cocoapods/config'
|
5
10
|
|
6
|
-
# Indicates
|
7
|
-
#
|
8
|
-
class PlainInformative < StandardError; end
|
9
|
-
|
10
|
-
# Indicates a runtime error **not** caused by a bug which should be
|
11
|
-
# highlighted to the user.
|
11
|
+
# Indicates an user error. This is defined in cocoapods-core.
|
12
12
|
#
|
13
13
|
class Informative < PlainInformative
|
14
14
|
def message
|
@@ -30,12 +30,6 @@ module Pod
|
|
30
30
|
#
|
31
31
|
MAX_CACHE_SIZE = 500
|
32
32
|
|
33
|
-
require 'cocoapods-core'
|
34
|
-
require 'xcodeproj'
|
35
|
-
require 'cocoapods/downloader'
|
36
|
-
require 'cocoapods/file_list'
|
37
|
-
require 'cocoapods/config'
|
38
|
-
|
39
33
|
autoload :Command, 'cocoapods/command'
|
40
34
|
autoload :Executable, 'cocoapods/executable'
|
41
35
|
autoload :ExternalSources, 'cocoapods/external_sources'
|
data/lib/cocoapods/command.rb
CHANGED
@@ -37,13 +37,17 @@ module Pod
|
|
37
37
|
UI.print_warnings
|
38
38
|
end
|
39
39
|
|
40
|
-
def self.report_error(
|
41
|
-
if
|
40
|
+
def self.report_error(exception)
|
41
|
+
if exception.is_a?(Interrupt)
|
42
42
|
puts "[!] Cancelled".red
|
43
43
|
Config.instance.verbose? ? raise : exit(1)
|
44
44
|
else
|
45
|
-
|
46
|
-
|
45
|
+
if ENV['COCOA_PODS_ENV'] != 'development'
|
46
|
+
puts UI::ErrorReport.report(exception)
|
47
|
+
exit 1
|
48
|
+
else
|
49
|
+
raise exception
|
50
|
+
end
|
47
51
|
end
|
48
52
|
end
|
49
53
|
|
@@ -54,7 +58,7 @@ module Pod
|
|
54
58
|
#
|
55
59
|
# @todo Move silent flag to CLAide.
|
56
60
|
#
|
57
|
-
# @note It is
|
61
|
+
# @note It is important that the commands don't override the default
|
58
62
|
# settings if their flag is missing (i.e. their value is nil)
|
59
63
|
#
|
60
64
|
def initialize(argv)
|
@@ -5,6 +5,10 @@ module Pod
|
|
5
5
|
self.abstract_command = true
|
6
6
|
self.summary = 'Inter-process communication'
|
7
7
|
|
8
|
+
def output_pipe
|
9
|
+
STDOUT
|
10
|
+
end
|
11
|
+
|
8
12
|
#-----------------------------------------------------------------------#
|
9
13
|
|
10
14
|
class Spec < IPC
|
@@ -25,7 +29,7 @@ module Pod
|
|
25
29
|
|
26
30
|
def run
|
27
31
|
spec = Specification.from_file(@path)
|
28
|
-
|
32
|
+
output_pipe.puts spec.to_yaml
|
29
33
|
end
|
30
34
|
|
31
35
|
end
|
@@ -50,7 +54,7 @@ module Pod
|
|
50
54
|
|
51
55
|
def run
|
52
56
|
podfile = Pod::Podfile.from_file(@path)
|
53
|
-
|
57
|
+
output_pipe.puts podfile.to_yaml
|
54
58
|
end
|
55
59
|
|
56
60
|
end
|
@@ -80,9 +84,7 @@ module Pod
|
|
80
84
|
begin
|
81
85
|
spec = set.specification
|
82
86
|
result[spec.name] = {
|
83
|
-
'
|
84
|
-
'version' => spec.version,
|
85
|
-
'authors' => spec.authors,
|
87
|
+
'authors' => spec.authors.keys,
|
86
88
|
'summary' => spec.summary,
|
87
89
|
'description' => spec.description,
|
88
90
|
'platforms' => spec.available_platforms.map { |p| p.name.to_s },
|
@@ -91,7 +93,56 @@ module Pod
|
|
91
93
|
next
|
92
94
|
end
|
93
95
|
end
|
94
|
-
|
96
|
+
output_pipe.puts result.to_yaml
|
97
|
+
end
|
98
|
+
|
99
|
+
end
|
100
|
+
|
101
|
+
#-----------------------------------------------------------------------#
|
102
|
+
|
103
|
+
class Repl < IPC
|
104
|
+
|
105
|
+
END_OF_OUTPUT_SIGNAL = "\n\r"
|
106
|
+
|
107
|
+
self.summary = 'The repl listens to commands on standard input.'
|
108
|
+
self.description = <<-DESC
|
109
|
+
The repl listens to commands on standard input and prints their
|
110
|
+
result to standard output.
|
111
|
+
|
112
|
+
It accepts all the other ipc subcommands. The repl will signal the
|
113
|
+
end of output with the the ASCII CR+LF `\\n\\r`.
|
114
|
+
DESC
|
115
|
+
|
116
|
+
def run
|
117
|
+
print_version
|
118
|
+
signal_end_of_output
|
119
|
+
listen
|
120
|
+
end
|
121
|
+
|
122
|
+
def print_version
|
123
|
+
output_pipe.puts "version: '#{Pod::VERSION}'"
|
124
|
+
end
|
125
|
+
|
126
|
+
def signal_end_of_output
|
127
|
+
output_pipe.puts(END_OF_OUTPUT_SIGNAL)
|
128
|
+
STDOUT.flush
|
129
|
+
end
|
130
|
+
|
131
|
+
def listen
|
132
|
+
while repl_command = STDIN.gets
|
133
|
+
execute_repl_command(repl_command)
|
134
|
+
end
|
135
|
+
end
|
136
|
+
|
137
|
+
def execute_repl_command(repl_command)
|
138
|
+
if (repl_command != "\n")
|
139
|
+
repl_commands = repl_command.split
|
140
|
+
subcommand = repl_commands.shift.capitalize
|
141
|
+
arguments = repl_commands
|
142
|
+
subcommand_class = Pod::Command::IPC.const_get(subcommand)
|
143
|
+
subcommand_class.new(CLAide::ARGV.new(arguments)).run
|
144
|
+
signal_end_of_output
|
145
|
+
end
|
95
146
|
end
|
96
147
|
|
97
148
|
end
|
@@ -16,7 +16,7 @@ module Pod
|
|
16
16
|
self.arguments = 'REPO [NAME.podspec]'
|
17
17
|
|
18
18
|
def self.options
|
19
|
-
[ ["--allow-warnings", "Allows
|
19
|
+
[ ["--allow-warnings", "Allows pushing even if there are warnings"],
|
20
20
|
["--local-only", "Does not perform the step of pushing REPO to its remote"] ].concat(super)
|
21
21
|
end
|
22
22
|
|
@@ -48,68 +48,61 @@ module Pod
|
|
48
48
|
push_repo unless @local_only
|
49
49
|
end
|
50
50
|
|
51
|
-
|
51
|
+
#-----------------------------------------------------------------------#
|
52
52
|
|
53
53
|
private
|
54
54
|
|
55
|
+
# @!group Push sub-steps
|
56
|
+
|
55
57
|
extend Executable
|
56
58
|
executable :git
|
57
59
|
|
58
|
-
|
59
|
-
UI.puts "Updating the `#{@repo}' repo\n".yellow
|
60
|
-
Dir.chdir(repo_dir) { UI.puts `git pull 2>&1` }
|
61
|
-
end
|
62
|
-
|
63
|
-
def push_repo
|
64
|
-
UI.puts "\nPushing the `#{@repo}' repo\n".yellow
|
65
|
-
Dir.chdir(repo_dir) { UI.puts `git push 2>&1` }
|
66
|
-
end
|
67
|
-
|
68
|
-
def repo_dir
|
69
|
-
dir = config.repos_dir + @repo
|
70
|
-
raise Informative, "`#{@repo}` repo not found" unless dir.exist?
|
71
|
-
dir
|
72
|
-
end
|
73
|
-
|
74
|
-
# @todo: Add specs for staged and unstaged files.
|
75
|
-
#
|
76
|
-
def check_repo_status
|
77
|
-
clean = Dir.chdir(repo_dir) { `git status --porcelain 2>&1` } == ''
|
78
|
-
raise Informative, "The repo `#{@repo}` is not clean" unless clean
|
79
|
-
end
|
80
|
-
|
81
|
-
def podspec_files
|
82
|
-
files = Pathname.glob(@podspec || "*.podspec")
|
83
|
-
raise Informative, "Couldn't find any .podspec file in current directory" if files.empty?
|
84
|
-
files
|
85
|
-
end
|
86
|
-
|
87
|
-
# @return [Integer] The number of the podspec files to push.
|
60
|
+
# Performs a full lint against the podspecs.
|
88
61
|
#
|
89
|
-
def count
|
90
|
-
podspec_files.count
|
91
|
-
end
|
92
|
-
|
93
62
|
def validate_podspec_files
|
94
63
|
UI.puts "\nValidating #{'spec'.pluralize(count)}".yellow
|
95
64
|
podspec_files.each do |podspec|
|
96
65
|
validator = Validator.new(podspec)
|
66
|
+
validator.only_errors = @allow_warnings
|
97
67
|
begin
|
98
68
|
validator.validate
|
99
|
-
rescue Exception
|
69
|
+
rescue Exception
|
100
70
|
raise Informative, "The `#{podspec}` specification does not validate."
|
101
71
|
end
|
102
72
|
raise Informative, "The `#{podspec}` specification does not validate." unless validator.validated?
|
103
73
|
end
|
104
74
|
end
|
105
75
|
|
76
|
+
# Checks that the repo is clean.
|
77
|
+
#
|
78
|
+
# @raise If the repo is not clean.
|
79
|
+
#
|
80
|
+
# @todo Add specs for staged and unstaged files.
|
81
|
+
#
|
82
|
+
# @todo Gracefully handle the case where source is not under git
|
83
|
+
# source control.
|
84
|
+
#
|
85
|
+
# @return [void]
|
86
|
+
#
|
87
|
+
def check_repo_status
|
88
|
+
clean = Dir.chdir(repo_dir) { `git status --porcelain 2>&1` } == ''
|
89
|
+
raise Informative, "The repo `#{@repo}` is not clean" unless clean
|
90
|
+
end
|
91
|
+
|
92
|
+
# Updates the git repo against the remote.
|
93
|
+
#
|
94
|
+
# @return [void]
|
95
|
+
#
|
96
|
+
def update_repo
|
97
|
+
UI.puts "Updating the `#{@repo}' repo\n".yellow
|
98
|
+
Dir.chdir(repo_dir) { UI.puts `git pull 2>&1` }
|
99
|
+
end
|
100
|
+
|
106
101
|
# Commits the podspecs to the source, which should be a git repo.
|
107
102
|
#
|
108
103
|
# @note The pre commit hook of the repo is skipped as the podspecs have
|
109
104
|
# already been linted.
|
110
105
|
#
|
111
|
-
# @todo Raise if the source is not under git source control.
|
112
|
-
#
|
113
106
|
# @return [void]
|
114
107
|
#
|
115
108
|
def add_specs_to_repo
|
@@ -134,6 +127,46 @@ module Pod
|
|
134
127
|
end
|
135
128
|
end
|
136
129
|
end
|
130
|
+
|
131
|
+
# Pushes the git repo against the remote.
|
132
|
+
#
|
133
|
+
# @return [void]
|
134
|
+
#
|
135
|
+
def push_repo
|
136
|
+
UI.puts "\nPushing the `#{@repo}' repo\n".yellow
|
137
|
+
Dir.chdir(repo_dir) { UI.puts `git push 2>&1` }
|
138
|
+
end
|
139
|
+
|
140
|
+
#-----------------------------------------------------------------------#
|
141
|
+
|
142
|
+
private
|
143
|
+
|
144
|
+
# @!group Private helpers
|
145
|
+
|
146
|
+
# @return [Pathname] The directory of the repository.
|
147
|
+
#
|
148
|
+
def repo_dir
|
149
|
+
dir = config.repos_dir + @repo
|
150
|
+
raise Informative, "`#{@repo}` repo not found" unless dir.exist?
|
151
|
+
dir
|
152
|
+
end
|
153
|
+
|
154
|
+
# @return [Array<Pathname>] The path of the specifications to push.
|
155
|
+
#
|
156
|
+
def podspec_files
|
157
|
+
files = Pathname.glob(@podspec || "*.podspec")
|
158
|
+
raise Informative, "Couldn't find any .podspec file in current directory" if files.empty?
|
159
|
+
files
|
160
|
+
end
|
161
|
+
|
162
|
+
# @return [Integer] The number of the podspec files to push.
|
163
|
+
#
|
164
|
+
def count
|
165
|
+
podspec_files.count
|
166
|
+
end
|
167
|
+
|
168
|
+
#-----------------------------------------------------------------------#
|
169
|
+
|
137
170
|
end
|
138
171
|
end
|
139
172
|
end
|
@@ -318,13 +318,14 @@ module Pod
|
|
318
318
|
def pod_spec_path
|
319
319
|
declared_path = params[:local].to_s
|
320
320
|
path_with_ext = File.extname(declared_path) == '.podspec' ? declared_path : "#{declared_path}/#{name}.podspec"
|
321
|
-
|
322
|
-
absolute_path =
|
321
|
+
podfile_dir = File.dirname(podfile_path || '')
|
322
|
+
absolute_path = File.expand_path(path_with_ext, podfile_dir)
|
323
|
+
pathname = Pathname.new(absolute_path)
|
323
324
|
|
324
|
-
unless
|
325
|
+
unless pathname.exist?
|
325
326
|
raise Informative, "No podspec found for `#{name}` in `#{params[:local]}`"
|
326
327
|
end
|
327
|
-
|
328
|
+
pathname
|
328
329
|
end
|
329
330
|
end
|
330
331
|
end
|
@@ -72,13 +72,19 @@ module Pod
|
|
72
72
|
# @return [Nil] If not license text could be found.
|
73
73
|
#
|
74
74
|
def license_text(spec)
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
75
|
+
return nil unless spec.license
|
76
|
+
text = spec.license[:text]
|
77
|
+
unless text
|
78
|
+
if license_file = file_accessor(spec).license
|
79
|
+
if license_file.exist?
|
80
|
+
text = IO.read(license_file)
|
81
|
+
else
|
82
|
+
UI.warn "Unable to read the license file `#{license_file }` " \
|
83
|
+
"for the spec `#{spec}`"
|
84
|
+
end
|
80
85
|
end
|
81
86
|
end
|
87
|
+
text
|
82
88
|
end
|
83
89
|
|
84
90
|
protected
|
@@ -126,7 +126,7 @@ module Pod
|
|
126
126
|
absolute_paths.map { |f| f.relative_path_from(pod_root).to_s }
|
127
127
|
end
|
128
128
|
|
129
|
-
# @return [String] the path of the file to use
|
129
|
+
# @return [String] the path of the file to use as the index of
|
130
130
|
# documentation relative to the root of the Pod.
|
131
131
|
#
|
132
132
|
def index_file
|
@@ -141,7 +141,7 @@ module Pod
|
|
141
141
|
# !@group Appledoc options.
|
142
142
|
|
143
143
|
# @return [Array<String>] The list of the appledoc options followed by
|
144
|
-
# their
|
144
|
+
# their values as defined in the specification.
|
145
145
|
#
|
146
146
|
def spec_appledoc_options
|
147
147
|
return [] unless specification.documentation
|
@@ -149,7 +149,7 @@ module Pod
|
|
149
149
|
end
|
150
150
|
|
151
151
|
# @return [Array<String>] The list of the appledoc options followed by
|
152
|
-
# their
|
152
|
+
# their values.
|
153
153
|
#
|
154
154
|
# @note The appledoc tool terminates with an exits status of 1 if a
|
155
155
|
# warning was logged (see `--exit-threshold` option).
|
@@ -192,7 +192,7 @@ module Pod
|
|
192
192
|
# !@group Private Helpers
|
193
193
|
|
194
194
|
def target_path
|
195
|
-
sandbox.
|
195
|
+
sandbox.documentation_dir + specification.name
|
196
196
|
end
|
197
197
|
|
198
198
|
def pod_root
|
@@ -18,12 +18,24 @@ module Pod
|
|
18
18
|
target_definition.dependencies
|
19
19
|
end
|
20
20
|
|
21
|
+
# @return [Pathname] The path of the Pods dir.
|
22
|
+
#
|
23
|
+
def sandbox_dir
|
24
|
+
sandbox.root
|
25
|
+
end
|
26
|
+
|
21
27
|
# @return [Pathname] The path of the prefix_header
|
22
28
|
#
|
23
29
|
def prefix_header_filename
|
24
30
|
library.prefix_header_path
|
25
31
|
end
|
26
32
|
|
33
|
+
# @return [Pathname] The path of the script used to copy the resources.
|
34
|
+
#
|
35
|
+
def copy_resources_script_name
|
36
|
+
library.copy_resources_script_path
|
37
|
+
end
|
38
|
+
|
27
39
|
# @return [Project] The Pods project of the sandbox.
|
28
40
|
#
|
29
41
|
def project
|
data/lib/cocoapods/installer.rb
CHANGED
@@ -99,13 +99,14 @@ module Pod
|
|
99
99
|
UI.section "Downloading dependencies" do
|
100
100
|
create_file_accessors
|
101
101
|
install_pod_sources
|
102
|
+
run_pre_install_hooks
|
103
|
+
clean_pod_sources
|
102
104
|
end
|
103
105
|
end
|
104
106
|
|
105
107
|
def generate_pods_project
|
106
108
|
UI.section "Generating Pods project" do
|
107
109
|
prepare_pods_project
|
108
|
-
run_pre_install_hooks
|
109
110
|
install_file_references
|
110
111
|
install_targets
|
111
112
|
run_post_install_hooks
|
@@ -240,15 +241,24 @@ module Pod
|
|
240
241
|
end
|
241
242
|
end
|
242
243
|
|
244
|
+
@pod_installers ||= []
|
243
245
|
pod_installer = PodSourceInstaller.new(sandbox, specs_by_platform)
|
244
246
|
pod_installer.clean = config.clean?
|
245
247
|
pod_installer.aggressive_cache = config.aggressive_cache?
|
246
248
|
pod_installer.generate_docs = config.generate_docs?
|
247
249
|
pod_installer.install_docs = config.install_docs?
|
248
250
|
pod_installer.install!
|
251
|
+
@pod_installers << pod_installer
|
249
252
|
@installed_specs.concat(specs_by_platform.values.flatten)
|
250
253
|
end
|
251
254
|
|
255
|
+
def clean_pod_sources
|
256
|
+
return unless @pod_installers
|
257
|
+
@pod_installers.each do |pod_installer|
|
258
|
+
pod_installer.clean!
|
259
|
+
end
|
260
|
+
end
|
261
|
+
|
252
262
|
# Creates the Pods project from scratch if it doesn't exists.
|
253
263
|
#
|
254
264
|
# @return [void]
|
@@ -383,7 +383,7 @@ module Pod
|
|
383
383
|
if link_with = target_definition.link_with
|
384
384
|
targets = native_targets(user_project).select { |t| link_with.include?(t.name) }
|
385
385
|
raise Informative, "Unable to find the targets named `#{link_with.to_sentence}` to link with target definition `#{target_definition.name}`" if targets.empty?
|
386
|
-
elsif target_definition.
|
386
|
+
elsif target_definition.link_with_first_target?
|
387
387
|
targets = [ native_targets(user_project).first ].compact
|
388
388
|
raise Informative, "Unable to find a target" if targets.empty?
|
389
389
|
else
|
@@ -82,6 +82,16 @@ module Pod
|
|
82
82
|
def install!
|
83
83
|
download_source unless predownloaded? || local?
|
84
84
|
generate_docs if generate_docs?
|
85
|
+
end
|
86
|
+
|
87
|
+
# Cleans the installations if appropriate.
|
88
|
+
#
|
89
|
+
# @todo As the pre install hooks need to run before cleaning this
|
90
|
+
# method should be refactored.
|
91
|
+
#
|
92
|
+
# @return [void]
|
93
|
+
#
|
94
|
+
def clean!
|
85
95
|
clean_installation if clean? && !local?
|
86
96
|
end
|
87
97
|
|
data/lib/cocoapods/resolver.rb
CHANGED
data/lib/cocoapods/sandbox.rb
CHANGED
@@ -12,30 +12,38 @@ module Pod
|
|
12
12
|
#
|
13
13
|
# Pods
|
14
14
|
# |
|
15
|
-
# +--
|
16
|
-
# |
|
17
|
-
# |
|
18
|
-
# |
|
19
|
-
# | +-- [Pod Name]
|
15
|
+
# +-- User
|
16
|
+
# | +-- [Target Name]-configuration.h
|
17
|
+
# | +-- Specs
|
18
|
+
# | +-- Scripts
|
20
19
|
# |
|
21
|
-
# +--
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
25
|
-
#
|
26
|
-
#
|
27
|
-
#
|
28
|
-
#
|
29
|
-
#
|
30
|
-
#
|
31
|
-
#
|
32
|
-
#
|
33
|
-
#
|
34
|
-
#
|
35
|
-
#
|
36
|
-
#
|
37
|
-
#
|
38
|
-
#
|
20
|
+
# +-- Generated
|
21
|
+
# +-- Headers
|
22
|
+
# | +-- Private
|
23
|
+
# | | +-- [Pod Name]
|
24
|
+
# | +-- Public
|
25
|
+
# | +-- [Pod Name]
|
26
|
+
# |
|
27
|
+
# +-- Sources
|
28
|
+
# | +-- [Pod Name]
|
29
|
+
# |
|
30
|
+
# +-- Specs
|
31
|
+
# | +-- External Sources
|
32
|
+
# | +-- Normal Sources
|
33
|
+
# |
|
34
|
+
# +-- Target Support Files
|
35
|
+
# | +-- [Target Name]
|
36
|
+
# | +-- Pods-acknowledgements.markdown
|
37
|
+
# | +-- Pods-acknowledgements.plist
|
38
|
+
# | +-- Pods-dummy.m
|
39
|
+
# | +-- Pods-prefix.pch
|
40
|
+
# | +-- Pods.xcconfig
|
41
|
+
# |
|
42
|
+
# +-- Manifest.lock
|
43
|
+
# |
|
44
|
+
# +-- Pods.xcodeproj
|
45
|
+
#
|
46
|
+
# See #833
|
39
47
|
#
|
40
48
|
class Sandbox
|
41
49
|
|
@@ -154,6 +162,12 @@ module Pod
|
|
154
162
|
end
|
155
163
|
end
|
156
164
|
|
165
|
+
# @return [Pathname] the directory where to store the documentation.
|
166
|
+
#
|
167
|
+
def documentation_dir
|
168
|
+
root + 'Documentation'
|
169
|
+
end
|
170
|
+
|
157
171
|
#-------------------------------------------------------------------------#
|
158
172
|
|
159
173
|
public
|
@@ -23,6 +23,12 @@ module Pod
|
|
23
23
|
attr_accessor :title_level
|
24
24
|
attr_accessor :warnings
|
25
25
|
|
26
|
+
# @return [Bool] Whether the wrapping of the strings to the width of the
|
27
|
+
# terminal should be disabled.
|
28
|
+
#
|
29
|
+
attr_accessor :disable_wrap
|
30
|
+
alias_method :disable_wrap?, :disable_wrap
|
31
|
+
|
26
32
|
# Prints a title taking an optional verbose prefix and
|
27
33
|
# a relative indentation valid for the UI action in the passed
|
28
34
|
# block.
|
@@ -254,9 +260,13 @@ module Pod
|
|
254
260
|
# terminal is too small a width of 80 is assumed.
|
255
261
|
#
|
256
262
|
def wrap_string(txt, indent = '')
|
257
|
-
|
258
|
-
|
259
|
-
|
263
|
+
if disable_wrap || !STDIN.tty?
|
264
|
+
txt
|
265
|
+
else
|
266
|
+
width = `stty size`.split(' ')[1].to_i - indent.length
|
267
|
+
width = 80 unless width >= 10
|
268
|
+
txt.strip.gsub(/(.{1,#{width}})( +|$)\n?|(.{#{width}})/, indent + "\\1\\3\n")
|
269
|
+
end
|
260
270
|
end
|
261
271
|
end
|
262
272
|
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.0.
|
4
|
+
version: 0.17.0.rc3
|
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-
|
12
|
+
date: 2013-03-09 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.0.
|
20
|
+
version: 0.17.0.rc3
|
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.0.
|
27
|
+
version: 0.17.0.rc3
|
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.
|
62
|
+
version: 0.5.2
|
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.
|
69
|
+
version: 0.5.2
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: faraday
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|