Class: Composer::Package::AliasPackage
Overview
The root package represents the project’s composer.json and contains additional metadata
Constant Summary
Constants inherited
from BasePackage
BasePackage::STABILITY_ALPHA, BasePackage::STABILITY_BETA, BasePackage::STABILITY_DEV, BasePackage::STABILITY_RC, BasePackage::STABILITY_STABLE, BasePackage::SUPPORTED_LINK_TYPES
Instance Attribute Summary collapse
Attributes inherited from BasePackage
#id, #name, #pretty_name, #pretty_version, #repository, #stability, #version
Instance Method Summary
collapse
Methods inherited from BasePackage
#attributes, #pretty_string, stabilities, #to_s, #type=, #unique_name
Constructor Details
#initialize(alias_of, version, pretty_version) ⇒ AliasPackage
All descendants’ constructors should call this parent constructor
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
|
# File 'lib/composer/package/alias_package.rb', line 32
def initialize(alias_of, version, pretty_version)
super(alias_of.name)
@version = version
@pretty_version = pretty_version
@alias_of = alias_of
@stability = Composer::Package::Version::VersionParser::parse_stability(version)
@dev = @stability === 'dev'
%w{requires dev_requires}.each do |type|
links = alias_of.send(type)
links.each do |index, link|
if 'self.version' === link.pretty_constraint
links[index] = Composer::Package::Link.new(
link.source,
link.target,
Composer::Package::LinkConstraint::VersionConstraint.new(
'=',
@version
),
type,
pretty_version
)
end
end
@type = links
end
%w{conflicts provides replaces}.each do |type|
links = alias_of.send(type)
new_links = []
links.each do |link|
if 'self.version' === link.pretty_constraint
new_links = Composer.Package.Link.new(
link.source,
link.target,
Composer::Package::LinkConstraint.VersionConstraint.new(
'=',
@version
),
type,
pretty_version
)
end
end
@type = links.zip(new_links).flatten.compact
end
end
|
Instance Attribute Details
#alias_of ⇒ Object
Returns the value of attribute alias_of.
21
22
23
|
# File 'lib/composer/package/alias_package.rb', line 21
def alias_of
@alias_of
end
|
#authors ⇒ Object
Returns the value of attribute authors.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def authors
@authors
end
|
#conflicts ⇒ Object
Returns the value of attribute conflicts.
21
22
23
|
# File 'lib/composer/package/alias_package.rb', line 21
def conflicts
@conflicts
end
|
#description ⇒ Object
Returns the value of attribute description.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def description
@description
end
|
#homepage ⇒ Object
Returns the value of attribute homepage.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def homepage
@homepage
end
|
#keywords ⇒ Object
Returns the value of attribute keywords.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def keywords
@keywords
end
|
#license ⇒ Object
Returns the value of attribute license.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def license
@license
end
|
#provides ⇒ Object
Returns the value of attribute provides.
21
22
23
|
# File 'lib/composer/package/alias_package.rb', line 21
def provides
@provides
end
|
#replaces ⇒ Object
Returns the value of attribute replaces.
21
22
23
|
# File 'lib/composer/package/alias_package.rb', line 21
def replaces
@replaces
end
|
#repositories ⇒ Object
Returns the value of attribute repositories.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def repositories
@repositories
end
|
#requires ⇒ Object
Returns the value of attribute requires.
21
22
23
|
# File 'lib/composer/package/alias_package.rb', line 21
def requires
@requires
end
|
#scripts ⇒ Object
Returns the value of attribute scripts.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def scripts
@scripts
end
|
#source_mirrors ⇒ Object
Returns the value of attribute source_mirrors.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def source_mirrors
@source_mirrors
end
|
#source_reference ⇒ Object
Returns the value of attribute source_reference.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def source_reference
@source_reference
end
|
#source_url ⇒ Object
Returns the value of attribute source_url.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def source_url
@source_url
end
|
#support ⇒ Object
Returns the value of attribute support.
24
25
26
|
# File 'lib/composer/package/alias_package.rb', line 24
def support
@support
end
|
Instance Method Details
#archive_excludes ⇒ Object
260
261
262
|
# File 'lib/composer/package/alias_package.rb', line 260
def archive_excludes
@alias_of.archive_excludes
end
|
#autoload ⇒ Object
208
209
210
|
# File 'lib/composer/package/alias_package.rb', line 208
def autoload
@alias_of.autoload
end
|
#binaries ⇒ Object
228
229
230
|
# File 'lib/composer/package/alias_package.rb', line 228
def binaries
@alias_of.binaries
end
|
#dev_autoload ⇒ Object
212
213
214
|
# File 'lib/composer/package/alias_package.rb', line 212
def dev_autoload
@alias_of.dev_autoload
end
|
#dist_mirrors ⇒ Object
196
197
198
|
# File 'lib/composer/package/alias_package.rb', line 196
def dist_mirrors
@alias_of.dist_mirrors
end
|
#dist_mirrors=(mirrors) ⇒ Object
192
193
194
|
# File 'lib/composer/package/alias_package.rb', line 192
def dist_mirrors=(mirrors)
@alias_of.dist_mirrors = mirrors
end
|
#dist_reference ⇒ Object
172
173
174
|
# File 'lib/composer/package/alias_package.rb', line 172
def dist_reference
@alias_of.dist_reference
end
|
#dist_reference=(reference) ⇒ Object
176
177
178
|
# File 'lib/composer/package/alias_package.rb', line 176
def dist_reference=(reference)
@alias_of.dist_reference = reference
end
|
#dist_sha1_checksum ⇒ Object
180
181
182
|
# File 'lib/composer/package/alias_package.rb', line 180
def dist_sha1_checksum
@alias_of.dist_sha1_checksum
end
|
#dist_type ⇒ Object
160
161
162
|
# File 'lib/composer/package/alias_package.rb', line 160
def dist_type
@alias_of.dist_type
end
|
#dist_url ⇒ Object
164
165
166
|
# File 'lib/composer/package/alias_package.rb', line 164
def dist_url
@alias_of.dist_url
end
|
#dist_urls ⇒ Object
168
169
170
|
# File 'lib/composer/package/alias_package.rb', line 168
def dist_urls
@alias_of.dist_urls
end
|
120
121
122
|
# File 'lib/composer/package/alias_package.rb', line 120
def
@alias_of.
end
|
#include_paths ⇒ Object
216
217
218
|
# File 'lib/composer/package/alias_package.rb', line 216
def include_paths
@alias_of.include_paths
end
|
#installation_source ⇒ Object
128
129
130
|
# File 'lib/composer/package/alias_package.rb', line 128
def installation_source
@alias_of.installation_source
end
|
#installation_source=(type) ⇒ Object
124
125
126
|
# File 'lib/composer/package/alias_package.rb', line 124
def installation_source=(type)
@alias_of.installation_source = type
end
|
#is_abandoned? ⇒ Boolean
264
265
266
|
# File 'lib/composer/package/alias_package.rb', line 264
def is_abandoned?
@alias_of.is_abandoned?
end
|
#is_dev ⇒ Object
Determine if development package Return: true if development package; Otherwise false.
90
91
92
|
# File 'lib/composer/package/alias_package.rb', line 90
def is_dev
@dev
end
|
#is_root_package_alias ⇒ Object
104
105
106
|
# File 'lib/composer/package/alias_package.rb', line 104
def is_root_package_alias
@root_package_alias
end
|
#notification_url ⇒ Object
256
257
258
|
# File 'lib/composer/package/alias_package.rb', line 256
def notification_url
@alias_of.notification_url
end
|
#release_date ⇒ Object
224
225
226
|
# File 'lib/composer/package/alias_package.rb', line 224
def release_date
@alias_of.release_date
end
|
#replacement_package ⇒ Object
268
269
270
|
# File 'lib/composer/package/alias_package.rb', line 268
def replacement_package
@alias_of.replacement_package
end
|
#root_package_alias=(value) ⇒ Object
Stores whether this is an alias created by an aliasing in the requirements of the root package or not Use by the policy for sorting manually aliased packages first, see #576
98
99
100
|
# File 'lib/composer/package/alias_package.rb', line 98
def root_package_alias=(value)
@root_package_alias = value
end
|
#source_type ⇒ Object
132
133
134
|
# File 'lib/composer/package/alias_package.rb', line 132
def source_type
@alias_of.source_type
end
|
#source_urls ⇒ Object
140
141
142
|
# File 'lib/composer/package/alias_package.rb', line 140
def source_urls
@alias_of.source_urls
end
|
#suggests ⇒ Object
244
245
246
|
# File 'lib/composer/package/alias_package.rb', line 244
def suggests
@alias_of.suggests
end
|
#target_dir ⇒ Object
116
117
118
|
# File 'lib/composer/package/alias_package.rb', line 116
def target_dir
@alias_of.target_dir
end
|
#transport_options ⇒ Object
188
189
190
|
# File 'lib/composer/package/alias_package.rb', line 188
def transport_options
@alias_of.transport_options
end
|
#transport_options=(options) ⇒ Object
184
185
186
|
# File 'lib/composer/package/alias_package.rb', line 184
def transport_options=(options)
@alias_of.transport_options = options
end
|
#type ⇒ Object
Wrappers around the aliased package #
112
113
114
|
# File 'lib/composer/package/alias_package.rb', line 112
def type
@alias_of.Type
end
|