21 Commits

Author SHA1 Message Date
Issy Long
f682147598
Fix RuboCop Style/RedundantFreeze offenses 2024-01-18 22:20:01 +00:00
Mike McQuaid
7da934f7e2
Deprecate/disable/delete code.
The next release after this is merged will be 4.1.0.

Co-authored-by: Markus Reiter <me@reitermark.us>
2023-07-06 16:56:20 +01:00
Douglas Eichelberger
827fc87cde Enable more typing 2023-03-15 14:29:15 -07:00
Bo Anderson
2ea7454efa
Fix Security/CompoundHash offences 2022-06-17 19:47:55 +01:00
Markus Reiter
24ae318a3d Move type annotations into files. 2020-10-10 14:59:39 +02:00
Markus Reiter
425cc76da9 Refactor and document PkgVersion. 2020-08-20 05:31:40 +02:00
Seeker
f904cc2aea pkg_version: disable rubocop hash alignment 2020-08-11 13:15:50 -07:00
Seeker
51bc9ae3d9 pkg_version: delegate major, minor, patch methods to :version 2020-08-11 13:01:54 -07:00
Mike McQuaid
57fd98ec4f
pkg_version: tweak variable naming. 2020-03-04 11:28:28 +00:00
David Frascone
8ed8d6979c Fix for when version is nil
When version is nil, (version <==> other.version) also returns nil
and then the nill object doesn't have a nonzero? method.

I'm not sure what package put me into this state, but, this fix repaired
my environment.

Also, there is probably a more ruby-esque way to do this, but, I'm not a
ruby expert ;-)
2020-03-03 12:27:21 -07:00
Mike McQuaid
36dbad3922
Add frozen_string_literal to all files. 2019-04-20 13:27:36 +09:00
Mike McQuaid
737b84b54b
brew style --fix fixes. 2018-11-02 17:29:23 +00:00
Markus Reiter
e9b9ea49a1 Update to RuboCop 0.59.1. 2018-09-17 03:45:59 +02:00
Mike McQuaid
cf5fdeef1d Rubocop: manual rule fixes. 2017-09-24 21:23:59 +01:00
Markus Reiter
e851c9bf6c Style/Alias: Prefer alias. 2016-09-23 18:19:53 +02:00
Markus Reiter
52ff988530 Fix RuboCop CaseEquality. 2016-09-23 15:30:06 +02:00
Vlad Shablinsky
2e916110e4
Use HeadVersion for install/reinstall 2016-07-16 20:39:13 +08:00
Vlad Shablinsky
9ac5836604
pkg_version: allow HeadVersion and HEAD revisions 2016-07-16 20:39:13 +08:00
Jack Nagel
27092cabc4 Switch PkgVersion to use composition
Comparing PkgVersion and Version objects can produce nonsensical
results. For example, equality is not symmetric:

irb(main):002:0> PkgVersion.new("1.0", 0) == Version.new("1.0")
=> false
irb(main):003:0> Version.new("1.0") == PkgVersion.new("1.0", 0)
=> true

Rather than attempt to deal with subclass-superclass equality, let's use
composition and punt on the problem altogether.
2015-04-02 20:22:12 -04:00
Jack Nagel
1ee4cd94ba Fix PkgVersion#<=> 2014-07-03 16:37:43 -05:00
Jack Nagel
6008187d5f Encode formula revision in installation prefix
In order to allow kegs built with the same version but differing formula
revisions to coexist, we must encode the revision as part of the keg's
name. This is necessary to actually perform an upgrade, as we cannot
upgrade a keg in-place, and temporarily moving it pending the result of
the upgrade is error-prone and potentially slow.

To accomplish this, we introduce a new Formula#pkg_version method that
concatenates the active_spec version with the formula revision. An
exception is made for a formula that has no revision: the tag is
omitted. This preserves compatibility with existing installations.
2014-03-05 20:12:51 -06:00