cocoapods 0.14.0 → 0.15.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.
- data/CHANGELOG.md +42 -9
- data/bin/pod +4 -0
- data/lib/cocoapods.rb +2 -2
- data/lib/cocoapods/command.rb +2 -25
- data/lib/cocoapods/command/install.rb +1 -2
- data/lib/cocoapods/command/linter.rb +24 -4
- data/lib/cocoapods/command/list.rb +16 -11
- data/lib/cocoapods/command/outdated.rb +2 -4
- data/lib/cocoapods/command/push.rb +10 -10
- data/lib/cocoapods/command/repo.rb +22 -20
- data/lib/cocoapods/command/search.rb +6 -4
- data/lib/cocoapods/command/setup.rb +15 -14
- data/lib/cocoapods/command/spec.rb +17 -14
- data/lib/cocoapods/command/update.rb +9 -1
- data/lib/cocoapods/config.rb +12 -4
- data/lib/cocoapods/dependency.rb +18 -15
- data/lib/cocoapods/downloader/git.rb +41 -28
- data/lib/cocoapods/downloader/http.rb +10 -3
- data/lib/cocoapods/downloader/mercurial.rb +6 -4
- data/lib/cocoapods/downloader/subversion.rb +6 -2
- data/lib/cocoapods/executable.rb +6 -6
- data/lib/cocoapods/generator/acknowledgements/markdown.rb +1 -0
- data/lib/cocoapods/installer.rb +73 -57
- data/lib/cocoapods/installer/target_installer.rb +15 -11
- data/lib/cocoapods/installer/user_project_integrator.rb +25 -16
- data/lib/cocoapods/local_pod.rb +34 -12
- data/lib/cocoapods/podfile.rb +15 -0
- data/lib/cocoapods/resolver.rb +33 -39
- data/lib/cocoapods/source.rb +172 -48
- data/lib/cocoapods/specification.rb +48 -32
- data/lib/cocoapods/specification/set.rb +102 -34
- data/lib/cocoapods/specification/statistics.rb +1 -1
- data/lib/cocoapods/user_interface.rb +215 -0
- data/lib/cocoapods/user_interface/ui_pod.rb +130 -0
- metadata +7 -7
- data/lib/cocoapods/command/presenter.rb +0 -61
- data/lib/cocoapods/command/presenter/cocoa_pod.rb +0 -118
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.
|
4
|
+
version: 0.15.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-10-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: xcodeproj
|
@@ -18,7 +18,7 @@ dependencies:
|
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.3.
|
21
|
+
version: 0.3.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.3.
|
29
|
+
version: 0.3.4
|
30
30
|
- !ruby/object:Gem::Dependency
|
31
31
|
name: faraday
|
32
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -192,8 +192,6 @@ files:
|
|
192
192
|
- lib/cocoapods/command/linter.rb
|
193
193
|
- lib/cocoapods/command/list.rb
|
194
194
|
- lib/cocoapods/command/outdated.rb
|
195
|
-
- lib/cocoapods/command/presenter/cocoa_pod.rb
|
196
|
-
- lib/cocoapods/command/presenter.rb
|
197
195
|
- lib/cocoapods/command/push.rb
|
198
196
|
- lib/cocoapods/command/repo.rb
|
199
197
|
- lib/cocoapods/command/search.rb
|
@@ -232,6 +230,8 @@ files:
|
|
232
230
|
- lib/cocoapods/specification/set.rb
|
233
231
|
- lib/cocoapods/specification/statistics.rb
|
234
232
|
- lib/cocoapods/specification.rb
|
233
|
+
- lib/cocoapods/user_interface/ui_pod.rb
|
234
|
+
- lib/cocoapods/user_interface.rb
|
235
235
|
- lib/cocoapods/version.rb
|
236
236
|
- lib/cocoapods.rb
|
237
237
|
- bin/pod
|
@@ -253,7 +253,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
253
253
|
version: '0'
|
254
254
|
segments:
|
255
255
|
- 0
|
256
|
-
hash: -
|
256
|
+
hash: -2489364705415265788
|
257
257
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
258
258
|
none: false
|
259
259
|
requirements:
|
@@ -1,61 +0,0 @@
|
|
1
|
-
module Pod
|
2
|
-
class Command
|
3
|
-
class Presenter
|
4
|
-
def self.options
|
5
|
-
[["--stats", "Show additional stats (like GitHub watchers and forks)"]]
|
6
|
-
end
|
7
|
-
|
8
|
-
autoload :CocoaPod, 'cocoapods/command/presenter/cocoa_pod'
|
9
|
-
|
10
|
-
def initialize(argv)
|
11
|
-
@stats = argv.option('--stats')
|
12
|
-
end
|
13
|
-
|
14
|
-
def render(array)
|
15
|
-
result = "\n"
|
16
|
-
seats.each {|s| puts describe(s)}
|
17
|
-
result
|
18
|
-
end
|
19
|
-
|
20
|
-
def describe(set)
|
21
|
-
pod = CocoaPod.new(set)
|
22
|
-
result = "\n--> #{pod.name} (#{pod.versions})\n".green
|
23
|
-
result << wrap_string(pod.summary)
|
24
|
-
result << detail('Homepage', pod.homepage)
|
25
|
-
result << detail('Source', pod.source_url)
|
26
|
-
if @stats
|
27
|
-
result << detail('Pushed', pod.github_last_activity)
|
28
|
-
result << detail('Authors', pod.authors) if pod.authors =~ /,/
|
29
|
-
result << detail('Author', pod.authors) if pod.authors !~ /,/
|
30
|
-
result << detail('License', pod.license)
|
31
|
-
result << detail('Platform', pod.platform)
|
32
|
-
result << detail('Watchers', pod.github_watchers)
|
33
|
-
result << detail('Forks', pod.github_forks)
|
34
|
-
end
|
35
|
-
result << detail('Sub specs', pod.subspecs)
|
36
|
-
result
|
37
|
-
end
|
38
|
-
|
39
|
-
private
|
40
|
-
|
41
|
-
# adapted from http://blog.macromates.com/2006/wrapping-text-with-regular-expressions/
|
42
|
-
def wrap_string(txt, col = 80, indentation = 4)
|
43
|
-
indent = ' ' * indentation
|
44
|
-
txt.strip.gsub(/(.{1,#{col}})( +|$)\n?|(.{#{col}})/, indent + "\\1\\3\n")
|
45
|
-
end
|
46
|
-
|
47
|
-
def detail(title, value)
|
48
|
-
return '' if !value
|
49
|
-
''.tap do |t|
|
50
|
-
t << " - #{title}:".ljust(16)
|
51
|
-
if value.class == Array
|
52
|
-
separator = "\n - "
|
53
|
-
t << separator << value.join(separator)
|
54
|
-
else
|
55
|
-
t << value.to_s << "\n"
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
end
|
61
|
-
end
|
@@ -1,118 +0,0 @@
|
|
1
|
-
require 'active_support/core_ext/array/conversions'
|
2
|
-
|
3
|
-
module Pod
|
4
|
-
class Command
|
5
|
-
class Presenter
|
6
|
-
class CocoaPod
|
7
|
-
attr_accessor :set
|
8
|
-
|
9
|
-
def initialize(set)
|
10
|
-
@set = set
|
11
|
-
end
|
12
|
-
|
13
|
-
# set information
|
14
|
-
def name
|
15
|
-
@set.name
|
16
|
-
end
|
17
|
-
|
18
|
-
def version
|
19
|
-
@set.versions.last
|
20
|
-
end
|
21
|
-
|
22
|
-
def versions
|
23
|
-
@set.versions.reverse.join(", ")
|
24
|
-
end
|
25
|
-
|
26
|
-
# specification information
|
27
|
-
def spec
|
28
|
-
@set.specification
|
29
|
-
end
|
30
|
-
|
31
|
-
def authors
|
32
|
-
spec.authors.keys.to_sentence
|
33
|
-
end
|
34
|
-
|
35
|
-
def homepage
|
36
|
-
spec.homepage
|
37
|
-
end
|
38
|
-
|
39
|
-
def description
|
40
|
-
spec.description
|
41
|
-
end
|
42
|
-
|
43
|
-
def summary
|
44
|
-
spec.summary
|
45
|
-
end
|
46
|
-
|
47
|
-
def source_url
|
48
|
-
spec.source.reject {|k,_| k == :commit || k == :tag }.values.first
|
49
|
-
end
|
50
|
-
|
51
|
-
def platform
|
52
|
-
spec.available_platforms.sort { |a,b| a.to_s.downcase <=> b.to_s.downcase }.join(' - ')
|
53
|
-
end
|
54
|
-
|
55
|
-
def license
|
56
|
-
spec.license[:type] if spec.license
|
57
|
-
end
|
58
|
-
|
59
|
-
# will return array of all subspecs (recursevly) or nil
|
60
|
-
def subspecs
|
61
|
-
(spec.recursive_subspecs.any? && spec.recursive_subspecs) || nil
|
62
|
-
end
|
63
|
-
|
64
|
-
# Statistics information
|
65
|
-
def creation_date
|
66
|
-
Pod::Specification::Statistics.instance.creation_date(@set)
|
67
|
-
end
|
68
|
-
|
69
|
-
def github_watchers
|
70
|
-
Pod::Specification::Statistics.instance.github_watchers(@set)
|
71
|
-
end
|
72
|
-
|
73
|
-
def github_forks
|
74
|
-
Pod::Specification::Statistics.instance.github_forks(@set)
|
75
|
-
end
|
76
|
-
|
77
|
-
def github_last_activity
|
78
|
-
distance_from_now_in_words(Pod::Specification::Statistics.instance.github_pushed_at(@set))
|
79
|
-
end
|
80
|
-
|
81
|
-
def ==(other)
|
82
|
-
self.class === other && @set == other.set
|
83
|
-
end
|
84
|
-
|
85
|
-
def eql?(other)
|
86
|
-
self.class === other && name.eql?(other.name)
|
87
|
-
end
|
88
|
-
|
89
|
-
def hash
|
90
|
-
name.hash
|
91
|
-
end
|
92
|
-
|
93
|
-
private
|
94
|
-
|
95
|
-
def distance_from_now_in_words(from_time)
|
96
|
-
return nil unless from_time
|
97
|
-
from_time = Time.parse(from_time)
|
98
|
-
to_time = Time.now
|
99
|
-
distance_in_days = (((to_time - from_time).abs)/60/60/24).round
|
100
|
-
|
101
|
-
case distance_in_days
|
102
|
-
when 0..7
|
103
|
-
"less than a week ago"
|
104
|
-
when 8..29
|
105
|
-
"#{distance_in_days} days ago"
|
106
|
-
when 30..45
|
107
|
-
"1 month ago"
|
108
|
-
when 46..365
|
109
|
-
"#{(distance_in_days.to_f / 30).round} months ago"
|
110
|
-
else
|
111
|
-
"more than a year ago"
|
112
|
-
end
|
113
|
-
end
|
114
|
-
end
|
115
|
-
end
|
116
|
-
end
|
117
|
-
end
|
118
|
-
|