ronin-db-activerecord 0.1.2 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/workflows/ruby.yml +2 -2
- data/ChangeLog.md +13 -0
- data/gemspec.yml +1 -1
- data/lib/ronin/db/migrations.rb +2 -19
- metadata +2 -3
- 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: 33a8e923e83f3f3d8441d721b7840a370b230c6bb055c0eee04ddb87e380ecc0
|
4
|
+
data.tar.gz: a54ff9c9fa40b79e4271122467f9335091943980ab488ed5ef2a3a0f7ba93d29
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f99534027f46f48308b13038a0d91c0dcb462903d662f37580bab90ca0b08c94a9354d9dfef63a138244f57e9e3c6fc2158a993cfbee12ee551244a22124b6ba
|
7
|
+
data.tar.gz: 823b4b5a7efdcbdabeede52192e55bedcd4341c356d8679fa4a0782d7c4c686fd12a27b7c0ef8424175449a861c33caf7b3764de16e38a039ed7f8ee130cc9d3
|
data/.github/workflows/ruby.yml
CHANGED
@@ -16,7 +16,7 @@ jobs:
|
|
16
16
|
- truffleruby
|
17
17
|
name: Ruby ${{ matrix.ruby }}
|
18
18
|
steps:
|
19
|
-
- uses: actions/checkout@
|
19
|
+
- uses: actions/checkout@v4
|
20
20
|
- name: Set up Ruby
|
21
21
|
uses: ruby/setup-ruby@v1
|
22
22
|
with:
|
@@ -35,7 +35,7 @@ jobs:
|
|
35
35
|
rubocop:
|
36
36
|
runs-on: ubuntu-latest
|
37
37
|
steps:
|
38
|
-
- uses: actions/checkout@
|
38
|
+
- uses: actions/checkout@v4
|
39
39
|
- name: Set up Ruby
|
40
40
|
uses: ruby/setup-ruby@v1
|
41
41
|
with:
|
data/ChangeLog.md
CHANGED
@@ -1,3 +1,15 @@
|
|
1
|
+
### 0.1.4 / 2023-10-16
|
2
|
+
|
3
|
+
* Require [activerecord] `~> 7.0`.
|
4
|
+
* Switched to using the default `schema_migrations` table for storing migration
|
5
|
+
versions and avoid using ActiveRecord's private API.
|
6
|
+
|
7
|
+
### 0.1.3 / 2023-10-14
|
8
|
+
|
9
|
+
* Require [activerecord] `~> 7.0, < 7.1.0`.
|
10
|
+
* **Note:** [activerecord] 7.1.0 changed it's internal migration APIs which
|
11
|
+
`ronin-db-activerecord` was using to run migrations.
|
12
|
+
|
1
13
|
### 0.1.2 / 2023-09-19
|
2
14
|
|
3
15
|
* Fix {Ronin::DB::MACAddress#address} validation regex to match the whole
|
@@ -54,3 +66,4 @@
|
|
54
66
|
* {Ronin::DB::Vulnerability}
|
55
67
|
* {Ronin::DB::WebCredential}
|
56
68
|
|
69
|
+
[activerecord]: https://github.com/rails/rails/tree/main/activerecord#readme
|
data/gemspec.yml
CHANGED
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
|
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.4
|
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-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: uri-query_params
|
@@ -141,7 +141,6 @@ files:
|
|
141
141
|
- lib/ronin/db/os_guess.rb
|
142
142
|
- lib/ronin/db/password.rb
|
143
143
|
- lib/ronin/db/port.rb
|
144
|
-
- lib/ronin/db/schema_migration.rb
|
145
144
|
- lib/ronin/db/service.rb
|
146
145
|
- lib/ronin/db/service_credential.rb
|
147
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
|