reality-generators 1.16.0 → 1.17.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/reality/generators/rake_integration.rb +10 -1
- data/reality-generators.gemspec +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0bee2228de7a874d5c2608878982967909c8377131b466f86b1d7710c7d00611
|
4
|
+
data.tar.gz: 149169940b0dd2e931e361e57d31f58cbafffb0c872915647badb6fe542063bf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c4f83176ca1f14970c4feb732c61278053c9fc8dc02695d1e40f5bbd3131cb1c8fb6af4247729d5764c4be232443de359c6e7e717f72715be657aaeb8a6b6c7f
|
7
|
+
data.tar.gz: 9cb3b310ed7780790a702cb3549ca467456fe420325747f040990a69905c7a41d131fd80185aa60816763459419eca59a2d282787be0378f86ee5473c38a94ce
|
@@ -33,6 +33,7 @@ module Reality #nodoc
|
|
33
33
|
element_key = options[:"#{root_element_type}_key"]
|
34
34
|
target_dir = options[:target_dir]
|
35
35
|
buildr_project = options[:buildr_project]
|
36
|
+
clean_generated_files = options[:clean_generated_files].nil? ? true : !!options[:clean_generated_files]
|
36
37
|
|
37
38
|
if buildr_project.nil? && ::Buildr.application.current_scope.size > 0
|
38
39
|
buildr_project = ::Buildr.project(::Buildr.application.current_scope.join(':')) rescue nil
|
@@ -46,7 +47,11 @@ module Reality #nodoc
|
|
46
47
|
end
|
47
48
|
|
48
49
|
if target_dir.nil? && !buildr_project.nil?
|
49
|
-
|
50
|
+
if clean_generated_files
|
51
|
+
target_dir = buildr_project._(:target, :generated, self.generated_type_path_prefix, build_key)
|
52
|
+
else
|
53
|
+
target_dir = buildr_project._(:srcgen, self.generated_type_path_prefix, build_key)
|
54
|
+
end
|
50
55
|
elsif !target_dir.nil? && !buildr_project.nil?
|
51
56
|
self.log_container.warn("#{self.name}.define_generate_task specifies a target directory parameter but it can be be derived from the context. The parameter should be removed.")
|
52
57
|
end
|
@@ -55,6 +60,10 @@ module Reality #nodoc
|
|
55
60
|
self.log_container.error("#{self.name}.define_generate_task should specify a target directory as it can not be derived from the context.")
|
56
61
|
end
|
57
62
|
|
63
|
+
if clean_generated_files && buildr_project
|
64
|
+
buildr_project.clean { rm_rf target_dir }
|
65
|
+
end
|
66
|
+
|
58
67
|
self.const_get(:GenerateTask).new(element_key, build_key, generator_keys, target_dir, buildr_project, &block)
|
59
68
|
end
|
60
69
|
end
|
data/reality-generators.gemspec
CHANGED
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.
|
4
|
+
version: 1.17.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-09-
|
11
|
+
date: 2023-09-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: reality-core
|