metasploit_data_models 1.2.3 → 1.2.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
  SHA1:
3
- metadata.gz: 83f4eb115aa26dd700383c116a5ec6b375366ef1
4
- data.tar.gz: d56bf1bdb8501bdfcd5294c04ae6095a5e4f1dfe
3
+ metadata.gz: d60b2cfe141cf2b3ad7f5c68c4d2a6c1691efcf7
4
+ data.tar.gz: 1003666ecbc6ad0995736cbcd760bf9148f9bc28
5
5
  SHA512:
6
- metadata.gz: fd5314538018c26d8ff05e94904968fa84a54f78c1f5156c5394f69a9b00083eb43d37398e1569576cd9dc62f3b0aac7a7ed5f44b69518b0265d773c37ceb460
7
- data.tar.gz: ce758ea76068e7078ec25d8193ab6e1558a8f3ba4b1cb1e5f20e5f1add2e1fda516cb759b061c51d942a533be8796513bceb0f9d1543295e5eff7657d54e9029
6
+ metadata.gz: 2c9e27ed550c0ce6379b2e1a19ce0ada035fcb5d40526cb5b7617e6c59b27338b619071d87cedab183d20e9b7addecd77339664e9e9dd86eb1dbd92c54961af0
7
+ data.tar.gz: ef87d2788f0424aa1152f02f6c44947c92fd0a13603a316a99e8456cf90d3df42b46354ff8ac1236787b6b047f4bd9e56afdc14423c90fe2a611cca623239b29
@@ -82,11 +82,11 @@ class Mdm::Tag < ActiveRecord::Base
82
82
  validates :desc,
83
83
  :length => {
84
84
  :maximum => ((8 * (2 ** 10)) - 1),
85
- :message => "desc must be less than 8k."
85
+ :message => I18n.t('activerecord.ancestors.mdm/tag.model.errors.messages.length')
86
86
  }
87
87
  validates :name,
88
88
  :format => {
89
- :with => /\A[A-Za-z0-9\x2e\x2d_]+\z/, :message => "must be alphanumeric, dots, dashes, or underscores"
89
+ :with => /\A[A-Za-z0-9\x2e\x2d_]+\z/, :message => I18n.t('activerecord.ancestors.mdm/tag.model.errors.messages.character')
90
90
  },
91
91
  :presence => true
92
92
 
@@ -26,6 +26,12 @@ en:
26
26
  os_name:
27
27
  help: "Filters the results by operating system."
28
28
  mdm/tag:
29
+ model:
30
+ errors:
31
+ messages:
32
+ character: "Tag names can only contain alphanumeric characters, dots, dashes, and underscores."
33
+ length: "desc must be less than 8k."
34
+
29
35
  search:
30
36
  operator:
31
37
  names:
@@ -10,7 +10,8 @@ module MetasploitDataModels
10
10
  # The minor version number, scoped to the {MAJOR} version number.
11
11
  MINOR = 2
12
12
  # The patch version number, scoped to the {MAJOR} and {MINOR} version numbers.
13
- PATCH = 3
13
+ PATCH = 4
14
+
14
15
 
15
16
  #
16
17
  # Module Methods
@@ -37,6 +37,7 @@ RSpec.describe Mdm::Tag, type: :model do
37
37
  end
38
38
 
39
39
  context 'name' do
40
+ let(:error_msg) {I18n.t('activerecord.ancestors.mdm/tag.model.errors.messages.character')}
40
41
  it 'must be present' do
41
42
  nameless_tag = FactoryGirl.build(:mdm_tag, :name => nil)
42
43
  expect(nameless_tag).not_to be_valid
@@ -49,19 +50,19 @@ RSpec.describe Mdm::Tag, type: :model do
49
50
  #Test for various bad inputs we should never allow
50
51
  mytag = FactoryGirl.build(:mdm_tag, :name => "A'1")
51
52
  expect(mytag).not_to be_valid
52
- expect(mytag.errors[:name]).to include('must be alphanumeric, dots, dashes, or underscores')
53
+ expect(mytag.errors[:name]).to include(error_msg)
53
54
  mytag = FactoryGirl.build(:mdm_tag, :name => "A;1")
54
55
  expect(mytag).not_to be_valid
55
- expect(mytag.errors[:name]).to include('must be alphanumeric, dots, dashes, or underscores')
56
+ expect(mytag.errors[:name]).to include(error_msg)
56
57
  mytag = FactoryGirl.build(:mdm_tag, :name => "A%1")
57
58
  expect(mytag).not_to be_valid
58
- expect(mytag.errors[:name]).to include('must be alphanumeric, dots, dashes, or underscores')
59
+ expect(mytag.errors[:name]).to include(error_msg)
59
60
  mytag = FactoryGirl.build(:mdm_tag, :name => "A=1")
60
61
  expect(mytag).not_to be_valid
61
- expect(mytag.errors[:name]).to include('must be alphanumeric, dots, dashes, or underscores')
62
+ expect(mytag.errors[:name]).to include(error_msg)
62
63
  mytag = FactoryGirl.build(:mdm_tag, :name => "#A1")
63
64
  expect(mytag).not_to be_valid
64
- expect(mytag.errors[:name]).to include('must be alphanumeric, dots, dashes, or underscores')
65
+ expect(mytag.errors[:name]).to include(error_msg)
65
66
  end
66
67
  end
67
68
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metasploit_data_models
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Samuel Huckins
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-06-12 00:00:00.000000000 Z
14
+ date: 2015-06-16 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: metasploit-version