cocoapods-core 0.24.0 → 0.25.0

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: e270989fada6e795e2cc7e79e4e1ca357f8c58b9
4
- data.tar.gz: 02de35dcbf2139ee33baeb52137af8b186470bc8
3
+ metadata.gz: 0747551216b8eae2637c46bc6d036857aa9d3f07
4
+ data.tar.gz: 67336f56b3a1835367eee3845fbdd9c5e58a16ce
5
5
  SHA512:
6
- metadata.gz: 769f690211c80b3bca39e07ac65edaeb0d6abc3e9852fea691cc4a02cc16336616b9e946ad3514216d83d87a8ebe4004577b675a39f47b074543dc72edc5a812
7
- data.tar.gz: 5f7d2436c93626c0d98247249a5a30a1f0928ba3235178319f15864caf5a35c1e76407ef6562381edc9b28ca5faae0badad391dde5d772ab1d0c8b481f47d750
6
+ metadata.gz: 5e2c569452087333e69618f77cd72e06ab246d4f2d52cb5f7db22b41ffa628d6d0e598d2b4bfd248a5d6edaf7fa779998d67575d92d51edf66ee349584449cdf
7
+ data.tar.gz: 772837fb61c5395dd824e91495ed9fb5f361f01c7ef461244403722c3c3c7a00764304584b1e28c1e24822fe8ab3878b63212ce8d46fbbc5f88f736c3227b751
@@ -2,5 +2,5 @@ module Pod
2
2
 
3
3
  # The version of the cocoapods-core.
4
4
  #
5
- CORE_VERSION = '0.24.0' unless defined? Pod::CORE_VERSION
5
+ CORE_VERSION = '0.25.0' unless defined? Pod::CORE_VERSION
6
6
  end
@@ -35,7 +35,7 @@ module Pod
35
35
  end
36
36
 
37
37
  def documentation=(value)
38
- CoreUI.warn "The `documentation` DSL directive of the podspec format has been deprecated."
38
+ CoreUI.warn "[#{to_s}] The `documentation` DSL directive of the podspec format has been deprecated."
39
39
  end
40
40
 
41
41
  def clean_paths=(value)
@@ -49,6 +49,75 @@ module Pod
49
49
  end
50
50
  end
51
51
 
52
+ # @!group Hooks
53
+ #
54
+ # The specification class provides hooks which are called by CocoaPods
55
+ # when a Pod is installed.
56
+
57
+ #-----------------------------------------------------------------------#
58
+
59
+ # This is a convenience method which gets called after all pods have been
60
+ # downloaded but before they have been installed, and the Xcode project
61
+ # and related files have been generated. Note that this hook is called
62
+ # for each Pods library and only for installations where the Pod is
63
+ # installed.
64
+ #
65
+ # This hook should be used to generate and modify the files of the Pod.
66
+ #
67
+ # It receives the
68
+ # [`Pod::Hooks::PodRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/podrepresentation/)
69
+ # and the
70
+ # [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
71
+ # instances.
72
+ #
73
+ # Override this to, for instance, to run any build script.
74
+ #
75
+ # @example
76
+ #
77
+ # spec.pre_install do |pod, target_definition|
78
+ # Dir.chdir(pod.root){ `sh make.sh` }
79
+ # end
80
+ #
81
+ def pre_install(&block)
82
+ CoreUI.warn "[#{to_s}] The pre install hook of the specification " \
83
+ "DSL has been deprecated, use the `resource_bundles` or the " \
84
+ "`prepare_command` attributes."
85
+ @pre_install_callback = block
86
+ end
87
+
88
+ # This is a convenience method which gets called after all pods have been
89
+ # downloaded, installed, and the Xcode project and related files have
90
+ # been generated. Note that this hook is called for each Pods library and
91
+ # only for installations where the Pod is installed.
92
+ #
93
+ # To modify and generate files for the Pod the pre install hook should be
94
+ # used instead of this one.
95
+ #
96
+ # It receives a
97
+ # [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
98
+ # instance for the current target.
99
+ #
100
+ # Override this to, for instance, add to the prefix header.
101
+ #
102
+ # @example
103
+ #
104
+ # spec.post_install do |library_representation|
105
+ # prefix_header = library_representation.prefix_header_path
106
+ # prefix_header.open('a') do |file|
107
+ # file.puts('#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif')
108
+ # end
109
+ # end
110
+ #
111
+ def post_install(&block)
112
+ CoreUI.warn "[#{to_s}] The post install hook of the specification " \
113
+ "DSL has been deprecated, use the `resource_bundles` or the " \
114
+ "`prepare_command` attributes."
115
+ @post_install_callback = block
116
+ end
117
+
118
+ #-----------------------------------------------------------------------#
119
+
120
+
52
121
  end
