Almirah 0.2.4 → 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 -20
- data/lib/almirah/doc_items/frontmatter.rb +9 -0
- 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 -158
- data/lib/almirah/doc_items/markdown_table.rb +61 -63
- data/lib/almirah/doc_items/paragraph.rb +25 -27
- 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 -330
- data/lib/almirah/doc_types/base_document.rb +64 -70
- data/lib/almirah/doc_types/coverage.rb +95 -81
- data/lib/almirah/doc_types/index.rb +173 -169
- data/lib/almirah/doc_types/persistent_document.rb +17 -20
- 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 -72
- data/lib/almirah/navigation_pane.rb +16 -16
- data/lib/almirah/project.rb +287 -306
- data/lib/almirah/project_configuration.rb +41 -41
- data/lib/almirah/project_template.rb +298 -0
- data/lib/almirah/project_utility.rb +52 -0
- data/lib/almirah/search/specifications_db.rb +79 -83
- 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 -49
- metadata +28 -5
data/lib/almirah.rb
CHANGED
@@ -1,49 +1,93 @@
|
|
1
|
-
require
|
2
|
-
require_relative
|
3
|
-
require_relative
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
def
|
19
|
-
a = Almirah.new project_folder
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
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,15 +1,35 @@
|
|
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-
|
12
|
-
dependencies:
|
11
|
+
date: 2024-08-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.3'
|
20
|
+
- - ">="
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: 1.3.1
|
23
|
+
type: :runtime
|
24
|
+
prerelease: false
|
25
|
+
version_requirements: !ruby/object:Gem::Requirement
|
26
|
+
requirements:
|
27
|
+
- - "~>"
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: '1.3'
|
30
|
+
- - ">="
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: 1.3.1
|
13
33
|
description: The software part of the Almirah framework
|
14
34
|
email: oleksandr.ivanov.development@gmail.com
|
15
35
|
executables:
|
@@ -27,6 +47,7 @@ files:
|
|
27
47
|
- lib/almirah/doc_items/controlled_table_row.rb
|
28
48
|
- lib/almirah/doc_items/doc_footer.rb
|
29
49
|
- lib/almirah/doc_items/doc_item.rb
|
50
|
+
- lib/almirah/doc_items/frontmatter.rb
|
30
51
|
- lib/almirah/doc_items/heading.rb
|
31
52
|
- lib/almirah/doc_items/image.rb
|
32
53
|
- lib/almirah/doc_items/markdown_list.rb
|
@@ -47,6 +68,8 @@ files:
|
|
47
68
|
- lib/almirah/navigation_pane.rb
|
48
69
|
- lib/almirah/project.rb
|
49
70
|
- lib/almirah/project_configuration.rb
|
71
|
+
- lib/almirah/project_template.rb
|
72
|
+
- lib/almirah/project_utility.rb
|
50
73
|
- lib/almirah/search/specifications_db.rb
|
51
74
|
- lib/almirah/templates/css/main.css
|
52
75
|
- lib/almirah/templates/css/search.css
|
@@ -65,14 +88,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
88
|
requirements:
|
66
89
|
- - ">="
|
67
90
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0'
|
91
|
+
version: '3.0'
|
69
92
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
93
|
requirements:
|
71
94
|
- - ">="
|
72
95
|
- !ruby/object:Gem::Version
|
73
96
|
version: '0'
|
74
97
|
requirements: []
|
75
|
-
rubygems_version: 3.5.
|
98
|
+
rubygems_version: 3.5.17
|
76
99
|
signing_key:
|
77
100
|
specification_version: 4
|
78
101
|
summary: Almirah
|