Almirah 0.2.5 → 0.2.7

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.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/bin/almirah +4 -4
  3. data/lib/almirah/doc_fabric.rb +65 -65
  4. data/lib/almirah/doc_items/blockquote.rb +21 -21
  5. data/lib/almirah/doc_items/code_block.rb +26 -26
  6. data/lib/almirah/doc_items/controlled_paragraph.rb +112 -112
  7. data/lib/almirah/doc_items/controlled_table.rb +224 -224
  8. data/lib/almirah/doc_items/controlled_table_row.rb +22 -22
  9. data/lib/almirah/doc_items/doc_footer.rb +16 -16
  10. data/lib/almirah/doc_items/doc_item.rb +22 -22
  11. data/lib/almirah/doc_items/frontmatter.rb +9 -9
  12. data/lib/almirah/doc_items/heading.rb +93 -93
  13. data/lib/almirah/doc_items/image.rb +27 -27
  14. data/lib/almirah/doc_items/markdown_list.rb +156 -156
  15. data/lib/almirah/doc_items/markdown_table.rb +97 -61
  16. data/lib/almirah/doc_items/paragraph.rb +25 -25
  17. data/lib/almirah/doc_items/text_line.rb +296 -296
  18. data/lib/almirah/doc_items/todo_block.rb +21 -21
  19. data/lib/almirah/doc_parser.rb +379 -378
  20. data/lib/almirah/doc_types/base_document.rb +64 -64
  21. data/lib/almirah/doc_types/coverage.rb +95 -80
  22. data/lib/almirah/doc_types/index.rb +173 -173
  23. data/lib/almirah/doc_types/persistent_document.rb +17 -17
  24. data/lib/almirah/doc_types/protocol.rb +24 -24
  25. data/lib/almirah/doc_types/specification.rb +67 -67
  26. data/lib/almirah/doc_types/traceability.rb +142 -142
  27. data/lib/almirah/dom/doc_section.rb +25 -25
  28. data/lib/almirah/dom/document.rb +78 -78
  29. data/lib/almirah/navigation_pane.rb +16 -16
  30. data/lib/almirah/project.rb +287 -287
  31. data/lib/almirah/project_configuration.rb +41 -41
  32. data/lib/almirah/project_template.rb +298 -298
  33. data/lib/almirah/project_utility.rb +52 -0
  34. data/lib/almirah/search/specifications_db.rb +79 -79
  35. data/lib/almirah/templates/css/main.css +300 -300
  36. data/lib/almirah/templates/css/search.css +40 -40
  37. data/lib/almirah/templates/page.html +42 -42
  38. data/lib/almirah/templates/scripts/main.js +111 -111
  39. data/lib/almirah/templates/scripts/orama_search.js +138 -138
  40. data/lib/almirah.rb +93 -58
  41. 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
- class CLI < Thor
7
- option :run
8
- desc 'please <project_folder>', 'Processes the folder'
9
- long_desc <<-LONGDESC
10
- Creates HTML representation of markdown files stored in <project_folder>
11
-
12
- Use --run option to specify excat test run ID for processing if required.
13
-
14
- For example: almirah please my_project --run 003
15
-
16
- LONGDESC
17
- def please(project_folder)
18
- a = Almirah.new project_folder
19
- if options[:run]
20
- a.run(options[:run])
21
- else
22
- a.default
23
- end
24
- end
25
-
26
- desc 'Creates project from template', ''
27
- long_desc <<-LONGDESC
28
- Creates default project structure in the <project_name> folder
29
- LONGDESC
30
- def create(project_name)
31
- Almirah.create_new_project_structure project_name
32
- end
33
- end
34
-
35
- class Almirah
36
- attr_accessor :project
37
-
38
- def initialize(project_folder)
39
- config = ProjectConfiguration.new project_folder
40
- @project = Project.new config
41
- end
42
-
43
- def getGemRoot
44
- File.expand_path './..', File.dirname(__FILE__)
45
- end
46
-
47
- def run(test_run)
48
- @project.specifications_and_results test_run
49
- end
50
-
51
- def self.create_new_project_structure(project_name)
52
- ProjectTemplate.new project_name
53
- end
54
-
55
- def default
56
- @project.specifications_and_protocols
57
- end
58
- end
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.5
4
+ version: 0.2.7
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-03 00:00:00.000000000 Z
11
+ date: 2024-08-30 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.16
98
+ rubygems_version: 3.5.17
98
99
  signing_key:
99
100
  specification_version: 4
100
101
  summary: Almirah