Class: Pod::Source::Acceptor
- Inherits:
-
Object
- Object
- Pod::Source::Acceptor
- Defined in:
- lib/cocoapods-core/source/acceptor.rb
Overview
Checks whether a podspec can be accepted by a source. The check takes into account the introduction of 0.0.1 version if there are already tagged ones or whether there is change in the source.
Instance Attribute Summary collapse
-
#source ⇒ Source
readonly
The source where the podspec should be added.
Actions collapse
-
#analyze(spec, previous_spec = nil) ⇒ Array<String>
Checks whether the given specification can be accepted.
-
#analyze_path(spec_path) ⇒ Array<String>
Checks whether the specification at the given path can be accepted.
Instance Method Summary collapse
-
#initialize(repo) ⇒ Acceptor
constructor
A new instance of Acceptor.
Constructor Details
Instance Attribute Details
#source ⇒ Source (readonly)
Returns the source where the podspec should be added.
10 11 12 |
# File 'lib/cocoapods-core/source/acceptor.rb', line 10 def source @source end |
Instance Method Details
#analyze(spec, previous_spec = nil) ⇒ Array<String>
Checks whether the given specification can be accepted.
28 29 30 31 32 33 34 35 |
# File 'lib/cocoapods-core/source/acceptor.rb', line 28 def analyze(spec, previous_spec = nil) errors = [] check_spec_source_change(spec, errors) check_if_untagged_version_is_acceptable(spec, previous_spec, errors) check_commit_change_for_untagged_version(spec, previous_spec, errors) check_dependencies(spec, errors) errors end |
#analyze_path(spec_path) ⇒ Array<String>
Checks whether the specification at the given path can be accepted.
42 43 44 45 46 47 |
# File 'lib/cocoapods-core/source/acceptor.rb', line 42 def analyze_path(spec_path) spec = Specification.from_file(spec_path) analyze(spec) rescue ['Unable to load the specification.'] end |