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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 103e3bf44773b89e137e7fbeb233068092132fa2cb84f2853c279656a5840161
4
- data.tar.gz: 8ccbc6e458538cac41520f2af05bb3c5ce84d99c1052c7a47febb1138293cbc4
3
+ metadata.gz: 33a8e923e83f3f3d8441d721b7840a370b230c6bb055c0eee04ddb87e380ecc0
4
+ data.tar.gz: a54ff9c9fa40b79e4271122467f9335091943980ab488ed5ef2a3a0f7ba93d29
5
5
  SHA512:
6
- metadata.gz: 4dc6c76ee2a87f82d3f184c42c5236e821f626c33563d88c22bab7d5482c0493a8fbfc88568757c3c7791868cf2476398103d6e0687c2acf164efede7c3d73cd
7
- data.tar.gz: 33e06032f67edc6022bb39f33ab70ede1ca2fcf49f11677b926e7c41ee55a8e292c94f052065f9ea6ac8caefc49550691e56db86ffa5ea481111c0edad3c130a
6
+ metadata.gz: f99534027f46f48308b13038a0d91c0dcb462903d662f37580bab90ca0b08c94a9354d9dfef63a138244f57e9e3c6fc2158a993cfbee12ee551244a22124b6ba
7
+ data.tar.gz: 823b4b5a7efdcbdabeede52192e55bedcd4341c356d8679fa4a0782d7c4c686fd12a27b7c0ef8424175449a861c33caf7b3764de16e38a039ed7f8ee130cc9d3
@@ -16,7 +16,7 @@ jobs:
16
16
  - truffleruby
17
17
  name: Ruby ${{ matrix.ruby }}
18
18
  steps:
19
- - uses: actions/checkout@v2
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@v2
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
@@ -1,5 +1,5 @@
1
1
  name: ronin-db-activerecord
2
- version: 0.1.2
2
+ version: 0.1.4
3
3
  summary: ActiveRecord backend for the Ronin Database
4
4
  description:
5
5
  ronin-db-activerecord contains ActiveRecord models and migrations for the
@@ -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.2
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-09-19 00:00:00.000000000 Z
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