cocoapods-core 0.36.0.beta.2 → 0.36.0.rc.1

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: 39b20311877e6a8f1059d7178ed1f40829995d49
4
- data.tar.gz: dd35dbdc688039420676c4e447df3d8b31e48496
3
+ metadata.gz: 915aaad78d648c3ce0ccf1c18c1423a3e79e4ba7
4
+ data.tar.gz: f92077229e395bdfdd2746ac914186fdf8e676f5
5
5
  SHA512:
6
- metadata.gz: d6e2c6c3264cedf3b6ea2030cb7abbd301757317b154bdf8f6c1552886fcbd875304efc80b3d381d3bed86512d1e910d777aa62e863977976f7717434306516f
7
- data.tar.gz: 0fc6afdc18a2b0750b50504bafb5d22ea5dab61e787490aca7118be44ecb4d277073fe2dd65ec58d7e028632c73c4f4846a05cce6c82f874cd700151ec5b04ad
6
+ metadata.gz: c79c0b0771df003f6525b815c6878dc22c2d7d04f10776c3cc4d3ec7d4441b7a9fb1eabde0594e1b2009c5dc0f05e6bc5fb1be0be1b7074c6cc363f5535c33fc
7
+ data.tar.gz: 7dab87e277f4d6d3eefbdbbd3f658fe45452ef0ac9255d7f12340b2e48f3ad3f5ecd398acf03c366ca44ec194fa347a5f993506f624046c5ffb9b81cac5d270c
@@ -1,5 +1,5 @@
1
1
  module Pod
2
2
  # The version of the cocoapods-core.
3
3
  #
4
- CORE_VERSION = '0.36.0.beta.2' unless defined? Pod::CORE_VERSION
4
+ CORE_VERSION = '0.36.0.rc.1' unless defined? Pod::CORE_VERSION
5
5
  end
@@ -680,7 +680,7 @@ module Pod
680
680
  #
681
681
  def podspec_path_from_options(options)
682
682
  if path = options[:path]
683
- if File.extname(path) == '.podspec'
683
+ if File.basename(path).include?('.podspec')
684
684
  path_with_ext = path
685
685
  else
686
686
  path_with_ext = "#{path}.podspec"
@@ -688,10 +688,10 @@ module Pod
688
688
  path_without_tilde = path_with_ext.gsub('~', ENV['HOME'])
689
689
  podfile.defined_in_file.dirname + path_without_tilde
690
690
  elsif name = options[:name]
691
- name = File.extname(name) == '.podspec' ? name : "#{name}.podspec"
691
+ name = File.basename(name).include?('.podspec') ? name : "#{name}.podspec"
692
692
  podfile.defined_in_file.dirname + name
693
693
  elsif options[:autodetect]
694
- glob_pattern = podfile.defined_in_file.dirname + '*.podspec'
694
+ glob_pattern = podfile.defined_in_file.dirname + '*.podspec{,.json}'
695
695
  Pathname.glob(glob_pattern).first
696
696
  end
697
697
  end
@@ -40,7 +40,7 @@ module Pod
40
40
  @default_value = options.delete(:default_value) { nil }
41
41
  @ios_default = options.delete(:ios_default) { nil }
42
42
  @osx_default = options.delete(:osx_default) { nil }
43
- @types = options.delete(:types) { [String] }
43
+ @types = options.delete(:types) { [String] }
44
44
 
45
45
  unless options.empty?
46
46
  raise StandardError, "Unrecognized options: #{options} for #{self}"
@@ -53,16 +53,13 @@ module Pod
53
53
  unknown_keys = keys - valid_keys
54
54
 
55
55
  unknown_keys.each do |key|
56
- results.add_warning('attributes', "Unrecognized `#{key}` key")
56
+ results.add_warning('attributes', "Unrecognized `#{key}` key.")
57
57
  end
58
58
 
59
59
  Pod::Specification::DSL.attributes.each do |_key, attribute|
60
- if attribute.keys && attribute.name != :platforms
61
- if attribute.root_only?
62
- value = consumer.spec.send(attribute.name)
63
- else
64
- value = consumer.send(attribute.name)
65
- end
60
+ validate_attribute_type(attribute, consumer.spec.attributes_hash[attribute.name.to_s])
61
+ if attribute.name != :platforms
62
+ value = value_for_attribute(attribute)
66
63
  validate_attribute_value(attribute, value) if value
67
64
  end
68
65
  end
@@ -83,7 +80,7 @@ module Pod
83
80
 
84
81
  if patterns.respond_to?(:each)
85
82
  patterns.each do |pattern|
86
- if pattern.start_with?('/')
83
+ if pattern.respond_to?(:start_with?) && pattern.start_with?('/')
87
84
  results.add_error('File Patterns', 'File patterns must be ' \
88
85
  "relative and cannot start with a slash (#{attrb.name}).")
89
86
  end
@@ -109,6 +106,17 @@ module Pod
109
106
 
110
107
  private
111
108
 
109
+ def value_for_attribute(attribute)
110
+ if attribute.root_only?
111
+ consumer.spec.send(attribute.name)
112
+ else
113
+ consumer.send(attribute.name) if consumer.respond_to?(attribute.name)
114
+ end
115
+ rescue => e
116
+ results.add_error('attributes', "Unable to validate `#{attribute.name}` (#{e}).")
117
+ nil
118
+ end
119
+
112
120
  # Validates the given value for the given attribute.
113
121
  #
114
122
  # @param [Spec::DSL::Attribute] attribute
@@ -125,6 +133,15 @@ module Pod
125
133
  end
126
134
  end
127
135
 
