ronin-db-activerecord 0.1.3 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +13 -0
- data/Gemfile +1 -1
- data/README.md +1 -3
- data/gemspec.yml +2 -2
- data/lib/ronin/db/arch.rb +1 -1
- data/lib/ronin/db/http_request.rb +18 -18
- data/lib/ronin/db/migrations.rb +2 -19
- data/lib/ronin/db/os.rb +1 -1
- data/lib/ronin/db/port.rb +1 -1
- metadata +2 -9
- data/lib/ronin/db/schema_migration.rb +0 -34
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 35997b96261ef5eff4b50913690276c01e5c252984575aaed1cb2043c54e420f
|
4
|
+
data.tar.gz: 97fb7f0f80518d129b4919e12787fb837a2a1090a67fa3d443f8f46f067a26aa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f21ffa2cc2243a506e1338bf64f14dbcf6dd99605a25ac49b0a05f5e5298dfa43e2dbbedb50c74df9cb06ea74e35f33d6ce2bee1cc0ffa018c40aa194d9108a4
|
7
|
+
data.tar.gz: 6f04a43848ab8faccb4e779d8f999de7cc51a669a935dddf0ec1e7a7d3f314a202355cbe114d29bfe70c49e55ec92a7cd4e9f2dcf7fba535013587f6d248bdc7
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,16 @@
|
|
1
|
+
### 0.1.5 / 2023-12-13
|
2
|
+
|
3
|
+
* Corrected {Ronin::DB::HTTPRequest#request_method} to accept and store
|
4
|
+
uppercase HTTP verbs (ex: `GET`).
|
5
|
+
* Corrected {Ronin::DB::HTTPRequest#request_method} helper methods to use the
|
6
|
+
singular suffix of `_request?` (ex: `get_request?`).
|
7
|
+
|
8
|
+
### 0.1.4 / 2023-10-16
|
9
|
+
|
10
|
+
* Require [activerecord] `~> 7.0`.
|
11
|
+
* Switched to using the default `schema_migrations` table for storing migration
|
12
|
+
versions and avoid using ActiveRecord's private API.
|
13
|
+
|
1
14
|
### 0.1.3 / 2023-10-14
|
2
15
|
|
3
16
|
* Require [activerecord] `~> 7.0, < 7.1.0`.
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -120,9 +120,7 @@ Ronin::DB::Models.connect
|
|
120
120
|
## Requirements
|
121
121
|
|
122
122
|
* [Ruby] >= 3.0.0
|
123
|
-
* [activerecord] ~> 7.0
|
124
|
-
* **Note:** [activerecord] 7.1.0 changed it's internal migration APIs which
|
125
|
-
`ronin-db-activerecord` was using to run migrations.
|
123
|
+
* [activerecord] ~> 7.0
|
126
124
|
|
127
125
|
## Install
|
128
126
|
|
data/gemspec.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
name: ronin-db-activerecord
|
2
|
-
version: 0.1.
|
2
|
+
version: 0.1.5
|
3
3
|
summary: ActiveRecord backend for the Ronin Database
|
4
4
|
description:
|
5
5
|
ronin-db-activerecord contains ActiveRecord models and migrations for the
|
@@ -22,7 +22,7 @@ required_ruby_version: ">= 3.0.0"
|
|
22
22
|
|
23
23
|
dependencies:
|
24
24
|
uri-query_params: ~> 0.6
|
25
|
-
activerecord: ~> 7.0
|
25
|
+
activerecord: ~> 7.0
|
26
26
|
|
27
27
|
development_dependencies:
|
28
28
|
bundler: ~> 2.0
|
data/lib/ronin/db/arch.rb
CHANGED
@@ -48,24 +48,24 @@ module Ronin
|
|
48
48
|
# @!attribute [rw] request_method
|
49
49
|
# The request method.
|
50
50
|
#
|
51
|
-
# @return [
|
52
|
-
enum request_method:
|
53
|
-
:
|
54
|
-
:
|
55
|
-
:
|
56
|
-
:
|
57
|
-
:
|
58
|
-
:
|
59
|
-
:
|
60
|
-
:
|
61
|
-
:
|
62
|
-
:
|
63
|
-
:
|
64
|
-
:
|
65
|
-
:
|
66
|
-
:
|
67
|
-
:
|
68
|
-
|
51
|
+
# @return ["copy", "delete", "get", "head", "lock", "mkcol", "move", "options", "patch", "post", "propfind", "proppatch", "put", "trace", "unlock"]
|
52
|
+
enum request_method: {
|
53
|
+
copy: 'COPY',
|
54
|
+
delete: 'DELETE',
|
55
|
+
get: 'GET',
|
56
|
+
head: 'HEAD',
|
57
|
+
lock: 'LOCK',
|
58
|
+
mkcol: 'MKCOL',
|
59
|
+
move: 'MOVE',
|
60
|
+
options: 'OPTIONS',
|
61
|
+
patch: 'PATCH',
|
62
|
+
post: 'POST',
|
63
|
+
propfind: 'PROPFIND',
|
64
|
+
proppatch: 'PROPPATCH',
|
65
|
+
put: 'PUT',
|
66
|
+
trace: 'TRACE',
|
67
|
+
unlock: 'UNLOCK'
|
68
|
+
}, _suffix: :request
|
69
69
|
validates :request_method, presence: true
|
70
70
|
|
71
71
|
# @!attribute [rw] path
|
data/lib/ronin/db/migrations.rb
CHANGED
@@ -18,8 +18,6 @@
|
|
18
18
|
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
19
19
|
#
|
20
20
|
|
21
|
-
require 'ronin/db/schema_migration'
|
22
|
-
|
23
21
|
require 'active_record'
|
24
22
|
require 'active_record/migration'
|
25
23
|
|
@@ -110,30 +108,15 @@ module Ronin
|
|
110
108
|
# Path to the `db/migrate/` directory in `ronin-db-activerecord`.
|
111
109
|
DIR = File.expand_path('../../../db/migrate',__dir__)
|
112
110
|
|
113
|
-
#
|
114
|
-
# Extensions `ActiveRecord::MigrationContext` to load our migrations from
|
115
|
-
# the `db/migrate/` directory and update our
|
116
|
-
# `ronin_schema_migration` table.
|
117
|
-
#
|
118
|
-
# @api private
|
119
|
-
#
|
120
|
-
class MigrationContext < ActiveRecord::MigrationContext
|
121
|
-
|
122
|
-
def initialize
|
123
|
-
super([Ronin::DB::Migrations::DIR],Ronin::DB::SchemaMigration)
|
124
|
-
end
|
125
|
-
|
126
|
-
end
|
127
|
-
|
128
111
|
#
|
129
112
|
# The migration context.
|
130
113
|
#
|
131
|
-
# @return [MigrationContext]
|
114
|
+
# @return [ActiveRecord::MigrationContext]
|
132
115
|
#
|
133
116
|
# @api private
|
134
117
|
#
|
135
118
|
def self.context
|
136
|
-
@context ||= MigrationContext.new
|
119
|
+
@context ||= ActiveRecord::MigrationContext.new([DIR])
|
137
120
|
end
|
138
121
|
end
|
139
122
|
end
|
data/lib/ronin/db/os.rb
CHANGED
data/lib/ronin/db/port.rb
CHANGED
@@ -40,7 +40,7 @@ module Ronin
|
|
40
40
|
# @!attribute [rw] protocol
|
41
41
|
# The protocol of the port (either `'tcp'` / `'udp'`).
|
42
42
|
#
|
43
|
-
# @return [
|
43
|
+
# @return ["tcp", "udp"]
|
44
44
|
enum :protocol, {tcp: 'tcp', udp: 'udp'}, default: :tcp
|
45
45
|
validates :protocol, presence: true
|
46
46
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ronin-db-activerecord
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Postmodern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri-query_params
|
@@ -31,9 +31,6 @@ dependencies:
|
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '7.0'
|
34
|
-
- - "<"
|
35
|
-
- !ruby/object:Gem::Version
|
36
|
-
version: 7.1.0
|
37
34
|
type: :runtime
|
38
35
|
prerelease: false
|
39
36
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -41,9 +38,6 @@ dependencies:
|
|
41
38
|
- - "~>"
|
42
39
|
- !ruby/object:Gem::Version
|
43
40
|
version: '7.0'
|
44
|
-
- - "<"
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
version: 7.1.0
|
47
41
|
- !ruby/object:Gem::Dependency
|
48
42
|
name: bundler
|
49
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -147,7 +141,6 @@ files:
|
|
147
141
|
- lib/ronin/db/os_guess.rb
|
148
142
|
- lib/ronin/db/password.rb
|
149
143
|
- lib/ronin/db/port.rb
|
150
|
-
- lib/ronin/db/schema_migration.rb
|
151
144
|
- lib/ronin/db/service.rb
|
152
145
|
- lib/ronin/db/service_credential.rb
|
153
146
|
- lib/ronin/db/software.rb
|
@@ -1,34 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
#
|
3
|
-
# ronin-db-activerecord - ActiveRecord backend for the Ronin Database.
|
4
|
-
#
|
5
|
-
# Copyright (c) 2022-2023 Hal Brodigan (postmodern.mod3 at gmail.com)
|
6
|
-
#
|
7
|
-
# ronin-db-activerecord is free software: you can redistribute it and/or modify
|
8
|
-
# it under the terms of the GNU Lesser General Public License as published
|
9
|
-
# by the Free Software Foundation, either version 3 of the License, or
|
10
|
-
# (at your option) any later version.
|
11
|
-
#
|
12
|
-
# ronin-db-activerecord is distributed in the hope that it will be useful,
|
13
|
-
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
# GNU Lesser General Public License for more details.
|
16
|
-
#
|
17
|
-
# You should have received a copy of the GNU Lesser General Public License
|
18
|
-
# along with ronin-db-activerecord. If not, see <https://www.gnu.org/licenses/>.
|
19
|
-
#
|
20
|
-
|
21
|
-
require 'active_record'
|
22
|
-
require 'active_record/schema_migration'
|
23
|
-
|
24
|
-
module Ronin
|
25
|
-
module DB
|
26
|
-
#
|
27
|
-
# Represents the `ronin_schema_migrations` table which tracks the applied
|
28
|
-
# migrations.
|
29
|
-
#
|
30
|
-
class SchemaMigration < ActiveRecord::SchemaMigration
|
31
|
-
self.table_name_prefix = 'ronin_'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
end
|