reality-generators 1.19.0 → 1.21.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: fa4919cb877db35f5c799506c93cc2b15f614690c67e47900387e03ca53b59b1
4
- data.tar.gz: 855853b9e0d2383a465abce2bfc85a9cc856edc9f1b8e88d73c5f16ec4ce8152
3
+ metadata.gz: 24a270167a36968e1b2a11c7ebf8b868dbcb8eebf24adba10b6871d11751c786
4
+ data.tar.gz: 60f8624c23c7a6fab098003ca7d25daffca0abc53b640c3fa6cd475088b99207
5
5
  SHA512:
6
- metadata.gz: a461a9b209af0ba0eb3050568bca14d667fbdb2d85487e83282f8dd040e61cd5641b16adbfb7ea4da560d5a9f8b39f07f831a2e716792d70343b3683dbe43147
7
- data.tar.gz: cebe74c5524c03fb256c52b85e1b55011e373408a24ebf817ebfe2e97840fcd39ab47f56f37176b38fbd536dc47b0c0b49259b88fe04ad78fead254d69856374
6
+ metadata.gz: ea5d7d97328df16e74a2e33f3e711bb6694eaca7c6e6bcff59e7e1ff403e89d5b92737fc9a579d80bac0f9077f59de4b4f4353443f057dcf6b659ad47837180d
7
+ data.tar.gz: cc2c2f1cc7eb677797d7514bf36bb6719601066c41316123aee89c1a4fc035f99afa22ef22a5765f78ca51df20c95954c7616e219d4fda0692ab06151d630872
@@ -19,13 +19,17 @@ module Reality #nodoc
19
19
  # This method is called from a Rake or Buildr task to configure the Buildr
20
20
  # project so that it knows the location of all the generated artifacts and
21
21
  # adds them to the appropriate compile paths etc.
22
- def configure_buildr_project(buildr_project, generator_task, templates, target_dir, mark_as_generated_in_ide)
22
+ def configure_buildr_project(buildr_project, generator_task, templates, target_dir, mark_as_generated_in_ide, clean_files = true)
23
23
  if buildr_project.nil?
24
- task('clean') do
25
- rm_rf target_dir
24
+ if clean_files
25
+ task('clean') do
26
+ rm_rf target_dir
27
+ end
26
28
  end
27
29
  else
28
- buildr_project.clean { rm_rf target_dir }
30
+ if clean_files
31
+ buildr_project.clean { rm_rf target_dir }
32
+ end
29
33
  file(File.expand_path(target_dir) => [generator_task])
30
34
 
31
35
  # Is there java source generated in project?
@@ -64,7 +64,7 @@ module Reality #nodoc
64
64
  buildr_project.clean { rm_rf target_dir }
65
65
  end
66
66
 
67
- self.const_get(:GenerateTask).new(element_key, build_key, generator_keys, target_dir, buildr_project, &block)
67
+ self.const_get(:GenerateTask).new(element_key, build_key, generator_keys, target_dir, buildr_project, clean_generated_files, &block)
68
68
  end
69
69
  end
70
70
 
@@ -83,7 +83,7 @@ module Reality #nodoc
83
83
 
84
84
  attr_reader :task_name
85
85
 
86
- def initialize(root_element_key, key, generator_keys, target_dir, buildr_project = nil)
86
+ def initialize(root_element_key, key, generator_keys, target_dir, buildr_project = nil, clean_generated_files = true)
87
87
  @root_element_key = root_element_key
88
88
  @key = key
89
89
  @generator_keys = generator_keys
@@ -92,11 +92,12 @@ module Reality #nodoc
92
92
  # Turn on verbose messages if buildr is turned on tracing
93
93
  @verbose = trace?
94
94
  @mark_as_generated_in_ide = true
95
+ @clean_generated_files = clean_generated_files
95
96
  @target_dir = target_dir
96
97
  yield self if block_given?
97
98
  define
98
99
  @templates = self.template_set_container.generator.load_templates_from_template_sets(generator_keys)
99
- Reality::Generators::Buildr.configure_buildr_project(buildr_project, task_name, @templates, target_dir, mark_as_generated_in_ide?)
100
+ Reality::Generators::Buildr.configure_buildr_project(buildr_project, task_name, @templates, target_dir, mark_as_generated_in_ide?, clean_generated_files?)
100
101
  end
101
102
 
102
103
  protected
@@ -155,6 +156,10 @@ module Reality #nodoc
155
156
  !!@mark_as_generated_in_ide
156
157
  end
157
158
 
159
+ def clean_generated_files?
160
+ !!@clean_generated_files
161
+ end
162
+
158
163
  def verbose?
159
164
  !!@verbose
160
165
  end
@@ -58,7 +58,7 @@ module Reality #nodoc
58
58
  # * :guard - The :guard option passed to the template.
59
59
  #
60
60
  def file_artifact(template_set_suffix, artifact_key, filename_pattern, options = {})
61
- Reality::Options.check(options, [:facets, :guard, :helpers], Reality::Generators, 'define artifact')
61
+ Reality::Options.check(options, [:output_filter, :facets, :guard, :helpers], Reality::Generators, 'define artifact')
62
62
 
63
63
  file_extension = File.extname(filename_pattern)[1...9999]
64
64
 
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{reality-generators}
5
- s.version = '1.19.0'
5
+ s.version = '1.21.0'
6
6
  s.platform = Gem::Platform::RUBY
7
7
 
8
8
  s.authors = ['Peter Donald']
@@ -19,8 +19,8 @@ Gem::Specification.new do |s|
19
19
 
20
20
  s.rdoc_options = %w(--line-numbers --inline-source --title reality-generators)
21
21
 
22
- s.add_dependency 'reality-core', '>= 1.7.0'
23
- s.add_dependency 'reality-naming', '>= 1.9.0'
22
+ s.add_dependency 'reality-core', '>= 1.8.0'
23
+ s.add_dependency 'reality-naming', '>= 1.13.0'
24
24
 
25
25
  s.add_development_dependency(%q<minitest>, ['= 5.9.1'])
26
26
  s.add_development_dependency(%q<test-unit>, ['= 3.1.5'])
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reality-generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.0
4
+ version: 1.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Donald
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-10-22 00:00:00.000000000 Z
11
+ date: 2023-10-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: reality-core
@@ -16,28 +16,28 @@ dependencies:
16
16
  requirements:
17
17
  - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 1.7.0
19
+ version: 1.8.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 1.7.0
26
+ version: 1.8.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: reality-naming
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 1.9.0
33
+ version: 1.13.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: 1.9.0
40
+ version: 1.13.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement