Skip to content

Commit 4010e44

Browse files
authored
Add the AI LLM Methodology (#20)
* Update methodologies data * Bump version, expand on changelog, add author * Old versions of ruby have been EOL'd, let's test actual life'd versions * Update rubocop, and auto-correct some auto-correctable infractions
1 parent dc37ef9 commit 4010e44

File tree

15 files changed

+73
-54
lines changed

15 files changed

+73
-54
lines changed

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ jobs:
77
runs-on: ubuntu-latest
88
strategy:
99
matrix:
10-
ruby: ['2.5', '2.6', '2.7']
10+
ruby: ['3.1', '3.2', '3.3']
1111
name: Test ruby v${{ matrix.ruby }} support
1212
steps:
1313
- uses: actions/checkout@v1

.github/workflows/publish-gem.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,11 @@ jobs:
1010
runs-on: ubuntu-latest
1111

1212
steps:
13-
- uses: actions/checkout@v2
14-
- name: Set up Ruby 2.7
15-
uses: actions/setup-ruby@v1
13+
- uses: actions/checkout@v4
14+
- name: Set up Ruby 3.1
15+
uses: ruby/setup-ruby@v1
1616
with:
17-
ruby-version: 2.7.x
17+
ruby-version: '3.1.x'
1818
- name: Publish to GPR
1919
run: |
2020
mkdir -p $HOME/.gem

.rubocop.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
AllCops:
2-
TargetRubyVersion: 2.5
2+
TargetRubyVersion: 3.1
3+
NewCops: enable
34

45
Style/Documentation:
56
Enabled: false
67

78
Style/FrozenStringLiteralComment:
89
Enabled: false
910

10-
Metrics/LineLength:
11+
Layout/LineLength:
1112
Max: 120
12-
IgnoreCopDirectives: true
1313

1414
Metrics/BlockLength:
15-
ExcludedMethods:
15+
AllowedMethods:
1616
- configure
1717
- context
1818
- define

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.7.2
1+
3.3.0

CHANGELOG.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,15 +3,31 @@ 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-
## [Unreleased]
6+
## [0.6.0] - 2024-07-23
7+
8+
### Added
9+
- AI LLM Testing Methodology
10+
11+
## [0.5.2] - 2023-05-08
12+
13+
### Changed
14+
- Title of API Methodology updated
15+
16+
## [0.5.1] - 2023-04-06
17+
18+
### Changes
19+
- None; Version bump because we forgot to update the git submodule
20+
21+
## [0.5.0] - 2023-04-05
22+
23+
### Added
24+
- API Testing Methodology included
25+
26+
## [0.4.0] - 2023-03-03
27+
728
### Added
829
- support for methodologies v0.1
930
- Added new methodology for mobile_ios
1031
- Added new methodology for mobile_android
1132
- Added new methodology for binaries
1233
- Added new methodology for network
13-
- Added new methodology for Api Testing
14-
15-
### Changed
16-
17-
### Removed

Gemfile

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,12 @@ source 'https://rubygems.org'
22

33
# Specify your gem's dependencies in bmt-ruby.gemspec
44
gemspec
5+
6+
group :development do
7+
gem 'bundler', require: false
8+
gem 'pry', require: false
9+
gem 'rake', require: false
10+
gem 'rspec', require: false
11+
gem 'rubocop', require: false
12+
gem 'rubocop-performance', require: false
13+
end

bmt.gemspec

Lines changed: 5 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,20 @@ Gem::Specification.new do |spec|
77
spec.name = 'bmt'
88
spec.version = Bmt::VERSION
99
spec.platform = Gem::Platform::RUBY
10-
spec.authors = ['Federico Tagliabue']
11-
spec.email = ['[email protected]']
12-
spec.date = Date.today.to_s
10+
spec.authors = ['Federico Tagliabue', 'Andy White']
11+
1312
spec.summary = 'Ruby wrapper for Bugcrowd\'s Methodology Taxonomy'
1413
spec.homepage = 'https://github.com/bugcrowd/bmt-ruby'
1514
spec.license = 'MIT'
1615
spec.files = Dir['lib/**/*.{rb,json}']
1716
spec.require_paths = ['lib']
18-
spec.required_ruby_version = '>= 2.5'
19-
20-
spec.add_development_dependency 'bundler', '~> 2.1'
21-
spec.add_development_dependency 'pry', '~> 0.11'
22-
spec.add_development_dependency 'rake', '~> 12.3'
23-
spec.add_development_dependency 'rspec', '~> 3.6'
24-
spec.add_development_dependency 'rubocop', '0.56.0'
17+
spec.required_ruby_version = '>= 3.1'
2518

2619
spec.metadata = {
2720
'homepage_uri' => 'https://github.com/bugcrowd/bmt-ruby',
2821
'changelog_uri' => 'https://github.com/bugcrowd/bmt-ruby/blob/main/CHANGELOG.md',
2922
'source_code_uri' => 'https://github.com/bugcrowd/bmt-ruby',
30-
'bug_tracker_uri' => 'https://github.com/bugcrowd/bmt-ruby/issues'
23+
'bug_tracker_uri' => 'https://github.com/bugcrowd/bmt-ruby/issues',
24+
'rubygems_mfa_required' => 'true'
3125
}
3226
end

lib/bmt.rb

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ class MethodologyNotFoundError < StandardError; end
2020
# returns a Methodology object given a key and a version
2121
def find(key, version: current_version)
2222
raise VersionNotFoundError unless versions.include?(version)
23-
raise MethodologyNotFoundError unless methodology_keys(version: version).include?(key)
23+
raise MethodologyNotFoundError unless methodology_keys(version:).include?(key)
2424

2525
@methodologies[version].nil? && @methodologies[version] = {}
2626

2727
@methodologies[version][key] ||= Methodology.new(
28-
key: key,
29-
version: version,
30-
attributes: methodology_json(key, version: version)
28+
key:,
29+
version:,
30+
attributes: methodology_json(key, version:)
3131
)
3232

3333
@methodologies[version][key]
@@ -43,7 +43,7 @@ def methodology_keys(version: current_version)
4343
DATA_DIR.join(version, 'methodologies').entries
4444
.map(&:basename)
4545
.map(&:to_s)
46-
.select { |dirname| dirname =~ /json/ }
46+
.grep(/json/)
4747
.map { |filepath| File.basename(filepath, File.extname(filepath)) }
4848
end
4949

@@ -55,7 +55,7 @@ def versions
5555
end
5656

5757
def methodology_json(key, version: current_version)
58-
JSON.parse(methodology_pathname(key, version: version).read)
58+
JSON.parse(methodology_pathname(key, version:).read)
5959
end
6060

6161
def methodology_pathname(key, version: current_version)
@@ -67,6 +67,6 @@ def json_dir_names
6767
DATA_DIR.entries
6868
.map(&:basename)
6969
.map(&:to_s)
70-
.select { |dirname| dirname =~ /^[0-9]+\.[0-9]/ }.sort
70+
.grep(/^[0-9]+\.[0-9]/).sort
7171
end
7272
end

lib/bmt/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module Bmt
2-
VERSION = '0.5.2'.freeze
2+
VERSION = '0.6.0'.freeze
33
end

lib/data/0.1

0 commit comments

Comments
 (0)