53
122
 
54
123
  end
@@ -989,74 +989,6 @@ module Pod
989
989
 
990
990
  #-----------------------------------------------------------------------#
991
991
 
992
- # @!group Hooks
993
- #
994
- # The specification class provides hooks which are called by CocoaPods
995
- # when a Pod is installed.
996
-
997
- #-----------------------------------------------------------------------#
998
-
999
- # This is a convenience method which gets called after all pods have been
1000
- # downloaded but before they have been installed, and the Xcode project
1001
- # and related files have been generated. Note that this hook is called
1002
- # for each Pods library and only for installations where the Pod is
1003
- # installed.
1004
- #
1005
- # This hook should be used to generate and modify the files of the Pod.
1006
- #
1007
- # It receives the
1008
- # [`Pod::Hooks::PodRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/podrepresentation/)
1009
- # and the
1010
- # [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
1011
- # instances.
1012
- #
1013
- # Override this to, for instance, to run any build script.
1014
- #
1015
- # @example
1016
- #
1017
- # spec.pre_install do |pod, target_definition|
1018
- # Dir.chdir(pod.root){ `sh make.sh` }
1019
- # end
1020
- #
1021
- def pre_install(&block)
1022
- CoreUI.warn "The pre install hook of the specification DSL has been " \
1023
- "deprecated, use the `resource_bundles` or the `prepare_command` " \
1024
- "attributes."
1025
- @pre_install_callback = block
1026
- end
1027
-
1028
- # This is a convenience method which gets called after all pods have been
1029
- # downloaded, installed, and the Xcode project and related files have
1030
- # been generated. Note that this hook is called for each Pods library and
1031
- # only for installations where the Pod is installed.
1032
- #
1033
- # To modify and generate files for the Pod the pre install hook should be
1034
- # used instead of this one.
1035
- #
1036
- # It receives a
1037
- # [`Pod::Hooks::LibraryRepresentation`](http://docs.cocoapods.org/cocoapods/pod/hooks/libraryrepresentation/)
1038
- # instance for the current target.
1039
- #
1040
- # Override this to, for instance, add to the prefix header.
1041
- #
1042
- # @example
1043
- #
1044
- # spec.post_install do |library_representation|
1045
- # prefix_header = library_representation.prefix_header_path
1046
- # prefix_header.open('a') do |file|
1047
- # file.puts('#ifdef __OBJC__\n#import "SSToolkitDefines.h"\n#endif')
1048
- # end
1049
- # end
1050
- #
1051
- def post_install(&block)
1052
- CoreUI.warn "The post install hook of the specification DSL has been " \
1053
- "deprecated, use the `resource_bundles` or the `prepare_command` " \
1054
- "attributes."
1055
- @post_install_callback = block
1056
- end
1057
-
1058
- #-----------------------------------------------------------------------#
1059
-
1060
992
  # @!group Subspecs
1061
993
  #
1062
994
  # A library can specify a dependency on either another library, a
@@ -46,7 +46,7 @@ module Pod
46
46
  perform_textual_analysis
47
47
  check_required_root_attributes
48
48
  run_root_validation_hooks
49
- perform_all_specs_ananlysis
49
+ perform_all_specs_analysis
50
50
  else
51
51
  error "The specification defined in `#{file}` could not be loaded." \
52
52
  "\n\n#{@raise_message}"
@@ -137,7 +137,7 @@ module Pod
137
137
  #
