structured-acceptance-test 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/lib/JSONable.rb +13 -0
- data/lib/category.rb +7 -0
- data/lib/detail.rb +33 -0
- data/lib/duplicate_element_exception.rb +4 -0
- data/lib/finding.rb +103 -0
- data/lib/fix.rb +28 -0
- data/lib/location.rb +55 -0
- data/lib/process.rb +76 -0
- data/lib/repeatability.rb +7 -0
- data/lib/stat.rb +45 -0
- data/lib/type_exception.rb +4 -0
- metadata +56 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA1:
|
|
3
|
+
metadata.gz: db1011b13e229f0bcc5b3aad85cf5b8a0ba76b88
|
|
4
|
+
data.tar.gz: 3b70de0a60d7e732f202750c2621caa9e12101dd
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: d664c6933b6020e761babc9a150c6f54ed11530773376b8bec829ea1b1d95240fe66b85dfbd13389393484b4fcc7467cf5c3c8bc1995d320b8c75c53cacc16fe
|
|
7
|
+
data.tar.gz: b8efc5f4ed1f9319772807479e10a3b47e7125b919983fd6646fc4dbe955d8e61ea0d7195aae1a9cae45772ce61a44685f4bdfa56d991d1f5b9ff9db49f91321
|
data/lib/JSONable.rb
ADDED
data/lib/category.rb
ADDED
data/lib/detail.rb
ADDED
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
module StatModule
|
|
2
|
+
require_relative 'JSONable'
|
|
3
|
+
|
|
4
|
+
class Detail < JSONable
|
|
5
|
+
|
|
6
|
+
def initialize(body)
|
|
7
|
+
@body = body
|
|
8
|
+
@trace = []
|
|
9
|
+
end
|
|
10
|
+
|
|
11
|
+
def body=(body)
|
|
12
|
+
raise TypeException unless body.is_a?(String)
|
|
13
|
+
@body = body
|
|
14
|
+
end
|
|
15
|
+
|
|
16
|
+
def body
|
|
17
|
+
@body
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def trace=(trace)
|
|
21
|
+
raise TypeException unless trace.is_a?(Array)
|
|
22
|
+
trace.each { |item|
|
|
23
|
+
raise TypeException unless item.is_a?(StatModule::Location)
|
|
24
|
+
raise DuplicateElementException if @trace.include?(item)
|
|
25
|
+
@trace.push(item)
|
|
26
|
+
}
|
|
27
|
+
end
|
|
28
|
+
|
|
29
|
+
def trace
|
|
30
|
+
@trace
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
data/lib/finding.rb
ADDED
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
module StatModule
|
|
2
|
+
require_relative 'JSONable'
|
|
3
|
+
|
|
4
|
+
class Finding < JSONable
|
|
5
|
+
|
|
6
|
+
def initialize(failure, rule, description)
|
|
7
|
+
raise TypeException unless rule.is_a?(String) && description.is_a?(String)
|
|
8
|
+
@failure = failure
|
|
9
|
+
@rule = rule
|
|
10
|
+
@description = description
|
|
11
|
+
@categories = []
|
|
12
|
+
@fixes = []
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def failure=(failure)
|
|
16
|
+
@failure = failure
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def failure
|
|
20
|
+
@failure
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def rule=(rule)
|
|
24
|
+
raise TypeException unless rule.is_a?(String)
|
|
25
|
+
@rule = rule
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def rule
|
|
29
|
+
@rule
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def description=(description)
|
|
33
|
+
raise TypeException unless description.is_a?(String)
|
|
34
|
+
@description = description
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def description
|
|
38
|
+
@description
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def detail=(detail)
|
|
42
|
+
raise TypeException unless detail.is_a?(StatModule::Detail)
|
|
43
|
+
@detail = detail
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def detail
|
|
47
|
+
@detail
|
|
48
|
+
end
|
|
49
|
+
|
|
50
|
+
def categories=(categories)
|
|
51
|
+
raise TypeException unless categories.is_a?(Array)
|
|
52
|
+
categories.each { |item|
|
|
53
|
+
raise TypeException unless Category.all.include?(item)
|
|
54
|
+
raise DuplicateElementException if @categories.include?(item)
|
|
55
|
+
@categories.push(item)
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
def categories
|
|
60
|
+
@categories
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def location=(location)
|
|
64
|
+
raise TypeException unless location.is_a?(Location)
|
|
65
|
+
@location = location
|
|
66
|
+
end
|
|
67
|
+
|
|
68
|
+
def location
|
|
69
|
+
@location
|
|
70
|
+
end
|
|
71
|
+
|
|
72
|
+
def time_to_fix=(time_to_fix)
|
|
73
|
+
raise TypeException unless time_to_fix.is_a?(Integer)
|
|
74
|
+
@timeToFix = time_to_fix
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def time_to_fix
|
|
78
|
+
@timeToFix
|
|
79
|
+
end
|
|
80
|
+
|
|
81
|
+
def recommendation=(recommendation)
|
|
82
|
+
raise TypeException unless recommendation.is_a?(String)
|
|
83
|
+
@recommendation = recommendation
|
|
84
|
+
end
|
|
85
|
+
|
|
86
|
+
def recommendation
|
|
87
|
+
@recommendation
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
def fixes=(fixes)
|
|
91
|
+
raise TypeException unless fixes.is_a?(Array)
|
|
92
|
+
@fixes.each { |item|
|
|
93
|
+
raise TypeException unless item.is_a?(StatModule::Fix)
|
|
94
|
+
raise DuplicateElementException if @fixes.include?(item)
|
|
95
|
+
@fixes.push(item)
|
|
96
|
+
}
|
|
97
|
+
end
|
|
98
|
+
|
|
99
|
+
def fixes
|
|
100
|
+
@fixes
|
|
101
|
+
end
|
|
102
|
+
end
|
|
103
|
+
end
|
data/lib/fix.rb
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
module StatModule
|
|
2
|
+
require_relative 'JSONable'
|
|
3
|
+
|
|
4
|
+
class Fix < JSONable
|
|
5
|
+
|
|
6
|
+
def initialize(location)
|
|
7
|
+
@location = location
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def location=(location)
|
|
11
|
+
raise TypeException unless location.is_a?(StatModule::Location)
|
|
12
|
+
@location = location
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def location
|
|
16
|
+
@location
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def new_text=(new_text)
|
|
20
|
+
raise TypeException unless new_text.is_a?(String)
|
|
21
|
+
@newText = new_text
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def new_text
|
|
25
|
+
@newText
|
|
26
|
+
end
|
|
27
|
+
end
|
|
28
|
+
end
|
data/lib/location.rb
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
module StatModule
|
|
2
|
+
require_relative 'JSONable'
|
|
3
|
+
|
|
4
|
+
class Location < JSONable
|
|
5
|
+
|
|
6
|
+
def initialize(path)
|
|
7
|
+
@path = path
|
|
8
|
+
end
|
|
9
|
+
|
|
10
|
+
def path=(path)
|
|
11
|
+
raise TypeException unless path.is_a?(String)
|
|
12
|
+
@path = path
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def path
|
|
16
|
+
@path
|
|
17
|
+
end
|
|
18
|
+
|
|
19
|
+
def begin_line=(begin_line)
|
|
20
|
+
raise TypeException unless begin_line.is_a?(Integer)
|
|
21
|
+
@beginLine = begin_line
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def begin_line
|
|
25
|
+
@beginLine
|
|
26
|
+
end
|
|
27
|
+
|
|
28
|
+
def begin_column=(begin_column)
|
|
29
|
+
raise TypeException unless begin_column.is_a?(Integer)
|
|
30
|
+
@beginColumn = begin_column
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
def begin_column
|
|
34
|
+
@beginColumn
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
def end_line=(end_line)
|
|
38
|
+
raise TypeException unless end_line.is_a?(Integer)
|
|
39
|
+
@endLine = end_line
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
def end_line
|
|
43
|
+
@endLine
|
|
44
|
+
end
|
|
45
|
+
|
|
46
|
+
def end_column=(end_column)
|
|
47
|
+
raise TypeException unless end_column.is_a?(Integer)
|
|
48
|
+
@endColumn = end_column
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
def end_column
|
|
52
|
+
@endColumn
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
data/lib/process.rb
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
module StatModule
|
|
2
|
+
|
|
3
|
+
require_relative 'JSONable'
|
|
4
|
+
|
|
5
|
+
class Process < JSONable
|
|
6
|
+
|
|
7
|
+
def initialize(name)
|
|
8
|
+
raise TypeException unless name.is_a?(String)
|
|
9
|
+
@name = name
|
|
10
|
+
end
|
|
11
|
+
|
|
12
|
+
def name=(name)
|
|
13
|
+
raise TypeException unless name.is_a?(String)
|
|
14
|
+
@name = name
|
|
15
|
+
end
|
|
16
|
+
|
|
17
|
+
def name
|
|
18
|
+
@name
|
|
19
|
+
end
|
|
20
|
+
|
|
21
|
+
def version=(version)
|
|
22
|
+
raise TypeException unless version.is_a?(String)
|
|
23
|
+
@version = version
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
def version
|
|
27
|
+
@version
|
|
28
|
+
end
|
|
29
|
+
|
|
30
|
+
def description=(description)
|
|
31
|
+
raise TypeException unless description.is_a?(String)
|
|
32
|
+
@description = description
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
def description
|
|
36
|
+
@description
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
def maintainer=(maintainer)
|
|
40
|
+
raise TypeException unless maintainer.is_a?(String)
|
|
41
|
+
@maintainer = maintainer
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
def maintainer
|
|
45
|
+
@maintainer
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
def email=(email)
|
|
49
|
+
raise TypeException unless email.is_a?(String)
|
|
50
|
+
@email = email
|
|
51
|
+
end
|
|
52
|
+
|
|
53
|
+
def email
|
|
54
|
+
@email
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
def website=(website)
|
|
58
|
+
raise TypeException unless website.is_a?(String)
|
|
59
|
+
@website = website
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def website
|
|
63
|
+
@website
|
|
64
|
+
end
|
|
65
|
+
|
|
66
|
+
def repeatability=(repeatability)
|
|
67
|
+
raise TypeException unless Repeatability.all.include?(repeatability)
|
|
68
|
+
@repeatability = repeatability
|
|
69
|
+
end
|
|
70
|
+
|
|
71
|
+
def repeatability
|
|
72
|
+
@repeatability
|
|
73
|
+
end
|
|
74
|
+
end
|
|
75
|
+
|
|
76
|
+
end
|
data/lib/stat.rb
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
module StatModule
|
|
2
|
+
|
|
3
|
+
require_relative 'detail'
|
|
4
|
+
require_relative 'finding'
|
|
5
|
+
require_relative 'fix'
|
|
6
|
+
require_relative 'location'
|
|
7
|
+
require_relative 'process'
|
|
8
|
+
require_relative 'repeatability'
|
|
9
|
+
require_relative 'category'
|
|
10
|
+
require_relative 'JSONable'
|
|
11
|
+
require_relative 'type_exception'
|
|
12
|
+
|
|
13
|
+
class Stat < JSONable
|
|
14
|
+
attr_reader :statVersion
|
|
15
|
+
|
|
16
|
+
def initialize(process)
|
|
17
|
+
raise TypeException unless process.is_a?(StatModule::Process)
|
|
18
|
+
@statVersion = '1.0.0'
|
|
19
|
+
@process = process
|
|
20
|
+
@findings = []
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
def findings=(findings)
|
|
24
|
+
raise TypeException unless findings.is_a?(Array)
|
|
25
|
+
findings.each { |item|
|
|
26
|
+
raise TypeException unless item.is_a?(StatModule::Finding)
|
|
27
|
+
raise DuplicateElementException if @findings.include?(item)
|
|
28
|
+
@findings.push(item)
|
|
29
|
+
}
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
def findings
|
|
33
|
+
@findings
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
def process=(process)
|
|
37
|
+
raise TypeException unless process.is_a?(StatModule::Process)
|
|
38
|
+
@process = process
|
|
39
|
+
end
|
|
40
|
+
|
|
41
|
+
def process
|
|
42
|
+
@process
|
|
43
|
+
end
|
|
44
|
+
end
|
|
45
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: structured-acceptance-test
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- William Entriken
|
|
8
|
+
- Ilia Grabko
|
|
9
|
+
autorequire:
|
|
10
|
+
bindir: bin
|
|
11
|
+
cert_chain: []
|
|
12
|
+
date: 2017-01-11 00:00:00.000000000 Z
|
|
13
|
+
dependencies: []
|
|
14
|
+
description: Structured acceptance test data structure gem
|
|
15
|
+
email: github.com@phor.net
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- lib/JSONable.rb
|
|
21
|
+
- lib/category.rb
|
|
22
|
+
- lib/detail.rb
|
|
23
|
+
- lib/duplicate_element_exception.rb
|
|
24
|
+
- lib/finding.rb
|
|
25
|
+
- lib/fix.rb
|
|
26
|
+
- lib/location.rb
|
|
27
|
+
- lib/process.rb
|
|
28
|
+
- lib/repeatability.rb
|
|
29
|
+
- lib/stat.rb
|
|
30
|
+
- lib/type_exception.rb
|
|
31
|
+
homepage: https://github.com/fulldecent/structured-acceptance-test
|
|
32
|
+
licenses:
|
|
33
|
+
- MIT
|
|
34
|
+
metadata: {}
|
|
35
|
+
post_install_message:
|
|
36
|
+
rdoc_options: []
|
|
37
|
+
require_paths:
|
|
38
|
+
- lib
|
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
40
|
+
requirements:
|
|
41
|
+
- - ">="
|
|
42
|
+
- !ruby/object:Gem::Version
|
|
43
|
+
version: '0'
|
|
44
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
45
|
+
requirements:
|
|
46
|
+
- - ">="
|
|
47
|
+
- !ruby/object:Gem::Version
|
|
48
|
+
version: '0'
|
|
49
|
+
requirements: []
|
|
50
|
+
rubyforge_project:
|
|
51
|
+
rubygems_version: 2.5.1
|
|
52
|
+
signing_key:
|
|
53
|
+
specification_version: 4
|
|
54
|
+
summary: Structured acceptance test
|
|
55
|
+
test_files: []
|
|
56
|
+
has_rdoc:
|