Almirah 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/almirah +4 -4
- data/lib/almirah/doc_fabric.rb +65 -65
- data/lib/almirah/doc_items/blockquote.rb +21 -21
- data/lib/almirah/doc_items/code_block.rb +26 -26
- data/lib/almirah/doc_items/controlled_paragraph.rb +112 -112
- data/lib/almirah/doc_items/controlled_table.rb +224 -224
- data/lib/almirah/doc_items/controlled_table_row.rb +22 -22
- data/lib/almirah/doc_items/doc_footer.rb +16 -16
- data/lib/almirah/doc_items/doc_item.rb +22 -22
- data/lib/almirah/doc_items/frontmatter.rb +9 -9
- data/lib/almirah/doc_items/heading.rb +93 -93
- data/lib/almirah/doc_items/image.rb +27 -27
- data/lib/almirah/doc_items/markdown_list.rb +156 -156
- data/lib/almirah/doc_items/markdown_table.rb +61 -61
- data/lib/almirah/doc_items/paragraph.rb +25 -25
- data/lib/almirah/doc_items/text_line.rb +296 -296
- data/lib/almirah/doc_items/todo_block.rb +21 -21
- data/lib/almirah/doc_parser.rb +378 -378
- data/lib/almirah/doc_types/base_document.rb +64 -64
- data/lib/almirah/doc_types/coverage.rb +95 -80
- data/lib/almirah/doc_types/index.rb +173 -173
- data/lib/almirah/doc_types/persistent_document.rb +17 -17
- data/lib/almirah/doc_types/protocol.rb +24 -24
- data/lib/almirah/doc_types/specification.rb +67 -67
- data/lib/almirah/doc_types/traceability.rb +142 -142
- data/lib/almirah/dom/doc_section.rb +25 -25
- data/lib/almirah/dom/document.rb +78 -78
- data/lib/almirah/navigation_pane.rb +16 -16
- data/lib/almirah/project.rb +287 -287
- data/lib/almirah/project_configuration.rb +41 -41
- data/lib/almirah/project_template.rb +298 -298
- data/lib/almirah/project_utility.rb +52 -0
- data/lib/almirah/search/specifications_db.rb +79 -79
- data/lib/almirah/templates/css/main.css +300 -300
- data/lib/almirah/templates/css/search.css +40 -40
- data/lib/almirah/templates/page.html +42 -42
- data/lib/almirah/templates/scripts/main.js +111 -111
- data/lib/almirah/templates/scripts/orama_search.js +138 -138
- data/lib/almirah.rb +93 -58
- metadata +4 -3
data/lib/almirah.rb
CHANGED
@@ -1,58 +1,93 @@
|
|
1
|
-
require 'thor'
|
2
|
-
require_relative 'almirah/project'
|
3
|
-
require_relative 'almirah/project_configuration'
|
4
|
-
require_relative 'almirah/project_template'
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
end
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
end
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
1
|
+
require 'thor'
|
2
|
+
require_relative 'almirah/project'
|
3
|
+
require_relative 'almirah/project_configuration'
|
4
|
+
require_relative 'almirah/project_template'
|
5
|
+
require_relative 'almirah/project_utility'
|
6
|
+
|
7
|
+
class CLI < Thor
|
8
|
+
option :run
|
9
|
+
desc 'please <project_folder>', 'Processes the folder'
|
10
|
+
long_desc <<-LONGDESC
|
11
|
+
Creates HTML representation of markdown files stored in <project_folder>
|
12
|
+
|
13
|
+
Use --run option to specify exact test run ID for processing if required.
|
14
|
+
|
15
|
+
For example: almirah please my_project --run 003
|
16
|
+
|
17
|
+
LONGDESC
|
18
|
+
def please(project_folder)
|
19
|
+
a = Almirah.new project_folder
|
20
|
+
if options[:run]
|
21
|
+
a.run(options[:run])
|
22
|
+
else
|
23
|
+
a.default
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
desc 'Creates project from template', ''
|
28
|
+
long_desc <<-LONGDESC
|
29
|
+
Creates default project structure in the <project_name> folder
|
30
|
+
LONGDESC
|
31
|
+
def create(project_name)
|
32
|
+
Almirah.create_new_project_structure project_name
|
33
|
+
end
|
34
|
+
|
35
|
+
option :run
|
36
|
+
desc 'combine <project_folder>', 'Combines all the test protocols'
|
37
|
+
long_desc <<-LONGDESC
|
38
|
+
Combines all the test protocols from the <project_folder>/tests/protocols folder
|
39
|
+
|
40
|
+
Use --run option to specify exact test run ID from <project_folder>/tests/runs folder.
|
41
|
+
|
42
|
+
For example: almirah combine my_project --run 003
|
43
|
+
|
44
|
+
Result is stored as <project_folder>/build/combined.md
|
45
|
+
LONGDESC
|
46
|
+
def combine(project_folder)
|
47
|
+
Almirah.create_project_utility project_folder
|
48
|
+
if options[:run]
|
49
|
+
Almirah.combine_run(options[:run])
|
50
|
+
else
|
51
|
+
Almirah.combine_protocols
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
class Almirah
|
57
|
+
attr_accessor :project
|
58
|
+
attr_accessor :project_utility
|
59
|
+
|
60
|
+
def initialize(project_folder)
|
61
|
+
config = ProjectConfiguration.new project_folder
|
62
|
+
@project = Project.new config
|
63
|
+
end
|
64
|
+
|
65
|
+
def getGemRoot
|
66
|
+
File.expand_path './..', File.dirname(__FILE__)
|
67
|
+
end
|
68
|
+
|
69
|
+
def run(test_run)
|
70
|
+
@project.specifications_and_results test_run
|
71
|
+
end
|
72
|
+
|
73
|
+
def self.create_new_project_structure(project_name)
|
74
|
+
ProjectTemplate.new project_name
|
75
|
+
end
|
76
|
+
|
77
|
+
def self.create_project_utility(project_folder)
|
78
|
+
config = ProjectConfiguration.new project_folder
|
79
|
+
@project_utility = ProjectUtility.new config
|
80
|
+
end
|
81
|
+
|
82
|
+
def self.combine_protocols
|
83
|
+
@project_utility.combine_protocols
|
84
|
+
end
|
85
|
+
|
86
|
+
def self.combine_run(test_run)
|
87
|
+
@project_utility.combine_run test_run
|
88
|
+
end
|
89
|
+
|
90
|
+
def default
|
91
|
+
@project.specifications_and_protocols
|
92
|
+
end
|
93
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: Almirah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleksandr Ivanov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-08-
|
11
|
+
date: 2024-08-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -69,6 +69,7 @@ files:
|
|
69
69
|
- lib/almirah/project.rb
|
70
70
|
- lib/almirah/project_configuration.rb
|
71
71
|
- lib/almirah/project_template.rb
|
72
|
+
- lib/almirah/project_utility.rb
|
72
73
|
- lib/almirah/search/specifications_db.rb
|
73
74
|
- lib/almirah/templates/css/main.css
|
74
75
|
- lib/almirah/templates/css/search.css
|
@@ -94,7 +95,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
95
|
- !ruby/object:Gem::Version
|
95
96
|
version: '0'
|
96
97
|
requirements: []
|
97
|
-
rubygems_version: 3.5.
|
98
|
+
rubygems_version: 3.5.17
|
98
99
|
signing_key:
|
99
100
|
specification_version: 4
|
100
101
|
summary: Almirah
|