<代码>~>在光谱中的要求是什么?
hanna-0.1.12 depends on [haml (~> 2.2.8)]
<代码>~>在光谱中的要求是什么?
hanna-0.1.12 depends on [haml (~> 2.2.8)]
The RubyGems manual calls this a pessimistic version constraint.
Assume you have specified an n-part version number, e.g. 1.3
(2-part) or
3.5.6.2
(4-part) as the constraint. Then, in order to fulfill the constraint,
a version number must satisfy both of the following conditions
The first n-1 parts of the version number must be identical to the first n-1
parts of the constraint
(e.g. 1.x
or 3.5.6.x
match, but 0.x
or 3.5.7.x
don t) and
The last part of the version number must be greater than or equal to the last
part of the constraint
(e.g. 1.9999
and 3.5.6.2
match, but 1.2
or 3.5.6.1
don t).
换言之,
~> x1.x2.x3. … .xn-2.xn-1.xn
配对
x1.x2.x3. … .xn-2.xn-1.y, y >= xn
The reason this is called a "pessimistic" constraint, and also the use case for
it, is that when you just say > x.y.z
, you are being optimistic: you assume
that from here on out, until all eternity, the API will never ever change. This
is of course a pretty bold assumption. However, most projects have rules about
when they are allowed to
break backwards compatibility,
and how they have to change their version number when they do break backwards
compatibility. You can encode those version numbering rules using a pessimistic
constraint, and thus you can be sure that your code will always continue to work
(assuming that the author of the other project actually adheres to his own
rules, which unfortunately isn t always the case).
换言之,你可以利用这一文号,不断更新你的大体,不作任何微小的更新,避免作出可能破坏你的更新。
例如,“~> 1.2”将更新贵重至1.3(如果公布这一版本),但未能将其更新到2.0。
光谱仪“~>”;具有特别意义,最好以实例说明。 ~> 2.0.3与;= 2.0.3和2.1。 ~> 2.1与;=2.1和t;3.0。 ~> 2.2.beta将与预发版本相匹配,如2.2.beta.12。
它与任何具有相同主要/次要部分的版本相吻合。 也就是说,在这种情况下,haml ~> 2.2.8将符合任何2.2.x版本。
这可以用来确保转录新胶片的变换不会导致依赖新出现但已改变的树脂,从而在这个案例中打破大麻。
The project I m doing is written in Java and parsers source code files. (Java src up to now). Now I d like to enable parsing Ruby code as well. Therefore I am looking for a parser in Java that parses ...
collection_select and select Rails helpers: Which one should I use? I can t see a difference in both ways. Both helpers take a collection and generates options tags inside a select tag. Is there a ...
All of the following API do the same thing: open a file and call a block for each line. Is there any preference we should use one than another? File.open("file").each_line {|line| puts line} open("...
I ve installed RubyCAS-Client version 2.1.0 as a plugin within a rails app. It s working, but I d like to remove the ?ticket= in the url. Is this possible?
Here s the string: 04046955104021109 I need it to be formatted like so: 040469551-0402-1109 What s the shortest/most efficient way to do that with ruby?
I m building an xml document from a hash. The xml attributes need to be in order. How can this be accomplished? hash.to_xml
Can sources for discrete ruby extension modules live in the same directory, controlled by the same extconf.rb script? Background: I ve a project with two extension modules, foo.so and bar.so which ...
guys which text editor is good for Rubyonrails? i m using Windows and i was using E-Texteditor but its not free n its expired now can anyone plese tell me any free texteditor? n which one is best an ...