Skip to content

Commit bfdd9ea

Browse files
committed
bump to 0.10.1 to fix current_version
1 parent 741d724 commit bfdd9ea

File tree

6 files changed

+49
-5
lines changed

6 files changed

+49
-5
lines changed

CHANGELOG.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,16 @@ All notable changes to this project will be documented in this file.
33

44
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/)
55

6+
## [0.10.2] - 2026-02-20
7+
8+
### Fixed
9+
- Fixed version sorting to use semantic versioning instead of lexicographic ordering (`Gem::Version`), so that e.g. `0.10` correctly sorts above `0.9`
10+
11+
## [0.10.1] - 2026-02-20
12+
13+
### Fixed
14+
- Included 0.1 and 0.9 data submodules in the built gem (they were missing from 0.10.0)
15+
616
## [0.10.0] - 2025-02-18
717

818
### Added

bmt.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ Gem::Specification.new do |spec|
1414
spec.license = 'MIT'
1515
spec.files = Dir['lib/**/*.{rb,json}']
1616
spec.require_paths = ['lib']
17-
spec.required_ruby_version = '>= 3.1'
17+
spec.required_ruby_version = '>= 3.4'
1818

1919
spec.metadata = {
2020
'homepage_uri' => 'https://github.com/bugcrowd/bmt-ruby',

lib/bmt.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ def methodology_keys(version: current_version)
5151
# in the repo.
5252
# The returned list is in order with the current version first.
5353
def versions
54-
@versions ||= json_dir_names.sort.reverse!
54+
# START Contributions by Cursor.
55+
@versions ||= json_dir_names.sort_by { |v| Gem::Version.new(v) }.reverse!
56+
# END Cursor.
5557
end
5658

5759
def methodology_json(key, version: current_version)
@@ -67,6 +69,8 @@ def json_dir_names
6769
DATA_DIR.entries
6870
.map(&:basename)
6971
.map(&:to_s)
70-
.grep(/^[0-9]+\.[0-9]/).sort
72+
# START Contributions by Cursor.
73+
.grep(/^[0-9]+\.[0-9]/)
74+
# END Cursor.
7175
end
7276
end

lib/bmt/version.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
module Bmt
2-
VERSION = '0.10.0'.freeze
2+
# START Contributions by Cursor.
3+
VERSION = '0.10.2'.freeze
4+
# END Cursor.
35
end

spec/bmt_spec.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,11 @@
44
describe '#versions' do
55
subject { described_class.versions }
66

7+
# START Contributions by Cursor.
78
it 'return all of the versions in the filesystem in reverse semver order' do
8-
expect(subject).to eq(['2.1', '1.0'])
9+
expect(subject).to eq(['10.0', '2.1', '1.0'])
910
end
11+
# END Cursor.
1012
end
1113

1214
describe '#current_version' do
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
{
2+
"metadata": {
3+
"title": "Website Testing v10",
4+
"release_date": "2026-02-20T00:00:00+00:00",
5+
"description": "Placeholder methodology for version sorting test",
6+
"vrt_version": "10.0.0"
7+
},
8+
"content": {
9+
"steps": [
10+
{
11+
"key": "information",
12+
"title": "Information gathering",
13+
"description": "",
14+
"type": "checklist",
15+
"items": [
16+
{
17+
"key": "search_engine_discovery",
18+
"title": "Conduct Search Engine Discovery",
19+
"description": "Placeholder item",
20+
"vrt_category": "sensitive_data_exposure"
21+
}
22+
]
23+
}
24+
]
25+
}
26+
}

0 commit comments

Comments
 (0)