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: f70b8d15c44275615c33976ad441a5117b9b9fea37ce3a6bdd2bb832fc8cb41a
4
- data.tar.gz: 935726d89f4e59c6d9460b0b37ec40f7f030f82e555ed4106f2bd39ebfdfcaf0
3
+ metadata.gz: 9472104fd4de47947a8cdcef1f52e6c2a172e06a0803fc96b17bd9f247bbf135
4
+ data.tar.gz: 158b09925e0aebf95db6b4c29eac929f2f239973ce43ab73900529052686eedd
5
5
  SHA512:
6
- metadata.gz: dbaed3aa00b925353c1f67baaacb0fd433389c1983cba38e06b726f723dee376a5d963423d4aa98a685d5ad24cf73ab539e80ba2ebbc46ab3f78e0133860dd54
7
- data.tar.gz: 65be66674932e319a94df940c233e9efe3f1c5830cf797463915485adcdd61def8bb29d4f5872cc32c420376556c508dac187610b2c9c3f4c86f908f2d99395a
6
+ metadata.gz: 921586ddecdd1623d2b6a854446ce9a1f7f065f25139635c3718864279a2bcd4ab0ef75bfeec134e1cfab98135170c516e5d25453a7f041f07c8556b45870ff7
7
+ data.tar.gz: 81a2ad2a6ad91c8080850233e5bfcb918c1dcf69e0e185c45ef55146872e76e89ab78ce293b59476a75efbe965a120d259d3dd29a28439f52ad1693d0a673f27
@@ -2,8 +2,12 @@
2
2
 
3
3
  ## master (unreleased)
4
4
 
5
+ ## 0.6.0 (2020-10-14)
6
+
5
7
  ## 0.5.0 (2020-09-25)
6
8
 
9
+ * Fix forms generation.
10
+
7
11
  ## 0.4.0 (2020-09-24)
8
12
 
9
13
  * Update `formalism-model_forms` to another fixed version.
@@ -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
- class_indentation: "\t" * modules.size,
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
- class_indentation
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
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module FlameGenerateToys
4
- VERSION = '0.5.0'
4
+ VERSION = '0.6.0'
5
5
  end
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.5.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-09-25 00:00:00.000000000 Z
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.6.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.6.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.2
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.