ronin-db-activerecord 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.md +6 -0
- data/README.md +1 -3
- data/gemspec.yml +2 -2
- data/lib/ronin/db/migrations.rb +2 -19
- 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: 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/ChangeLog.md
CHANGED
@@ -1,3 +1,9 @@
|
|
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
|
+
|
1
7
|
### 0.1.3 / 2023-10-14
|
2
8
|
|
3
9
|
* Require [activerecord] `~> 7.0, < 7.1.0`.
|
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.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
|
@@ -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/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-10-
|
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
|
@@ -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
|