lucidMachines 0.1.3 → 0.1.4
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 +4 -4
- data/Gemfile.lock +2 -2
- data/JobTest.rb +12 -0
- data/lib/lucidMachines/cli.rb +23 -50
- data/lib/lucidMachines/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1431efd18f9c63e69d7f14488d4dafb54610412ce3ea382102504753276211e
|
4
|
+
data.tar.gz: ee4df24ddfd4f7476217cd64626e50d744c07ca511e9f40904ad93dd8d55abfb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 241f888ae244b04e18fef8b6925a3b095184c367b4943f7b4a3671b7c2acfade76e5f717d3e180d99ade410fab086f96608347b2ec7b74afd1e0407f895ee875
|
7
|
+
data.tar.gz: 6b5e00d7b22b539b30adda679dcd1175fc762182b2e6e03fd05c08000fb0d1962c8a63b19f4eee1ea1f9cebdc6ea47099501bf78ac4675a2d50235934701c6d9
|
data/Gemfile.lock
CHANGED
data/JobTest.rb
ADDED
data/lib/lucidMachines/cli.rb
CHANGED
@@ -14,65 +14,38 @@ module LucidMachines
|
|
14
14
|
export(chart, sheet)
|
15
15
|
end
|
16
16
|
|
17
|
+
desc "check FILE.CSV 'sheet name' FILE.RB ClassName", "Check the methods to implement given a know class"
|
18
|
+
def update(csv_file, sheet, file, class_name)
|
19
|
+
|
20
|
+
puts "Exporting #{csv_file}, sheet: #{sheet}."
|
21
|
+
|
22
|
+
require "./#{file}"
|
23
|
+
|
24
|
+
@chart = ChartLoader.new(csv_file).chart
|
25
|
+
page = @chart.page(sheet)
|
26
|
+
subchart = @chart.subchart_for_page page
|
27
|
+
|
28
|
+
c = Object.const_get(class_name)
|
29
|
+
puts c.class.to_s
|
30
|
+
@ae = AASMExport.new(subchart); nil ;
|
31
|
+
c.class_eval @ae.export
|
32
|
+
# puts @ae.generate_methods_placeholder_for(c).to_s
|
33
|
+
open("#{file}-updated.rb", 'w') do |f|
|
34
|
+
# f << @ae.export
|
35
|
+
f << @ae.generate_methods_placeholder_for(c)
|
36
|
+
end
|
37
|
+
|
38
|
+
end
|
39
|
+
|
17
40
|
desc "list", "List the sheets in a CSV."
|
18
41
|
def list(csv_file)
|
19
42
|
|
20
43
|
chart = ChartLoader.new(csv_file).chart
|
21
44
|
chart.pages.each_value {|p| puts p.name.to_s }
|
22
|
-
# export_all chart
|
23
|
-
# export(chart, sheet)
|
24
45
|
end
|
25
|
-
|
26
46
|
|
27
47
|
end
|
28
48
|
end
|
29
49
|
|
30
50
|
|
31
51
|
|
32
|
-
# # coding: utf-8
|
33
|
-
# require 'ruby-graphviz'
|
34
|
-
# require 'csv'
|
35
|
-
|
36
|
-
# require 'aasm'
|
37
|
-
# require 'aasm-diagram'
|
38
|
-
|
39
|
-
# require './loader'
|
40
|
-
# require './elements'
|
41
|
-
# require './chart'
|
42
|
-
# require './aasm_export'
|
43
|
-
# require './graphviz_export'
|
44
|
-
# require './exporter'
|
45
|
-
|
46
|
-
# # IRB.CurrentContext.echo = true
|
47
|
-
# include ChartReader
|
48
|
-
|
49
|
-
# # chart = ChartLoader.new("integration2.csv").chart; nil;
|
50
|
-
|
51
|
-
# chart = ChartLoader.new("integration.csv").chart
|
52
|
-
# # export_all chart
|
53
|
-
# export(chart,"state machine def")
|
54
|
-
# export(chart,"ex4")
|
55
|
-
# export(chart,"ex3")
|
56
|
-
|
57
|
-
|
58
|
-
# # p_ex2 = @chart.page "ex2" ; nil ;
|
59
|
-
# # @ex2 = @chart.subchart_for_page p_ex2; nil ;
|
60
|
-
# # GraphVizExport.new(@ex2).build_graph("chart-ex2.png") ; nil ;
|
61
|
-
|
62
|
-
|
63
|
-
# # @ae = AASMExport.new(@ex2); nil ;
|
64
|
-
# # JobTest.class_eval @ae.export
|
65
|
-
# # @ae.generate_methods_placeholder_for(JobTest)
|
66
|
-
|
67
|
-
|
68
|
-
# # @j = JobTest.new
|
69
|
-
# # ## Todo write in a file ?
|
70
|
-
|
71
|
-
# # AASMDiagram::Diagram.new(@j.aasm, 'ex2-2.png')
|
72
|
-
|
73
|
-
# # open('ex2.rb', 'w') do |f|
|
74
|
-
# # f << @ae.export
|
75
|
-
# # f << @ae.generate_methods_placeholder
|
76
|
-
# # end
|
77
|
-
|
78
|
-
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lucidMachines
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jeremy Laviole
|
@@ -107,6 +107,7 @@ files:
|
|
107
107
|
- CODE_OF_CONDUCT.md
|
108
108
|
- Gemfile
|
109
109
|
- Gemfile.lock
|
110
|
+
- JobTest.rb
|
110
111
|
- README.md
|
111
112
|
- Rakefile
|
112
113
|
- aasm_export.rb
|