metasploit-erd 3.0.2 → 4.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 734f972ac50cadb23d37c83099d61132ec43e01c4af6872531be3aa5c063b4a8
4
- data.tar.gz: 34cbc519ee6d107e64b9a4e18f9b9e2d84563f987be6747469a3736953f16461
3
+ metadata.gz: 0cbc0c8942a56262c657c4999b6a41aef1c8d98178398e58c395340fb0572094
4
+ data.tar.gz: 911e2e4a3f8300a70ed7a89743d774c694f25b360009d63f8969ee8911e0430d
5
5
  SHA512:
6
- metadata.gz: ec97c2af7fe26753ca39bb8738ca762a5a314ea8649641c0a8f7de90c6b392634806aaa321f04ce0fb531b54d5ca12aeb3cf0e06d6d221d4d0dd0a3b58d0c4d4
7
- data.tar.gz: d6d090cc84609d9bffa881af8ba150674baa7af3ed0debc09056e132bf7de6242f6e03ac744d0edc47a99416a43f7d1a65f434b01e8a6d2c2cc2d657247e5e1b
6
+ metadata.gz: 9aff92fe3185e89966f4f7ddda211704a12740f6abec91d4d2afe25417486b627a53d987f848583f48095eed355e03f86435348aa8bb4c2c066987a9e63207ef
7
+ data.tar.gz: bb38953c08d8ffd8a74355c71b464c0fd4a093e9d110e1356b77686dfea7f0751c271a60586cff1438f1acb9475bf2091673338d088db9a3437373a37d7a50c3
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
data/Gemfile CHANGED
@@ -12,8 +12,6 @@ group :development do
12
12
  end
13
13
 
14
14
  group :test do
15
- # blank?
16
- gem 'activesupport', '~> 5.2.2'
17
15
  # code coverage of tests
18
16
  gem 'simplecov', :require => false
19
17
  # in-memory database for ActiveRecord association traversal
@@ -31,7 +31,7 @@ class Metasploit::ERD::Entity::Namespace
31
31
  # @return [Array<Class<ActiveRecord::Base>
32
32
  def classes
33
33
  ActiveRecord::Base.descendants.select { |klass|
34
- klass.parents.any? { |parent|
34
+ klass.module_parents.any? { |parent|
35
35
  parent.name == namespace_name
36
36
  }
37
37
  }
@@ -63,4 +63,4 @@ class Metasploit::ERD::Entity::Namespace
63
63
 
64
64
  super(super_options)
65
65
  end
66
- end
66
+ end
@@ -1,7 +1,7 @@
1
1
  module Metasploit
2
2
  module ERD
3
3
  # VERSION is managed by GemRelease
4
- VERSION = '3.0.2'
4
+ VERSION = '4.0.0'
5
5
 
6
6
  # @return [String]
7
7
  #
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
25
25
  spec.add_development_dependency 'rake'
26
26
  spec.add_development_dependency 'rspec'
27
27
 
28
- spec.add_runtime_dependency 'activerecord', '~> 5.2.2'
29
- spec.add_runtime_dependency 'activesupport', '~> 5.2.2'
28
+ spec.add_runtime_dependency 'activerecord', '~> 6.0'
29
+ spec.add_runtime_dependency 'activesupport', '~> 6.0'
30
30
  spec.add_runtime_dependency 'rails-erd'
31
31
  end
@@ -124,13 +124,10 @@ RSpec.describe Metasploit::ERD::Relationship do
124
124
 
125
125
  ActiveRecord::Migration.create_table :owners do |t|
126
126
  t.references :thing
127
-
128
- t.timestamp
129
127
  end
130
128
 
131
129
  things.each do |thing|
132
130
  ActiveRecord::Migration.create_table thing.table_name do |t|
133
- t.timestamp
134
131
  end
135
132
  end
136
133
  end
@@ -210,8 +207,6 @@ RSpec.describe Metasploit::ERD::Relationship do
210
207
  group_names.each do |group_name|
211
208
  t.references group_name.underscore.to_sym
212
209
  end
213
-
214
- t.timestamp
215
210
  end
216
211
 
217
212
  polymorphics_by_group_name.each do |group_name, polymorphics|
@@ -241,4 +236,4 @@ RSpec.describe Metasploit::ERD::Relationship do
241
236
  end
242
237
  end
243
238
  end
244
- end
239
+ end
@@ -7,6 +7,6 @@ RSpec.shared_context 'ActiveRecord::Base connection' do
7
7
  end
8
8
 
9
9
  after(:example) do
10
- ActiveRecord::Base.connection.disconnect!
10
+ ActiveRecord::Base.connection.disconnect! rescue nil
11
11
  end
12
- end
12
+ end
@@ -6,6 +6,12 @@ RSpec.shared_context 'ActiveRecord::Base.descendants cleaner' do
6
6
  after(:example) do
7
7
  # `ActiveSupport::DescendantsTracker.clear` will not clear ActiveRecord::Base subclasses because
8
8
  # ActiveSupport::Dependencies is loaded
9
- ActiveRecord::Base.direct_descendants.clear
9
+ if ActiveRecord.version >= Gem::Version.new("6.0.0.rc1")
10
+ cv = ActiveSupport::DescendantsTracker.class_variable_get(:@@direct_descendants)
11
+ cv.delete(ActiveRecord::Base)
12
+ ActiveSupport::DescendantsTracker.class_variable_set(:@@direct_descendants, cv)
13
+ else
14
+ ActiveRecord::Base.direct_descendants.clear
15
+ end
10
16
  end
11
- end
17
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-erd
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.2
4
+ version: 4.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -143,28 +143,28 @@ dependencies:
143
143
  requirements:
144
144
  - - "~>"
145
145
  - !ruby/object:Gem::Version
146
- version: 5.2.2
146
+ version: '6.0'
147
147
  type: :runtime
148
148
  prerelease: false
149
149
  version_requirements: !ruby/object:Gem::Requirement
150
150
  requirements:
151
151
  - - "~>"
152
152
  - !ruby/object:Gem::Version
153
- version: 5.2.2
153
+ version: '6.0'
154
154
  - !ruby/object:Gem::Dependency
155
155
  name: activesupport
156
156
  requirement: !ruby/object:Gem::Requirement
157
157
  requirements:
158
158
  - - "~>"
159
159
  - !ruby/object:Gem::Version
160
- version: 5.2.2
160
+ version: '6.0'
161
161
  type: :runtime
162
162
  prerelease: false
163
163
  version_requirements: !ruby/object:Gem::Requirement
164
164
  requirements:
165
165
  - - "~>"
166
166
  - !ruby/object:Gem::Version
167
- version: 5.2.2
167
+ version: '6.0'
168
168
  - !ruby/object:Gem::Dependency
169
169
  name: rails-erd
170
170
  requirement: !ruby/object:Gem::Requirement
metadata.gz.sig CHANGED
Binary file