138
138
  # @return [void]
139
139
  #
140
- def perform_all_specs_ananlysis
140
+ def perform_all_specs_analysis
141
141
  all_specs = [ spec, *spec.recursive_subspecs ]
142
142
  all_specs.each do |current_spec|
143
143
  current_spec.available_platforms.each do |platform|
@@ -123,10 +123,10 @@ module Pod
123
123
  # @return [Array<String, Version>] the name and the version of a
124
124
  # pod.
125
125
  #
126
- def self.name_and_version_from_string(string_reppresenation)
127
- match_data = string_reppresenation.match(/(\S*) \((.*)\)/)
126
+ def self.name_and_version_from_string(string_representation)
127
+ match_data = string_representation.match(/(\S*) \((.*)\)/)
128
128
  unless match_data
129
- raise Informative, "Invalid string representation for a Specification: `#{string_reppresenation}`."
129
+ raise Informative, "Invalid string representation for a Specification: `#{string_representation}`."
130
130
  end
131
131
  name = match_data[1]
132
132
  vers = Version.new(match_data[2])
@@ -372,11 +372,10 @@ module Pod
372
372
  end
373
373
  end
374
374
 
375
- #-------------------------------------------------------------------------#
376
-
377
375
  public
378
376
 
379
- # @!group Hooks support
377
+ # @!group Deprecated Hooks support
378
+ #-------------------------------------------------------------------------#
380
379
 
381
380
  # @return [Proc] the pre install callback if defined.
382
381
  #
@@ -607,8 +606,7 @@ module Pod
607
606
  begin
608
607
  eval(string, nil, path.to_s)
609
608
  rescue Exception => e
610
- raise DSLError.new("Invalid `#{path.basename}` file: #{e.message}",
611
- path, e.backtrace)
609
+ raise DSLError.new("Invalid `#{path.basename}` file: #{e.message}", path, e.backtrace)
612
610
  end
613
611
  end
614
612
  end
@@ -9,7 +9,7 @@ module Pod
9
9
  # Wraps an exception raised by a DSL file in order to show to the user the
10
10
  # contents of the line that raised the exception.
11
11
  #
12
- class DSLError < StandardError
12
+ class DSLError < Informative
13
13
 
14
14
  # @return [String] the description that should be presented to the user.
15
15
  #
@@ -53,11 +53,14 @@ module Pod
53
53
  #
54
54
  def message
55
55
  unless @message
56
- m = description.dup
56
+ m = "\n[!] "
57
+ m << description
58
+ m << ". Updating CocoaPods might fix the issue.\n"
59
+ m = m.red if m.respond_to?(:red)
57
60
 
58
61
  return m unless backtrace && dsl_path && File.exist?(dsl_path)
59
62
 
60
- trace_line = backtrace.find { |l| l =~ /#{dsl_path}/ }
63
+ trace_line = backtrace.find { |l| l.include?(dsl_path.to_s) }
61
64
  return m unless trace_line
62
65
  line_numer = trace_line.split(':')[1].to_i - 1
63
66
  return m unless line_numer
@@ -67,7 +70,7 @@ module Pod
67
70
  first_line = ( line_numer.zero? )
68
71
  last_line = ( line_numer == (lines.count - 1) )
69
72
 
70
- m << "\n #\n"
73
+ m << "\n"
71
74
  m << "#{indent}from #{trace_line.gsub(/:in.*$/,'')}\n"
72
75
  m << "#{indent}-------------------------------------------\n"
73
76
  m << "#{indent}#{ lines[line_numer - 1] }" unless first_line
@@ -75,7 +78,7 @@ module Pod
75
78
  m << "#{indent}#{ lines[line_numer + 1] }" unless last_line
76
79
  m << "\n" unless m.end_with?("\n")
77
80
  m << "#{indent}-------------------------------------------\n"
78
- m << " #"
81
+ m << ""
79
82
  @message = m
80
83
  end
81
84
  @message
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.24.0
4
+ version: 0.25.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-09-04 00:00:00.000000000 Z
12
+ date: 2013-09-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport