Skip to content

Commit a421d05

Browse files
committed
amend dumb idea of aliasing #present? to positive? in all TimingManageable sibling classes; v. 7-0.7.25
1 parent 54e62f9 commit a421d05

File tree

7 files changed

+23
-12
lines changed

7 files changed

+23
-12
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
_Please, add the latest build info on top of the list; use Version::MAJOR only after gold release; keep semantic versioning in line with framework's_
44

5+
- **0.7.25** [Steve A.] amend dumb idea of aliasing #present? to positive? in all TimingManageable sibling classes
56
- **0.7.24** [Steve A.] bundle updates & rubocop updates; moved zero?, positive? & present? helpers directly into TimingManageable; specs updates
67
- **0.7.23** [Steve A.] bundle updates
78
- **0.7.20** [Steve A.] bundle updates; added a missing/new EventType used for Coopernuoto meetings ('6X50SL')

Gemfile.lock

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
goggles_db (0.7.24)
4+
goggles_db (0.7.25)
55
acts-as-taggable-on
66
acts_as_votable
77
cities

Guardfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ end
8585
rspec_options = {
8686
cmd: 'spec/dummy/bin/rspec',
8787
# Exclude performance tests; to make it fail-fast, add option "--fail-fast":
88-
cmd_additional_args: ' --color --profile 10 --order rand -f RspecPacmanFormatter::Pacman -t ~type:performance',
88+
cmd_additional_args: ' --color --profile 10 --order rand -f doc -t ~type:performance',
8989
all_after_pass: false,
9090
failed_mode: :focus
9191
}

app/models/concerns/timing_manageable.rb

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,6 @@ def positive?
5151
base_timing_positive || minutes_from_start.positive? || seconds_from_start.positive? || hundredths_from_start.positive?
5252
end
5353

54-
# Make sure only positive timings will be considered as "present":
55-
alias present? positive? # (new, old)
56-
5754
# Returns +true+ if the timing associated with this result is zero.
5855
# If the includee responds (at least) also to #hundredths_from_start,
5956
# this will check all the <tt>XXX_from_start</tt> columns as well.

lib/goggles_db/version.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#
77
module GogglesDb
88
# Public gem version (uses Semantic versioning)
9-
VERSION = '0.7.24'
9+
VERSION = '0.7.25'
1010

1111
# == Versioning codes
1212
#
@@ -19,8 +19,8 @@ module Version
1919
CORE = 'C7'
2020
MAJOR = '0'
2121
MINOR = '7'
22-
PATCH = '24'
23-
BUILD = '20241115'
22+
PATCH = '25'
23+
BUILD = '20241119'
2424

2525
# Full label
2626
FULL = "#{MAJOR}.#{MINOR}.#{PATCH} (#{CORE}-#{BUILD})".freeze

spec/models/goggles_db/meeting_individual_result_spec.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,5 +208,7 @@ module GogglesDb
208208
)
209209
end
210210
end
211+
#-- ------------------------------------------------------------------------
212+
#++
211213
end
212214
end

spec/support/shared_timing_manageable_examples.rb

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
context 'by including this concern, the sibling:' do
3131
subject { fixture_row }
3232

33-
it_behaves_like('responding to a list of methods', %i[hundredths seconds minutes to_timing from_timing positive? present? zero?])
33+
it_behaves_like('responding to a list of methods', %i[hundredths seconds minutes to_timing from_timing positive? zero?])
3434
end
3535

3636
context 'for any result with positive time,' do
@@ -47,7 +47,7 @@
4747
end
4848

4949
describe '#present?' do
50-
it 'is true' do
50+
it 'is always true' do
5151
expect(subject.present?).to be true
5252
end
5353
end
@@ -80,8 +80,8 @@
8080
end
8181

8282
describe '#present?' do
83-
it 'is false' do
84-
expect(subject.present?).to be false
83+
it 'is always true' do
84+
expect(subject.present?).to be true
8585
end
8686
end
8787

@@ -92,6 +92,17 @@
9292
end
9393
end
9494

95+
context 'a new instance with zero timing' do
96+
subject { described_class.new }
97+
98+
it 'is always #present?, even if #zero? is true' do
99+
expect(subject.zero?).to be true
100+
expect(subject.present?).to be true
101+
end
102+
end
103+
#-- ------------------------------------------------------------------------
104+
#++
105+
95106
describe '#to_timing' do
96107
context 'when from_start is false (default),' do
97108
subject { fixture_row.to_timing }

0 commit comments

Comments
 (0)