136
+ def validate_attribute_type(attribute, value)
137
+ return unless value
138
+ types = attribute.supported_types
139
+ if types.none? { |klass| value.class == klass }
140
+ results.add_error('attributes', 'Unacceptable type ' \
141
+ "`#{value.class}` for `#{attribute.name}`. Allowed values: `#{types.inspect}`.")
142
+ end
143
+ end
144
+
128
145
  def validate_attribute_array_keys(attribute, value)
129
146
  unknown_keys = value.keys.map(&:to_s) - attribute.keys.map(&:to_s)
130
147
  unknown_keys.each do |unknown_key|
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.36.0.beta.2
4
+ version: 0.36.0.rc.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Duran
@@ -9,62 +9,62 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-01-27 00:00:00.000000000 Z
12
+ date: 2015-02-24 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.2.15
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
27
  version: 3.2.15
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: nap
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - ~>
32
+ - - "~>"
33
33
  - !ruby/object:Gem::Version
34
34
  version: 0.8.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - ~>
39
+ - - "~>"
40
40
  - !ruby/object:Gem::Version
41
41
  version: 0.8.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: fuzzy_match
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - ~>
46
+ - - "~>"
47
47
  - !ruby/object:Gem::Version
48
48
  version: 2.0.4
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - ~>
53
+ - - "~>"
54
54
  - !ruby/object:Gem::Version
55
55
  version: 2.0.4
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: bacon
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - ~>
60
+ - - "~>"
61
61
  - !ruby/object:Gem::Version
62
62
  version: '1.1'
63
63
  type: :development
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - ~>
67
+ - - "~>"
68
68
  - !ruby/object:Gem::Version
69
69
  version: '1.1'
70
70
  description: |-
@@ -78,6 +78,9 @@ executables: []
78
78
  extensions: []
79
79
  extra_rdoc_files: []
80
80
  files:
81
+ - LICENSE
82
+ - README.md
83
+ - lib/cocoapods-core.rb
81
84
  - lib/cocoapods-core/core_ui.rb
82
85
  - lib/cocoapods-core/dependency.rb
83
86
  - lib/cocoapods-core/gem_version.rb
@@ -86,37 +89,34 @@ files:
86
89
  - lib/cocoapods-core/lockfile.rb
87
90
  - lib/cocoapods-core/metrics.rb
88
91
  - lib/cocoapods-core/platform.rb
92
+ - lib/cocoapods-core/podfile.rb
89
93
  - lib/cocoapods-core/podfile/dsl.rb
90
94
  - lib/cocoapods-core/podfile/target_definition.rb
91
- - lib/cocoapods-core/podfile.rb
92
95
  - lib/cocoapods-core/requirement.rb
96
+ - lib/cocoapods-core/source.rb
93
97
  - lib/cocoapods-core/source/acceptor.rb
94
98
  - lib/cocoapods-core/source/aggregate.rb
95
99
  - lib/cocoapods-core/source/health_reporter.rb
96
- - lib/cocoapods-core/source.rb
100
+ - lib/cocoapods-core/specification.rb
97
101
  - lib/cocoapods-core/specification/consumer.rb
102
+ - lib/cocoapods-core/specification/dsl.rb
98
103
  - lib/cocoapods-core/specification/dsl/attribute.rb
99
104
  - lib/cocoapods-core/specification/dsl/attribute_support.rb
100
105
  - lib/cocoapods-core/specification/dsl/deprecations.rb
101
106
  - lib/cocoapods-core/specification/dsl/platform_proxy.rb
102
- - lib/cocoapods-core/specification/dsl.rb
103
107
  - lib/cocoapods-core/specification/json.rb
108
+ - lib/cocoapods-core/specification/linter.rb
104
109
  - lib/cocoapods-core/specification/linter/analyzer.rb
105
110
  - lib/cocoapods-core/specification/linter/result.rb
106
- - lib/cocoapods-core/specification/linter.rb
107
111
  - lib/cocoapods-core/specification/root_attribute_accessors.rb
108
- - lib/cocoapods-core/specification/set/presenter.rb
109
112
  - lib/cocoapods-core/specification/set.rb
110
- - lib/cocoapods-core/specification.rb
113
+ - lib/cocoapods-core/specification/set/presenter.rb
111
114
  - lib/cocoapods-core/standard_error.rb
115
+ - lib/cocoapods-core/vendor.rb
112
116
  - lib/cocoapods-core/vendor/requirement.rb
113
117
  - lib/cocoapods-core/vendor/version.rb
114
- - lib/cocoapods-core/vendor.rb
115
118
  - lib/cocoapods-core/version.rb
116
119
  - lib/cocoapods-core/yaml_helper.rb
117
- - lib/cocoapods-core.rb
118
- - README.md
119
- - LICENSE
120
120
  homepage: https://github.com/CocoaPods/CocoaPods
121
121
  licenses:
122
122
  - MIT
@@ -127,17 +127,17 @@ require_paths:
127
127
  - lib
128
128
  required_ruby_version: !ruby/object:Gem::Requirement
129
129
  requirements:
130
- - - '>='
130
+ - - ">="
131
131
  - !ruby/object:Gem::Version
132
132
  version: 2.0.0
133
133
  required_rubygems_version: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - '>='
135
+ - - ">="
136
136
  - !ruby/object:Gem::Version
137
137
  version: '0'
138
138
  requirements: []
139
139
  rubyforge_project:
140
- rubygems_version: 2.0.14
140
+ rubygems_version: 2.4.5
141
141
  signing_key:
142
142
  specification_version: 3
143
143
  summary: The models of CocoaPods