csa-ccm 0.1.1 → 0.1.2

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
  SHA256:
3
- metadata.gz: ec4fbcef29df053e611150cbc6a24c680384faad2c9cec534ff06823425f6368
4
- data.tar.gz: 5a6cd43fd94f0eea37151fe9b0cdbaf3affe349ae4770214880f39dfafc60a30
3
+ metadata.gz: 1a7011ff17953162f760e8791b78e0115c5317f36976c5123bc2b5cedc7f6109
4
+ data.tar.gz: 322a021656e03630799f6695738efc4c642e56a7e9cdd0b98a97236c15b36cba
5
5
  SHA512:
6
- metadata.gz: 7bff78c74385401747136b0d1c8bab4b7fbfc37805d8b22256e9806ba897d481a26e3efe0c01d2c58ce51c09be86304b6089f2355f644b735a95fedac78fe5c1
7
- data.tar.gz: bfb0cb3250849c8ad9cc9ab0d416cf6a30d377078cd412f7470a4692b29f365a3bafd177ba062b313fb18159247ad933e320997094718590292c97b8715991f1
6
+ metadata.gz: 4a942b423af43fddc9a12f150a2da04f93865a224ba19d58c72039052ebc228fdc38da4a3d13dc47e44ba51c46a3903aab9f9dbe5fade4086abe5016c003903c
7
+ data.tar.gz: 891e69588dbcc034eb23cb258783962a90af24cb0d65673cb06af21ae4a00b55a73c8e5b7976c116672d33d1755e2409841b2988842c72deab5e5a1dee0f2cd8
@@ -1,10 +1,10 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- csa-ccm (0.1.0)
5
- rake (~> 10.0)
6
- rubyXL (~> 3.4.3)
7
- thor (~> 0.20.3)
4
+ csa-ccm (0.1.2)
5
+ rake
6
+ rubyXL (~> 3.4)
7
+ thor (~> 0.20)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
@@ -22,14 +22,14 @@ GEM
22
22
  method_source (~> 0.9.0)
23
23
  pry-coolline (0.2.5)
24
24
  coolline (~> 0.5)
25
- rake (10.5.0)
25
+ rake (12.3.2)
26
26
  rspec (3.8.0)
27
27
  rspec-core (~> 3.8.0)
28
28
  rspec-expectations (~> 3.8.0)
29
29
  rspec-mocks (~> 3.8.0)
30
30
  rspec-core (3.8.0)
31
31
  rspec-support (~> 3.8.0)
32
- rspec-expectations (3.8.2)
32
+ rspec-expectations (3.8.3)
33
33
  diff-lcs (>= 1.2.0, < 2.0)
34
34
  rspec-support (~> 3.8.0)
35
35
  rspec-mocks (3.8.0)
@@ -1,7 +1,9 @@
1
- module Csa::Ccm
2
- module Cli
1
+ module Csa
2
+ module Ccm
3
+ module Cli
3
4
 
4
- end
5
+ end
6
+ end
5
7
  end
6
8
 
7
9
  require_relative "cli/resource"
@@ -1,7 +1,7 @@
1
1
  module Csa
2
2
  module Ccm
3
3
  module Cli
4
- VERSION = "0.1.1"
4
+ VERSION = "0.1.2"
5
5
  end
6
6
  end
7
7
  end
@@ -71,9 +71,9 @@ class Matrix
71
71
 
72
72
  # puts "HERE IN ROW! #{ruby_xl_row.cells.map(&:value)}"
73
73
 
74
- puts control_domain_description
75
- puts control_id
76
- puts question_id
74
+ # puts control_domain_description
75
+ # puts control_id
76
+ # puts question_id
77
77
 
78
78
  self
79
79
  end
@@ -116,15 +116,15 @@ class Matrix
116
116
  # We loop over all Questions
117
117
  (start_row..max_row_number).each do |row_number|
118
118
 
119
- puts "looping row #{row_number}"
119
+ # puts "looping row #{row_number}"
120
120
  row = matrix.row(row_number)
121
121
  # Skip row if there is no question-id
122
- puts "row #{row.question_id}"
122
+ # puts"row #{row.question_id}"
123
123
  # require 'pry'
124
124
  # binding.pry
125
125
  next if row.question_id.nil?
126
126
 
127
- puts "domain_id #{row.control_domain_id}"
127
+ # puts"domain_id #{row.control_domain_id}"
128
128
 
129
129
  domain_id = row.control_domain_id
130
130
  unless domain_id.nil?
@@ -135,7 +135,7 @@ class Matrix
135
135
  name: row.control_domain_name
136
136
  )
137
137
 
138
- puts "control_domain #{control_domain.to_hash}"
138
+ # puts"control_domain #{control_domain.to_hash}"
139
139
 
140
140
  # Store the Control Domain
141
141
  matrix.control_domains[domain_id] = control_domain
@@ -151,14 +151,14 @@ class Matrix
151
151
  specification: row.control_spec
152
152
  )
153
153
 
154
- puts "control #{control.to_hash}"
154
+ # puts"control #{control.to_hash}"
155
155
  # Store the Control
156
156
  control_domain.controls[control_id] = control
157
157
  end
158
158
 
159
159
  question = matrix.control_domains[domain_id].controls[control_id]
160
160
  # Store the Question
161
- puts question.to_hash
161
+ # putsquestion.to_hash
162
162
  control.questions[row.question_id] = Question.new(id: row.question_id, content: row.question_content)
163
163
  end
164
164
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: csa-ccm
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ribose Inc.
@@ -95,7 +95,6 @@ files:
95
95
  - Rakefile
96
96
  - bin/console
97
97
  - bin/setup
98
- - build.rb
99
98
  - caiq-3.0.1.yaml
100
99
  - csa-ccm.gemspec
101
100
  - exe/csa-ccm
data/build.rb DELETED
@@ -1,46 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require 'creek'
4
- require 'pp'
5
- require 'pry'
6
- require_relative 'lib/term_workbook'
7
- require_relative 'lib/concept_collection'
8
-
9
- filepath = './csa-ccm.xlsx'
10
- workbook = MatrixWorkbook.new(filepath)
11
- workbook.glossary_info.metadata_section.structure
12
- workbook.glossary_info.metadata_section.attributes
13
-
14
- languages = {}
15
-
16
- workbook.languages_supported.map do |lang|
17
- puts "******* WORKING ON LANGUAGE (#{lang})"
18
- sheet = workbook.language_sheet(lang)
19
- termsec = sheet.terms_section
20
- languages[sheet.language_code] = termsec.terms
21
- end
22
-
23
- collection = ControlDomain.new
24
-
25
- languages.each_pair do |lang, terms|
26
- terms.each do |term|
27
- collection.add_term(term)
28
- end
29
- end
30
-
31
- collection.to_file("csa-ccm.yaml")
32
-
33
- collection.keys.each do |id|
34
- collection[id].to_file("concepts/concept-#{id}.yaml")
35
- end
36
-
37
-
38
- # french = workbook.language_sheet("French")
39
- # french.sections[3].structure
40
- # french.sections[3].terms
41
-
42
- # english = workbook.language_sheet("English")
43
- # english.terms_section
44
- # english.terms_section.terms
45
-
46
- #pry.binding