metasploit-model 4.0.1 → 4.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/verify.yml +6 -14
- data/Gemfile +4 -0
- data/README.md +19 -2
- data/lib/metasploit/model/version.rb +1 -1
- data/spec/support/shared/examples/metasploit/model/search/operator/help.rb +5 -7
- data.tar.gz.sig +0 -0
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a2b762eaa1f1b2130087f1be07ba839cd8acba7c9567c7e55f4595ab36f0926
|
4
|
+
data.tar.gz: c3338003885b9040014a78c7ab2c42d5f18e6f5feb92bfa2eefb59132c714bf6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 21206e3fe9a36035dd0d24b3b927966f5f8bb80ea44f4685db952fe40f0269b8387bd47107188b2aacc739cda8e545af6cbdf6027b4e3b113427d36334d161b1
|
7
|
+
data.tar.gz: 674b77564b3b4705776e89394db9a660bcf766052b1998e0e9d74b8009d18fed4ec938b56236e58fdd644b7a1a53351a512ac8f83f8e85f4be0f9be24027703c
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
@@ -10,7 +10,7 @@ on:
|
|
10
10
|
|
11
11
|
jobs:
|
12
12
|
test:
|
13
|
-
runs-on: ubuntu-
|
13
|
+
runs-on: ubuntu-18.04
|
14
14
|
timeout-minutes: 40
|
15
15
|
|
16
16
|
services:
|
@@ -30,9 +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
|
35
|
+
- 3.0
|
36
|
+
- 3.1
|
36
37
|
|
37
38
|
env:
|
38
39
|
RAILS_ENV: test
|
@@ -45,24 +46,15 @@ jobs:
|
|
45
46
|
- name: Checkout code
|
46
47
|
uses: actions/checkout@v2
|
47
48
|
|
48
|
-
-
|
49
|
+
- name: Setup Ruby
|
50
|
+
uses: ruby/setup-ruby@v1
|
49
51
|
with:
|
50
52
|
ruby-version: ${{ matrix.ruby }}
|
51
|
-
|
52
|
-
- name: Setup bundler
|
53
|
-
run: |
|
54
|
-
gem install bundler
|
55
|
-
|
56
|
-
- name: Bundle install
|
57
|
-
run: |
|
58
|
-
bundle config path vendor/bundle
|
59
|
-
bundle install --jobs 4 --retry 3
|
53
|
+
bundler-cache: true
|
60
54
|
|
61
55
|
- name: Test
|
62
56
|
run: |
|
63
|
-
gem install bundler
|
64
57
|
cp spec/dummy/config/database.yml.github_actions spec/dummy/config/database.yml
|
65
|
-
bundle install
|
66
58
|
bundle exec rake --version
|
67
59
|
bundle exec rake db:test:prepare
|
68
60
|
|
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
|
-
##
|
25
|
+
## Running tests
|
26
26
|
|
27
|
-
|
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
|
|
@@ -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
|
-
|
38
|
+
metasploit_model_translations = metasploit_translations.fetch(:model)
|
39
39
|
|
40
|
-
expect(
|
40
|
+
expect(metasploit_model_translations).not_to have_key(:ancestors)
|
41
41
|
|
42
|
-
|
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
|
-
|
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.
|
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:
|
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
|