flame_generate_toys 0.5.0 → 0.6.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9472104fd4de47947a8cdcef1f52e6c2a172e06a0803fc96b17bd9f247bbf135
|
4
|
+
data.tar.gz: 158b09925e0aebf95db6b4c29eac929f2f239973ce43ab73900529052686eedd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 921586ddecdd1623d2b6a854446ce9a1f7f065f25139635c3718864279a2bcd4ab0ef75bfeec134e1cfab98135170c516e5d25453a7f041f07c8556b45870ff7
|
7
|
+
data.tar.gz: 81a2ad2a6ad91c8080850233e5bfcb918c1dcf69e0e185c45ef55146872e76e89ab78ce293b59476a75efbe965a120d259d3dd29a28439f52ad1693d0a673f27
|
data/CHANGELOG.md
CHANGED
@@ -11,16 +11,20 @@ module FlameGenerateToys
|
|
11
11
|
include CommonGeneratorsCode
|
12
12
|
|
13
13
|
required_arg :name
|
14
|
+
flag :indentation, '--indentation=CHARS', default: "\t"
|
14
15
|
|
15
16
|
to_run do
|
16
17
|
generator = initialize_generator :form, template.namespace
|
17
18
|
|
18
19
|
*modules, class_name = generator.camelized_name.split('::')
|
19
20
|
|
21
|
+
class_definition_indentation = indentation * modules.size
|
22
|
+
|
20
23
|
generator.write(
|
21
24
|
modules: modules,
|
22
25
|
class_name: class_name,
|
23
|
-
|
26
|
+
class_definition_indentation: class_definition_indentation,
|
27
|
+
class_body_indentation: class_definition_indentation + indentation,
|
24
28
|
parent_form: parent_form(class_name)
|
25
29
|
)
|
26
30
|
end
|
@@ -8,11 +8,11 @@ module <%= namespace %>
|
|
8
8
|
%><%
|
9
9
|
end
|
10
10
|
%>
|
11
|
+
<%= class_definition_indentation %>## TODO: Write form description
|
12
|
+
<%= class_definition_indentation %>class <%= class_name %> < Forms::Base
|
13
|
+
<%= class_body_indentation %>include Forms::Model::<%= parent_form %>
|
11
14
|
<%=
|
12
|
-
|
13
|
-
%>class <%= class_name %> < Forms::Model::<%= parent_form %>
|
14
|
-
<%=
|
15
|
-
class_indentation
|
15
|
+
class_definition_indentation
|
16
16
|
%>end<%
|
17
17
|
modules.map.with_index do |_module_name, index|
|
18
18
|
reverse_index = modules.size - index.next
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flame_generate_toys
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Popov
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-inflector
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: 0.
|
33
|
+
version: 0.7.0
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: 0.
|
40
|
+
version: 0.7.0
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: toys-core
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -235,7 +235,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
235
235
|
- !ruby/object:Gem::Version
|
236
236
|
version: '0'
|
237
237
|
requirements: []
|
238
|
-
rubygems_version: 3.1.
|
238
|
+
rubygems_version: 3.1.4
|
239
239
|
signing_key:
|
240
240
|
specification_version: 4
|
241
241
|
summary: Toys template to generate Flame application entities.
|