metasploit-model 4.0.3 → 4.0.4

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: 4391972a69c6f80ed2aa061710505bf8de78e9f13f8b7e708251502e61b0d84b
4
- data.tar.gz: 7e783408df01d2427107fac62ab398e03230be44a5514950f9937a1acc749b61
3
+ metadata.gz: 7a2b762eaa1f1b2130087f1be07ba839cd8acba7c9567c7e55f4595ab36f0926
4
+ data.tar.gz: c3338003885b9040014a78c7ab2c42d5f18e6f5feb92bfa2eefb59132c714bf6
5
5
  SHA512:
6
- metadata.gz: f5c1ff354b848fa043f02810a34d2d6dfdf4135cb39326405d5f16d337973602f5f64093061abcfb8f2a9483b6ff945adcdb70c514900d7d5eb45920f9e41652
7
- data.tar.gz: fd3b71ed9debbfba6c73d4012e1ef284f4fc056661d2288328ce0816b80cfb1fef7a8e35797b0e6d1fcb6720fa9e9b5335dab51cde4fefb785a7031f37abb744
6
+ metadata.gz: 21206e3fe9a36035dd0d24b3b927966f5f8bb80ea44f4685db952fe40f0269b8387bd47107188b2aacc739cda8e545af6cbdf6027b4e3b113427d36334d161b1
7
+ data.tar.gz: 674b77564b3b4705776e89394db9a660bcf766052b1998e0e9d74b8009d18fed4ec938b56236e58fdd644b7a1a53351a512ac8f83f8e85f4be0f9be24027703c
checksums.yaml.gz.sig CHANGED
Binary file
@@ -30,10 +30,10 @@ jobs:
30
30
  fail-fast: true
31
31
  matrix:
32
32
  ruby:
33
- - 2.5
34
33
  - 2.6
35
34
  - 2.7
36
35
  - 3.0
36
+ - 3.1
37
37
 
38
38
  env:
39
39
  RAILS_ENV: test
data/Gemfile CHANGED
@@ -3,6 +3,10 @@ source 'https://rubygems.org'
3
3
  # Specify your gem's dependencies in metasploit-model.gemspec
4
4
  gemspec
5
5
 
6
+ group :development do
7
+ gem 'pry-byebug'
8
+ end
9
+
6
10
  # used by dummy application
7
11
  group :development, :test do
8
12
  # supplies factories for producing model instance for specs
data/README.md CHANGED
@@ -22,9 +22,26 @@ Or install it yourself as:
22
22
 
23
23
  $ gem install metasploit-model
24
24
 
25
- ## Usage
25
+ ## Running tests
26
26
 
27
- TODO: Write usage instructions here
27
+ Copy the database configuration and modify as appropriate:
28
+
29
+ ```
30
+ cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
31
+ ```
32
+
33
+ Set up the database:
34
+
35
+ ```
36
+ bundle exec rake db:test:prepare
37
+ bundle exec rake db:migrate RAILS_ENV=test
38
+ ```
39
+
40
+ Run the test suite:
41
+
42
+ ```
43
+ bundle exec rspec
44
+ ```
28
45
 
29
46
  ## Contributing
30
47
 
@@ -1,7 +1,7 @@
1
1
  module Metasploit
2
2
  module Model
3
3
  # VERSION is managed by GemRelease
4
- VERSION = '4.0.3'
4
+ VERSION = '4.0.4'
5
5
 
6
6
  # @return [String]
7
7
  #
@@ -32,14 +32,14 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operator::Help' do
32
32
  backend.send(:init_translations)
33
33
  end
34
34
 
35
- translations_by_locale = I18n.backend.send(:translations)
35
+ translations_by_locale = I18n.backend.send(:translations).deep_dup
36
36
  english_translations = translations_by_locale.fetch(:en)
37
37
  metasploit_translations = english_translations.fetch(:metasploit)
38
- @metasploit_model_translations = metasploit_translations.fetch(:model)
38
+ metasploit_model_translations = metasploit_translations.fetch(:model)
39
39
 
40
- expect(@metasploit_model_translations).not_to have_key(:ancestors)
40
+ expect(metasploit_model_translations).not_to have_key(:ancestors)
41
41
 
42
- @metasploit_model_translations[:ancestors] = {
42
+ metasploit_model_translations[:ancestors] = {
43
43
  klass.model_name.i18n_key => {
44
44
  search: {
45
45
  operator: {
@@ -52,10 +52,8 @@ RSpec.shared_examples_for 'Metasploit::Model::Search::Operator::Help' do
52
52
  }
53
53
  }
54
54
  }
55
- end
56
55
 
57
- after(:example) do
58
- @metasploit_model_translations.delete(:ancestors)
56
+ allow(I18n.backend).to receive(:translations).and_return(translations_by_locale)
59
57
  end
60
58
 
61
59
  it 'should use #klass #i18n_scope to lookup translations specific to the #klass or one of its ancestors' do
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit-model
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.3
4
+ version: 4.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Metasploit Hackers
@@ -93,7 +93,7 @@ cert_chain:
93
93
  EknWpNgVhohbot1lfVAMmIhdtOVaRVcQQixWPwprDj/ydB8ryDMDosIMcw+fkoXU
94
94
  9GJsSaSRRYQ9UUkVL27b64okU8D48m8=
95
95
  -----END CERTIFICATE-----
96
- date: 2021-09-16 00:00:00.000000000 Z
96
+ date: 2022-04-07 00:00:00.000000000 Z
97
97
  dependencies:
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: metasploit-yard
metadata.gz.sig CHANGED
Binary file